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

add pipeline

parent bd608012
No related branches found
No related tags found
1 merge request!18Resolves - Provisional Release Setup
......@@ -2,12 +2,22 @@ variables:
GITLAB_TOKEN: '${CI_JOB_TOKEN}'
NODE_IMAGE_NAME: ${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_SLUG}--node
# Do not run for merge requests
workflow:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
stages:
- init
- node-image
- build
- publish
default:
tags:
- nshmp
####
# Stage: init
####
......@@ -50,27 +60,31 @@ Build Node Image:
# Stage: Build
####
.node:
Audit:
allow_failure: true
extends:
- .node
needs: []
script:
- npm audit
Build Angular:
image: ${DEVOPS_REGISTRY}usgs/node:16
needs:
- Init
stage: build
tags:
- development
Build Angular:
extends:
- .node
script:
- cd example
- npm i
- npm run build
stage: build
Lint Project:
extends:
- .node
image: ${DEVOPS_REGISTRY}usgs/node:16
needs:
- Init
script:
- npm run lint
stage: build
####
# Stage: Publish
......@@ -80,6 +94,11 @@ Publish npm:
image: ${NODE_IMAGE_NAME}
only:
- tags
needs:
- Audit
- Init
- Build Angular
- Lint Project
script:
- git config user.email "${GITLAB_USER_EMAIL}"
- git config user.name "${GITLAB_USER_NAME}"
......@@ -91,5 +110,3 @@ Publish npm:
- npx standard-version --release-as ${CI_COMMIT_TAG} --skip.commit --skip.changelog
- npm publish --access public
stage: publish
tags:
- development
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