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
eb948b89
Commit
eb948b89
authored
4 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
update ci-cd
parent
7f3ec86e
No related branches found
No related tags found
1 merge request
!36
update ci-cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+23
-41
23 additions, 41 deletions
.gitlab-ci.yml
with
23 additions
and
41 deletions
.gitlab-ci.yml
+
23
−
41
View file @
eb948b89
...
@@ -13,6 +13,7 @@ variables:
...
@@ -13,6 +13,7 @@ variables:
DATA_CONUS_2018A
:
conus-2018a
DATA_CONUS_2018A
:
conus-2018a
stages
:
stages
:
-
assemble
-
test
-
test
-
publish
-
publish
-
deploy
-
deploy
...
@@ -61,7 +62,6 @@ stages:
...
@@ -61,7 +62,6 @@ stages:
cache
:
{}
cache
:
{}
image
:
${CODE_REGISTRY}/ghsc/hazdev/cloud-formation/hazdev-build-runner:latest
image
:
${CODE_REGISTRY}/ghsc/hazdev/cloud-formation/hazdev-build-runner:latest
dependencies
:
dependencies
:
retry
:
2
before_script
:
before_script
:
-
docker stack rm nshmp-netcdf
-
docker stack rm nshmp-netcdf
-
*static-data
-
*static-data
...
@@ -87,6 +87,9 @@ stages:
...
@@ -87,6 +87,9 @@ stages:
variables
:
variables
:
APP_NAME
:
nshmp-netcdf
APP_NAME
:
nshmp-netcdf
STACK_NAME
:
nshmp-netcdf
STACK_NAME
:
nshmp-netcdf
retry
:
max
:
2
when
:
'
always'
.staging
:
.staging
:
only
:
only
:
...
@@ -102,41 +105,23 @@ stages:
...
@@ -102,41 +105,23 @@ stages:
-
staging02
-
staging02
####
####
# Build jar file.
# Stage: assemble
# Globals:
# (string) CI_PROJECT_NAME - The name of the project
####
####
Build Project
:
extends
:
-
.gradle
script
:
-
./gradlew --no-daemon assemble
####
Build Project
:
# Run Spotless check.
####
Spotless Check
:
extends
:
extends
:
-
.gradle
-
.gradle
stage
:
assemble
script
:
script
:
-
./gradlew --no-daemon spotlessCheck
-
./gradlew --build-cache --no-daemon assemble
retry
:
max
:
2
when
:
'
always'
####
####
#
Run Spotbugs main.
#
Stage: test
####
####
Spotbugs Main
:
extends
:
-
.gradle
script
:
-
./gradlew --no-daemon spotbugsMain
####
# Run tests.
# Globals:
# (string) JACOCO_HTML_DIR - Directory of Jacoco html reports
# (string) JUNIT_FILES - Path to all Junit html files
# (string) CI_PROJECT_NAME - The name of the project
####
Unit Tests
:
Unit Tests
:
stage
:
test
stage
:
test
image
:
gradle:jdk11
image
:
gradle:jdk11
...
@@ -154,12 +139,10 @@ Unit Tests:
...
@@ -154,12 +139,10 @@ Unit Tests:
-
${REPORTS_DIR}
-
${REPORTS_DIR}
reports
:
reports
:
junit
:
${JUNIT_FILES}
junit
:
${JUNIT_FILES}
retry
:
max
:
2
when
:
'
always'
####
# Build Docker image.
# Globals:
# IMAGE_NAME - Docker image name
####
Build Image
:
Build Image
:
stage
:
test
stage
:
test
image
:
docker:stable-git
image
:
docker:stable-git
...
@@ -176,12 +159,10 @@ Build Image:
...
@@ -176,12 +159,10 @@ Build Image:
--build-arg git_username="${GIT_NSHMP_USERNAME}" \
--build-arg git_username="${GIT_NSHMP_USERNAME}" \
--build-arg git_password="${GIT_NSHMP_PASSWORD}" \
--build-arg git_password="${GIT_NSHMP_PASSWORD}" \
-t local/${IMAGE_NAME} .
-t local/${IMAGE_NAME} .
retry
:
max
:
2
when
:
'
always'
####
# Build and publish Docker images with data from AWS S3.
# Globals:
# IMAGE_NAME - Docker image name
####
Build/Publish Data Images
:
Build/Publish Data Images
:
stage
:
publish
stage
:
publish
image
:
docker:stable-git
image
:
docker:stable-git
...
@@ -212,19 +193,20 @@ Build/Publish Data Images:
...
@@ -212,19 +193,20 @@ Build/Publish Data Images:
docker image rm ${INTERNAL_IMAGE_NAME};
docker image rm ${INTERNAL_IMAGE_NAME};
done
done
-
rm -rf /root/.docker/config.json
-
rm -rf /root/.docker/config.json
retry
:
max
:
2
when
:
'
always'
####
####
#
Deploy to stage01
#
Stage: deploy
####
####
Staging 01
:
Staging 01
:
extends
:
extends
:
-
.deploy
-
.deploy
-
.staging
-
.staging
-
.staging01
-
.staging01
####
# Deploy to stage02
####
Staging 02
:
Staging 02
:
extends
:
extends
:
-
.deploy
-
.deploy
...
...
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