From 3b6ce6c1427115d7b2ac1666cb389079f303b1cb Mon Sep 17 00:00:00 2001 From: Scott Charlton Date: Sat, 18 Jan 2020 23:27:37 -0700 Subject: [PATCH 1/3] Added .gitlab-ci.yml --- .gitlab-ci.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..6c7d5573 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,45 @@ +# +# https://code.chs.usgs.gov/coupled/subtrees/phreeqc3-src-common +# +image: buildpack-deps:bionic-scm + +stages: + - trigger + +before_script: + - eval $(ssh-agent -s) + - echo "${SSH_PRIVATE_KEY_ENC}" | base64 --decode | tr -d '\r' | ssh-add - + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan ${CI_SERVER_HOST} >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - git config --global user.email "darth@empire.com" + - git config --global user.name "Darth Vader" + +trigger-downstream: + stage: trigger + ## + ## Only run if on the master branch and the variable GROUP is set + ## + ## change this to + ## only: + ## - master@$GROUP/subtrees/phreeqc3-src-common + ## and set GROUP to coupled before merge + only: + refs: + - master + variables: + - $GROUP + + ## Downstream Projects + ## triggers and ids are stored at the group level + ## phreeqc3-src https://code.chs.usgs.gov/coupled/subtrees/phreeqc3-src + ## wphast https://code.chs.usgs.gov/coupled/wphast + script: + - echo triggering phreeqc3-src + - curl -X POST -F token=${PHREEQC3_SRC_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${PHREEQC3_SRC_ID}/trigger/pipeline + - echo triggering wphast + - curl -X POST -F token=${WPHAST_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${WPHAST_ID}/trigger/pipeline + + ## Upstream Projects + ## none From 49a74a6ac3c19e3eaf373e892783479fa7f7c614 Mon Sep 17 00:00:00 2001 From: Scott Charlton Date: Mon, 27 Jan 2020 14:36:36 -0700 Subject: [PATCH 2/3] [phreeqc3] Testing subtree merges --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c7d5573..08652c3c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ # # https://code.chs.usgs.gov/coupled/subtrees/phreeqc3-src-common +# SRC 2020-01-27T14:33:39-07:00 # image: buildpack-deps:bionic-scm From aec6f90be9196833cb01afba343305ead0af8fac Mon Sep 17 00:00:00 2001 From: Scott Charlton Date: Mon, 27 Jan 2020 14:36:36 -0700 Subject: [PATCH 3/3] [phreeqc3] Testing subtree merges --- .gitlab-ci.yml | 1 + common/.gitlab-ci.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1e8f4d3..239d05ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ # # https://code.chs.usgs.gov/coupled/subtrees/phreeqc3-src +# SRC 2020-01-27T14:33:39-07:00 # image: buildpack-deps:bionic-scm diff --git a/common/.gitlab-ci.yml b/common/.gitlab-ci.yml index 6c7d5573..08652c3c 100644 --- a/common/.gitlab-ci.yml +++ b/common/.gitlab-ci.yml @@ -1,5 +1,6 @@ # # https://code.chs.usgs.gov/coupled/subtrees/phreeqc3-src-common +# SRC 2020-01-27T14:33:39-07:00 # image: buildpack-deps:bionic-scm