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
e26698d3
Commit
e26698d3
authored
4 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
add init stage and tasks
parent
d5b5897f
No related branches found
No related tags found
1 merge request
!511
Node and Pipeline
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+84
-44
84 additions, 44 deletions
.gitlab-ci.yml
.gitlab/Dockerfile
+0
-12
0 additions, 12 deletions
.gitlab/Dockerfile
with
84 additions
and
56 deletions
.gitlab-ci.yml
+
84
−
44
View file @
e26698d3
variables
:
variables
:
GRADLE_USER_HOME
:
${CI_PROJECT_DIR}/tmp/.gradle
IMAGE_NAME
:
${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}
IMAGE_NAME
:
${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}
JACOCO_HTML_DIR
:
build/reports/jacoco/test/html
JACOCO_HTML_DIR
:
build/reports/jacoco/test/html
JUNIT_FILES
:
build/test-results/test/TEST-*.xml
JUNIT_FILES
:
build/test-results/test/TEST-*.xml
...
@@ -9,10 +10,16 @@ include:
...
@@ -9,10 +10,16 @@ include:
file
:
'
templates/library.yml'
file
:
'
templates/library.yml'
stages
:
stages
:
-
i
mage
-
i
nit
-
build
-
build
-
publish
-
publish
# Do not run for merge requests
workflow
:
rules
:
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_BRANCH
####
####
# Templates
# Templates
####
####
...
@@ -40,36 +47,56 @@ stages:
...
@@ -40,36 +47,56 @@ stages:
IMAGE_NAME
:
${CI_PROJECT_NAME}
IMAGE_NAME
:
${CI_PROJECT_NAME}
####
####
# Stage: i
mage
# Stage: i
nit
####
####
Image
:
Init
:
artifacts
:
paths
:
-
'
${GRADLE_USER_HOME}'
extends
:
extends
:
-
.dind
-
.gradle
script
:
-
./gradlew dependencies
stage
:
init
####
# Stage: build
####
Build Image Haz
:
extends
:
-
.docker-build
variables
:
IMAGE_NAME
:
nshmp-haz
Build Image WS
:
extends
:
-
.docker-build
variables
:
IMAGE_NAME
:
nshmp-haz-ws
DOCKERFILE
:
ws.Dockerfile
Build Lambda
:
artifacts
:
expire_in
:
1 yr
paths
:
-
build/libs/nshmp-haz-v2.jar
-
build/libs/nshmp-haz-dependencies.zip
extends
:
-
.gradle
rules
:
rules
:
-
-
changes
:
changes
:
-
.gitlab/Dockerfile
-
'
src/**'
-
'
*gradle*'
when
:
on_success
when
:
on_success
-
-
allow_failure
:
true
allow_failure
:
true
when
:
manual
when
:
manual
script
:
script
:
-
|
-
./gradlew assemble
docker build \
-
./gradlew libs
--build-arg FROM_IMAGE=${DEVOPS_REGISTRY}usgs/node:12 \
--file ".gitlab/Dockerfile" \
--pull \
--tag ${IMAGE_NAME} \
.
-
docker push ${IMAGE_NAME}
stage
:
image
tags
:
-
build
####
# Stage: build
####
Build Project
:
Build Project
:
extends
:
extends
:
...
@@ -77,7 +104,8 @@ Build Project:
...
@@ -77,7 +104,8 @@ Build Project:
rules
:
rules
:
-
-
changes
:
changes
:
-
'
**/*.java'
-
'
src/**'
-
'
*gradle*'
when
:
on_success
when
:
on_success
-
-
allow_failure
:
true
allow_failure
:
true
...
@@ -85,25 +113,49 @@ Build Project:
...
@@ -85,25 +113,49 @@ Build Project:
script
:
script
:
-
./gradlew assemble
-
./gradlew assemble
Build Lambda
:
Markdown Lint
:
artifacts
:
expire_in
:
1 yr
paths
:
-
build/libs/nshmp-haz-v2.jar
-
build/libs/nshmp-haz-dependencies.zip
extends
:
extends
:
-
.gradle
-
.gradle
rules
:
rules
:
-
-
changes
:
changes
:
-
'
**/*.
java
'
-
'
**/*.
md
'
when
:
on_success
when
:
on_success
-
-
allow_failure
:
true
allow_failure
:
true
when
:
manual
when
:
manual
script
:
script
:
-
./gradlew assemble
-
./gradlew markdownlint;
-
./gradlew libs
Spotbugs Main
:
extends
:
-
.gradle
rules
:
-
changes
:
-
'
src/**'
-
'
*gradle*'
when
:
on_success
-
allow_failure
:
true
when
:
manual
script
:
-
./gradlew spotbugsMain;
Spotbugs Test
:
extends
:
-
.gradle
rules
:
-
changes
:
-
'
src/**'
-
'
*gradle*'
when
:
on_success
-
allow_failure
:
true
when
:
manual
script
:
-
./gradlew spotbugsTest;
Unit Tests
:
Unit Tests
:
artifacts
:
artifacts
:
...
@@ -117,7 +169,8 @@ Unit Tests:
...
@@ -117,7 +169,8 @@ Unit Tests:
rules
:
rules
:
-
-
changes
:
changes
:
-
'
**/*.java'
-
'
src/**'
-
'
*gradle*'
when
:
on_success
when
:
on_success
-
-
allow_failure
:
true
allow_failure
:
true
...
@@ -126,19 +179,6 @@ Unit Tests:
...
@@ -126,19 +179,6 @@ Unit Tests:
-
./gradlew check
-
./gradlew check
-
cat ${JACOCO_HTML_DIR}/index.html
-
cat ${JACOCO_HTML_DIR}/index.html
Build Haz Image
:
extends
:
-
.docker-build
variables
:
IMAGE_NAME
:
nshmp-haz
Build WS Image
:
extends
:
-
.docker-build
variables
:
IMAGE_NAME
:
nshmp-haz-ws
DOCKERFILE
:
ws.Dockerfile
####
####
# Stage: Publish
# Stage: Publish
####
####
...
...
This diff is collapsed.
Click to expand it.
.gitlab/Dockerfile
deleted
100644 → 0
+
0
−
12
View file @
d5b5897f
ARG
FROM_IMAGE=usgs/node:12
FROM
${FROM_IMAGE}
ENV
LANG="en_US.UTF-8"
USER
root
RUN
yum
install
-y
git glibc-langpack-en java-11-openjdk-devel which
\
&&
yum clean all
USER
usgs-user
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