From 9a906aa734148ac4d87c33e4eb4e87ae54759de9 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 25 Mar 2021 10:26:33 -0600 Subject: [PATCH] add trigger --- .gitlab-ci.yml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9feeb65da..2c124d418 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -198,10 +198,16 @@ Unit Tests: # Stage: Publish #### -Trigger AWS nshmp-haz: +Trigger nshmp-haz CDK: rules: - - if: '$CI_PROJECT_NAMESPACE == "ghsc/nshmp" && $CI_COMMIT_TAG' + if: > + $CI_PROJECT_PATH == 'ghsc/nshmp' + && ( + $CI_COMMIT_BRANCH == 'master' + || $CI_COMMIT_BRANCH == 'production' + || ( $CI_COMMIT_TAG && $CI_COMMIT_TAG != '' ) + ) changes: - 'src/main/java/gov/usgs/earthquake/nshmp/aws/**/*.java' - 'gradle/dependencies.gradle' @@ -209,7 +215,26 @@ Trigger AWS nshmp-haz: - apk add curl - | curl -X POST \ - -F token=${NSHMP_DEPLOY_TRIGGER_TOKEN} \ + -F token=${NSHMP_HAZ_CDK_TRIGGER_TOKEN} \ -F ref=master \ https://code.chs.usgs.gov/api/v4/projects/5047/trigger/pipeline stage: publish + +Trigger nshmp-haz-ws CDK: + rules: + - + if: > + $CI_PROJECT_PATH == 'ghsc/nshmp' + && ( + $CI_COMMIT_BRANCH == 'master' + || $CI_COMMIT_BRANCH == 'production' + || ( $CI_COMMIT_TAG && $CI_COMMIT_TAG != '' ) + ) + script: + - apk add curl + - | + curl -X POST \ + -F token=${NSHMP_HAZ_WS_CDK_TRIGGER_TOKEN} \ + -F ref=master \ + https://code.chs.usgs.gov/api/v4/projects/6614/trigger/pipeline + stage: publish -- GitLab