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

update pipeline

parent fdde81a5
No related branches found
No related tags found
1 merge request!182Resolves: Javadocs
#### include:
# GitLab ci-cd pipline for nshmp-lib - project: 'ghsc/nshmp/nshmp-pipeline-templates'
#### ref: 'main'
file: 'templates/library.yml'
variables:
JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html
JUNIT_FILES: build/test-results/test/TEST-*.xml
REPORTS_DIR: build/reports
stages: stages:
- test - init
- build
- publish - publish
# Do not run for merge requests # Do not run for merge requests
...@@ -17,21 +14,37 @@ workflow: ...@@ -17,21 +14,37 @@ workflow:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_BRANCH
.tags: .gradle:
image: ${DEVOPS_REGISTRY}usgs/java:11-jdk
tags: tags:
- development - development
.gradle: ####
image: ${DEVOPS_REGISTRY}usgs/java:11-jdk # Stage: init
####
Init:
extends:
- .gradle-init
#### ####
# Stage: test # Stage: test
#### ####
Build Image:
extends:
- .docker-build
variables:
DOCKER_BUILD_ARGS: |
BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/java:11-jdk
FROM_IMAGE=${DEVOPS_REGISTRY}usgs/nginx:latest
UPSTREAM_PATH: ghsc/nshmp/nshmp-lib
Build Project: Build Project:
extends: extends:
- .gradle - .gradle
- .tags needs:
- Init
rules: rules:
- -
changes: changes:
...@@ -43,12 +56,13 @@ Build Project: ...@@ -43,12 +56,13 @@ Build Project:
when: manual when: manual
script: script:
- ./gradlew assemble; - ./gradlew assemble;
stage: test stage: build
Markdown Lint: Markdown Lint:
extends: extends:
- .gradle - .gradle
- .tags needs:
- Init
rules: rules:
- -
changes: changes:
...@@ -59,58 +73,7 @@ Markdown Lint: ...@@ -59,58 +73,7 @@ Markdown Lint:
when: manual when: manual
script: script:
- ./gradlew markdownlint; - ./gradlew markdownlint;
stage: test stage: build
Spotless Check:
extends:
- .gradle
- .tags
rules:
-
changes:
- 'src/**'
- '*gradle*'
when: on_success
-
allow_failure: true
when: manual
script:
- ./gradlew spotlessCheck;
stage: test
Spotbugs Main:
extends:
- .gradle
- .tags
rules:
-
changes:
- 'src/**'
- '*gradle*'
when: on_success
-
allow_failure: true
when: manual
script:
- ./gradlew spotbugsMain;
stage: test
Spotbugs Test:
extends:
- .gradle
- .tags
rules:
-
changes:
- 'src/**'
- '*gradle*'
when: on_success
-
allow_failure: true
when: manual
script:
- ./gradlew spotbugsTest;
stage: test
Unit Tests: Unit Tests:
artifacts: artifacts:
...@@ -121,7 +84,8 @@ Unit Tests: ...@@ -121,7 +84,8 @@ Unit Tests:
coverage: '/Total.*?([0-9]{1,3})%/' coverage: '/Total.*?([0-9]{1,3})%/'
extends: extends:
- .gradle - .gradle
- .tags needs:
- Init
rules: rules:
- -
changes: changes:
...@@ -134,12 +98,13 @@ Unit Tests: ...@@ -134,12 +98,13 @@ Unit Tests:
script: script:
- ./gradlew check; - ./gradlew check;
- cat ${JACOCO_HTML_DIR}/index.html; - cat ${JACOCO_HTML_DIR}/index.html;
stage: test stage: build
YAML Lint: YAML Lint:
extends: extends:
- .gradle - .gradle
- .tags needs:
- Init
rules: rules:
- -
changes: changes:
...@@ -150,7 +115,7 @@ YAML Lint: ...@@ -150,7 +115,7 @@ YAML Lint:
when: manual when: manual
script: script:
- ./gradlew yamllint; - ./gradlew yamllint;
stage: test stage: build
#### ####
# Stage: publish # Stage: publish
...@@ -158,8 +123,14 @@ YAML Lint: ...@@ -158,8 +123,14 @@ YAML Lint:
Publish: Publish:
extends: extends:
- .tags
- .gradle - .gradle
needs:
- Init
- Build Image
- Build Project
- Markdown Lint
- Unit Tests
- YAML Lint
only: only:
- tags@ghsc/nshmp/nshmp-lib - tags@ghsc/nshmp/nshmp-lib
script: script:
......
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