Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-ws-static
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-ws-static
Commits
0dc57d9b
Commit
0dc57d9b
authored
3 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
add trigger
parent
c19dffa5
No related branches found
No related tags found
1 merge request
!63
add upstream path
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+47
-2
47 additions, 2 deletions
.gitlab-ci.yml
with
47 additions
and
2 deletions
.gitlab-ci.yml
+
47
−
2
View file @
0dc57d9b
variables
:
variables
:
DATA_CONUS_2018A
:
conus-2018a
DATA_CONUS_2018A
:
conus-2018a
DATA_URL
:
${S3_BUCKET}/nshmp_2018a_v1.1-CONUS-hazards-with-preliminary-PGV-fv0.3-1x1.nc
DATA_URL
:
${S3_BUCKET}/nshmp_2018a_v1.1-CONUS-hazards-with-preliminary-PGV-fv0.3-1x1.nc
IMAGE_NAME
:
${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA}
# TODO: Remove hard coded url
# TODO: Remove hard coded url
S3_BUCKET
:
https://nshmp-netcdf-lp-development-rbucket-1of3d1x45yfd9.s3-us-west-2.amazonaws.com
S3_BUCKET
:
https://nshmp-netcdf-lp-development-rbucket-1of3d1x45yfd9.s3-us-west-2.amazonaws.com
UPSTREAM_PATH
:
ghsc/nshmp/nshmp-netcdf
# Do not run for merge requests
# Do not run for merge requests
...
@@ -20,6 +22,7 @@ stages:
...
@@ -20,6 +22,7 @@ stages:
-
init
-
init
-
build
-
build
-
deploy
-
deploy
-
trigger
####
####
# Template: Common Gradle test
# Template: Common Gradle test
...
@@ -31,7 +34,6 @@ stages:
...
@@ -31,7 +34,6 @@ stages:
tags
:
tags
:
-
development
-
development
.templates
:
.templates
:
adjust-ref
:
&adjust-ref
|
adjust-ref
:
&adjust-ref
|
if [[ \
if [[ \
...
@@ -105,7 +107,6 @@ Build Image 2018:
...
@@ -105,7 +107,6 @@ Build Image 2018:
FROM_IMAGE=${DEVOPS_REGISTRY}usgs/java:11
FROM_IMAGE=${DEVOPS_REGISTRY}usgs/java:11
ci_job_token=${CI_JOB_TOKEN}
ci_job_token=${CI_JOB_TOKEN}
netcdf_file=DATA/data.nc
netcdf_file=DATA/data.nc
UPSTREAM_PATH
:
ghsc/nshmp/nshmp-netcdf
Build Project
:
Build Project
:
extends
:
extends
:
...
@@ -134,6 +135,8 @@ Unit Tests:
...
@@ -134,6 +135,8 @@ Unit Tests:
coverage
:
'
/Total.*?([0-9]{1,3})%/'
coverage
:
'
/Total.*?([0-9]{1,3})%/'
extends
:
extends
:
-
.gradle
-
.gradle
needs
:
-
Init
rules
:
rules
:
-
-
changes
:
changes
:
...
@@ -153,6 +156,8 @@ Unit Tests:
...
@@ -153,6 +156,8 @@ Unit Tests:
Markdown Lint
:
Markdown Lint
:
extends
:
extends
:
-
.gradle
-
.gradle
needs
:
-
Init
rules
:
rules
:
-
-
changes
:
changes
:
...
@@ -169,6 +174,8 @@ Markdown Lint:
...
@@ -169,6 +174,8 @@ Markdown Lint:
YAML Lint
:
YAML Lint
:
extends
:
extends
:
-
.gradle
-
.gradle
needs
:
-
Init
rules
:
rules
:
-
-
changes
:
changes
:
...
@@ -190,9 +197,47 @@ Staging 01:
...
@@ -190,9 +197,47 @@ Staging 01:
-
.deploy
-
.deploy
-
.onprem-staging
-
.onprem-staging
-
.staging01
-
.staging01
needs
:
-
Build Image
2018
-
Build Project
-
Init
-
Markdown Lint
-
Unit Tests
-
YAML Lint
# Staging 02:
# Staging 02:
# extends:
# extends:
# - .deploy
# - .deploy
# - .onprem-staging
# - .onprem-staging
# - .staging02
# - .staging02
####
# 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
]
parallel
:
matrix
:
-
REGION
:
us-west-2
script
:
-
apk add curl
-
|
curl --request POST \
--form token=${IAC_TRIGGER_TOKEN} \
--form ref=main \
--form description="Triggered by nshmp-netcdf" \
--form "variables[CDK_DEPLOY_REGION]=${REGION}" \
--form "variables[ENVIRONMENT]=${ENVIRONMENT}" \
--form "variables[IMAGE]=${IMAGE_NAME}" \
--form "variables[STACK_NAME]=nshmp-netcdf-conus-2018a" \
"https://code.chs.usgs.gov/api/v4/projects/${IAC_PROJECT_ID}/trigger/pipeline"
stage
:
trigger
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment