Commit 526a9de6 authored by Tom Powell's avatar Tom Powell

Pass version to signing.

parent b5c4b45e
Pipeline #34903992 passed with stages
in 97 minutes and 15 seconds
......@@ -15,11 +15,12 @@ if not project or not trigger_token or not access_token:
project = quote_plus(project)
def start(device, pipeline_id):
def start(device, version, pipeline_id):
gitlab_url = f"https://gitlab.com/api/v4/projects/{project}/trigger/pipeline?token={trigger_token}&ref=master"
data = {
"variables[DEVICE]": device,
"variables[PIPELINE_ID]": pipeline_id
"variables[PIPELINE_ID]": pipeline_id,
"variables[VERSION]": version
}
req = requests.post(gitlab_url, data)
if req.status_code == 201:
......@@ -29,7 +30,7 @@ def start(device, pipeline_id):
print("ERROR", req.status_code, req.text)
def main():
pipeline_id = start(os.environ.get("DEVICE"), os.environ.get("CI_PIPELINE_ID"))
pipeline_id = start(os.environ.get("DEVICE"), os.environ.get("VERSION"), os.environ.get("CI_PIPELINE_ID"))
status = "pending"
gitlab_url = f"https://gitlab.com/api/v4/projects/{project}/pipelines/{pipeline_id}"
headers = {'Private-Token': access_token}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment