From e89adf05e672974f0b7addccb406cb31a4dc9781 Mon Sep 17 00:00:00 2001 From: ztimson Date: Tue, 20 Sep 2022 14:32:46 -0400 Subject: [PATCH] Simplified pipeline --- .gitlab/.gitlab-ci.yml | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 6e92a3a..dbe1e14 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -3,7 +3,6 @@ image: node:16 stages: - build - test - - publish - deploy npm: @@ -17,8 +16,7 @@ npm: files: - package.json paths: - - node_modules/ - - package-lock.json + - node_modules policy: pull-push - key: $CI_PIPELINE_ID paths: @@ -32,13 +30,7 @@ npm: audit: stage: test - cache: - - key: - files: - - package.json - paths: - - package-lock.json - policy: pull + cache: [ ] script: - AUDIT=$(npm audit) - echo "vulnerabilities_high $(echo $AUDIT | grep -oE '[0-9]+ high' | grep -oE '[0-9]+' || echo 0)" > metrics.txt @@ -50,9 +42,10 @@ audit: metrics: metrics.txt rules: - if: $CI_COMMIT_BRANCH + allow_failure: true registry: - stage: publish + stage: deploy image: docker cache: - key: $CI_PIPELINE_ID @@ -67,9 +60,10 @@ registry: - docker push "$CI_REGISTRY_IMAGE:$TAG" rules: - if: $CI_COMMIT_BRANCH + allow_failure: true tag: - stage: publish + stage: deploy image: name: alpine/git entrypoint: [ "" ] @@ -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'