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
stages:
- build
- test
- publish
- deploy
npm:
stage: build
artifacts:
@ -52,7 +46,7 @@ audit:
- if: $CI_COMMIT_BRANCH
registry:
stage: publish
stage: deploy
image: docker
cache:
- key: $CI_PIPELINE_ID
@ -69,13 +63,13 @@ registry:
- if: $CI_COMMIT_BRANCH
tag:
stage: publish
stage: deploy
image:
name: alpine/git
entrypoint: [ "" ]
cache: [ ]
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:
- VERSION=$(cat package.json | grep version | grep -Eo ':.+' | grep -Eo '[[:alnum:]\.\/\-]+')
- git tag -f $VERSION $CI_COMMIT_SHA
@ -83,15 +77,3 @@ tag:
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
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'