Fixed build

This commit is contained in:
Zakary Timson 2022-09-22 21:28:10 -04:00
parent a8e4b4371b
commit 128e0aec07

View File

@ -1,11 +1,5 @@
image: node:16 image: node:16
stages:
- build
- test
- publish
- deploy
npm: npm:
stage: build stage: build
artifacts: artifacts:
@ -52,7 +46,7 @@ audit:
- if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_BRANCH
registry: registry:
stage: publish stage: deploy
image: docker image: docker
cache: cache:
- key: $CI_PIPELINE_ID - key: $CI_PIPELINE_ID
@ -69,13 +63,13 @@ registry:
- if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_BRANCH
tag: tag:
stage: publish stage: deploy
image: image:
name: alpine/git name: alpine/git
entrypoint: [ "" ] entrypoint: [ "" ]
cache: [ ] cache: [ ]
before_script: before_script:
- git remote set-url origin http://gitlab-ci-token:$DEPLOY_TOKEN@gitlab.zakscode.com/$CI_PROJECT_PATH.git - git remote set-url origin "https://Tagger:$DEPLOY_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git"
script: script:
- VERSION=$(cat package.json | grep version | grep -Eo ':.+' | grep -Eo '[[:alnum:]\.\/\-]+') - VERSION=$(cat package.json | grep version | grep -Eo ':.+' | grep -Eo '[[:alnum:]\.\/\-]+')
- git tag -f $VERSION $CI_COMMIT_SHA - git tag -f $VERSION $CI_COMMIT_SHA
@ -83,15 +77,3 @@ tag:
rules: rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
allow_failure: true allow_failure: true
production:
stage: deploy
image: node:16
cache: [ ]
script:
- curl -X POST https://portainer.zakscode.com/api/webhooks/9fcc5dce-a884-4063-8666-34c0acf0aec5
environment:
name: Production
url: https://legioxxx.zakscode.com
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_DEPLOY_FREEZE == null'