Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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-haz
Commits
700901a7
Commit
700901a7
authored
2 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
Add pipelines
parent
bd995d23
No related branches found
No related tags found
1 merge request
!695
Resolves - Legacy: Add CI/CD Pipeline
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+44
-1
44 additions, 1 deletion
.gitlab-ci.yml
with
44 additions
and
1 deletion
.gitlab-ci.yml
+
44
−
1
View file @
700901a7
variables
:
CI_DEFAULT_BRANCH
:
legacy-main
CI_PROJECT_NAME
:
nshmp-haz-legacy
JACOCO_HTML_DIR
:
${REPORTS_DIR}/jacoco/test/html
JUNIT_FILES
:
build/test-results/test*/TEST-*.xml
PRODUCTION_BRANCH
:
legacy-production
UPSTREAM_PATH
:
ghsc/nshmp/nshmp-haz
...
...
@@ -12,6 +14,11 @@ workflow:
stages
:
-
build
-
test
default
:
tags
:
-
nshmp
####
# Environment Templates
...
...
@@ -53,6 +60,17 @@ stages:
variables
:
ENVIRONMENT
:
production
####
# Java Templates
####
##
# General Java setup
##
.java
:
image
:
${DEVOPS_REGISTRY}usgs/amazoncorretto:8
####
# Docker Templates
####
...
...
@@ -125,7 +143,6 @@ stages:
stage
:
build
tags
:
-
build
variables
:
####
# Stage: build
...
...
@@ -140,3 +157,29 @@ Build Image:
FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:8
DOCKERFILE
:
Dockerfile
IMAGE_TAG
:
${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA}
Build Project
:
extends
:
-
.java
script
:
-
./gradlew assemble
stage
:
build
####
# Stage: test
####
Unit Tests
:
artifacts
:
paths
:
-
${JACOCO_HTML_DIR}
reports
:
junit
:
${JUNIT_FILES}
coverage
:
'
/Total.*?([0-9]{1,3})%/'
extends
:
-
.java
needs
:
[]
script
:
-
./gradlew check
-
cat ${JACOCO_HTML_DIR}/index.html
stage
:
test
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