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

update trigger, remove deploy

parent acce7c7d
No related branches found
No related tags found
1 merge request!64Update Deployment
...@@ -19,54 +19,14 @@ include: ...@@ -19,54 +19,14 @@ include:
stages: stages:
- init - init
- build - build
- deploy
- trigger - trigger
####
# Template: Common Gradle test
####
.gradle: .gradle:
image: ${DEVOPS_REGISTRY}usgs/java:11-jdk image: ${DEVOPS_REGISTRY}usgs/java:11-jdk
stage: build stage: build
tags: tags:
- development - development
.templates:
adjust-ref: &adjust-ref |
if [[ \
${CI_COMMIT_REF_SLUG} == "master" || \
${CI_COMMIT_REF_SLUG} == "production" || \
-n "${CI_COMMIT_TAG}" \
]]; then
CI_COMMIT_REF_SLUG="latest";
fi
####
# Template: Deploy to Docker Swarm
####
.deploy:
cache: {}
image: ${CODE_REGISTRY}/ghsc/hazdev/cloud-formation/hazdev-build-runner:latest
dependencies:
script:
- docker stack rm nshmp-netcdf
stage: deploy
tags:
- deploy
- swarm
variables:
APP_NAME: nshmp-netcdf
STACK_NAME: nshmp-netcdf
.staging01:
tags:
- staging01
.staging02:
tags:
- staging02
#### ####
# Stage: init # Stage: init
#### ####
...@@ -174,22 +134,6 @@ YAML Lint: ...@@ -174,22 +134,6 @@ YAML Lint:
- ./gradlew yamllint; - ./gradlew yamllint;
stage: build stage: build
####
# Stage: deploy
####
Staging 01:
extends:
- .deploy
- .staging01
needs: []
Staging 02:
extends:
- .deploy
- .staging02
needs: []
#### ####
# Stage: trigger # Stage: trigger
#### ####
...@@ -204,21 +148,22 @@ Trigger nshmp-webapps: ...@@ -204,21 +148,22 @@ Trigger nshmp-webapps:
when: manual when: manual
- !reference [.staging-env] - !reference [.staging-env]
- !reference [.production-env] - !reference [.production-env]
parallel:
matrix:
- REGION: us-west-2
script: script:
- apk add curl - apk add curl
- | - |
curl --request POST \ if [ "${ENVIRONMENT}" == 'production' ]; then
REF="production";
fi
- |
curl --request POST \
--form token=${NSHMP_WEBAPPS_CDK_TRIGGER_TOKEN} \ --form token=${NSHMP_WEBAPPS_CDK_TRIGGER_TOKEN} \
--form ref=main \ --form ref=${REF} \
--form description="Triggered by nshmp-netcdf" \ --form "variables[description]=Triggered by nshmp-netcdf" \
--form "variables[CDK_DEPLOY_REGION]=${REGION}" \
--form "variables[ENVIRONMENT]=${ENVIRONMENT}" \ --form "variables[ENVIRONMENT]=${ENVIRONMENT}" \
--form "variables[IMAGE]=${IMAGE_NAME}" \ --form "variables[NSHMP_APPS_IMAGE]=${IMAGE_NAME}" \
--form "variables[STACK_NAME]=nshmp-netcdf-conus-2018a" \ --form "variables[TRIGGER_PASSCODE]=${NSHMP_WEBAPPS_CDK_TRIGGER_TOKEN}" \
"https://code.chs.usgs.gov/api/v4/projects/${NSHMP_WEBAPPS_CDK_PROJECT_ID}/trigger/pipeline" "https://${PRIVATE_GITLAB}/api/v4/projects/${NSHMP_WEBAPPS_CDK_PROJECT_ID}/trigger/pipeline"
stage: trigger stage: trigger
variables: variables:
REF: main
UPSTREAM_PATH: ghsc/nshmp/nshmp-netcdf UPSTREAM_PATH: ghsc/nshmp/nshmp-netcdf
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