From bf777b876f162b748c33ed11cd27dfa8a19742ac Mon Sep 17 00:00:00 2001
From: handreas <andreas.hamacher@monash.edu>
Date: Wed, 11 Mar 2020 09:54:22 +0000
Subject: [PATCH] making cross-repo testing smarter

Former-commit-id: 4542b5ce27fca8a5fc3dc5474c9b573c262f04b4
---
 .gitlab-ci.yml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9a2e4710..24b4dcbd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,26 +13,26 @@ stages:
   - ansible_create_cluster_stage
   - push_button_spawn_cluster
   - tests
-  - integration_test_downstream
+  - integration_test #https://docs.gitlab.com/ee/ci/triggers/
   - clean
   
  
 trigger_pipeline_in_Clusterbuild:
-  stage: integration_test_downstream
+  stage: integration_test
   tags: 
   - ansible
   script:
   - echo ${CI_JOB_TOKEN}
-  - "curl --request POST --form token=${CI_JOB_TOKEN} --form ref=aciab_upstream https://gitlab.erc.monash.edu.au/api/v4/projects/193/trigger/pipeline"  # ID is from clusterbuild
+  - curl --request POST --form token=${CI_JOB_TOKEN} --form "variables[TRIGGER_CI_COMMIT_SHA]=${CI_COMMIT_SHA}" --form ref=aciab_upstream https://gitlab.erc.monash.edu.au/api/v4/projects/193/trigger/pipeline  # ID is from clusterbuild
 
 
 trigger_pipeline_in_monarch:
-  stage: integration_test_downstream
+  stage: integration_test
   tags: 
   - ansible
   script:
   - echo ${CI_JOB_TOKEN}
-  - "curl --request POST --form token=${CI_JOB_TOKEN} --form ref=cicd https://gitlab.erc.monash.edu.au/api/v4/projects/385/trigger/pipeline"  # ID is from monarch
+  - curl --request POST --form token=${CI_JOB_TOKEN} --form "variables[TRIGGER_CI_COMMIT_SHA]=${CI_COMMIT_SHA}" --form ref=cicd https://gitlab.erc.monash.edu.au/api/v4/projects/385/trigger/pipeline  # ID is from monarch
 
 
 yamllint:
-- 
GitLab