Skip to content
Snippets Groups Projects
Commit f895a906 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

add trigger

parent 883cbecd
No related branches found
No related tags found
1 merge request!182Resolves: Javadocs
variables:
IMAGE_NAME: ${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA}
include: include:
- project: 'ghsc/nshmp/nshmp-pipeline-templates' - project: 'ghsc/nshmp/nshmp-pipeline-templates'
ref: 'main' ref: 'main'
...@@ -7,6 +10,7 @@ stages: ...@@ -7,6 +10,7 @@ stages:
- init - init
- build - build
- publish - publish
- trigger
# Do not run for merge requests # Do not run for merge requests
workflow: workflow:
...@@ -136,3 +140,37 @@ Publish: ...@@ -136,3 +140,37 @@ Publish:
script: script:
- ./gradlew publish -P version=${CI_COMMIT_TAG} - ./gradlew publish -P version=${CI_COMMIT_TAG}
stage: publish stage: publish
####
# Stage: trigger
####
Trigger nshmp-webapps:
needs:
- Build Image
rules:
- if: !reference [.development-env, if]
variables: !reference [.development-env, variables]
when: manual
- !reference [.staging-env]
- !reference [.production-env]
script:
- apk add curl
- |
if [ "${ENVIRONMENT}" == 'production' ]; then
REF="production";
fi
- |
curl --request POST \
--form token=${NSHMP_WEBAPPS_CDK_TRIGGER_TOKEN} \
--form ref=${REF} \
--form "variables[description]=Triggered by nshmp-lib" \
--form "variables[ENVIRONMENT]=${ENVIRONMENT}" \
--form "variables[NSHMP_APPS_IMAGE]=${IMAGE_NAME}" \
--form "variables[TRIGGER_PASSCODE]=${NSHMP_WEBAPPS_CDK_TRIGGER_TOKEN}" \
"https://${PRIVATE_GITLAB}/api/v4/projects/${NSHMP_WEBAPPS_CDK_PROJECT_ID}/trigger/pipeline"
stage: trigger
variables:
REF: main
UPSTREAM_PATH: ghsc/nshmp/nshmp-lib
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment