From 44beb691ccdf2451204dc720c0af4569d2d90d27 Mon Sep 17 00:00:00 2001 From: Will Holland Date: Thu, 1 Oct 2015 00:37:44 +0100 Subject: Add pipeline attribute to be passed along a pipeline --- deploy_logic.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'deploy_logic.py') diff --git a/deploy_logic.py b/deploy_logic.py index a0cbd2e..60f0451 100644 --- a/deploy_logic.py +++ b/deploy_logic.py @@ -36,13 +36,16 @@ def deploy(cluster): log('deployment complete') return exit_val -def trigger_testing(artefact): +def trigger_testing(artefact,pipeline): import requests global url global testing_sha url = '%sdeploy_complete' % ORCHE_URL log("triggering testing") - payload = {'artefact':artefact,'testing_sha':testing_sha} + payload = { + 'artefact':artefact, + 'testing_sha':testing_sha, + 'pipeline':pipeline} r = requests.post(url,data=payload) return not r.ok @@ -55,6 +58,7 @@ if __name__ == '__main__': testing_sha = sys.argv[3] except: testing_sha = 'HEAD' + pipeline = sys.argv[4] deploy_exit_val = deploy('clusters/tlsa.morph') if deploy_exit_val: _exit(deploy_exit_val) - _exit(trigger_testing(artefact)) + _exit(trigger_testing(artefact,pipeline)) -- cgit v1.2.1