diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55ab38b7f262e0f983c09ab6fd26980ec62539fd..ff82a4743538fa32cc19358000c50ef4dc42f51d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,27 +1,36 @@ +# You can override the included template(s) by including variable overrides +# See https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings +# Note that environment variables can be set in several places +# See https://docs.gitlab.com/ee/ci/variables/#priority-of-environment-variables stages: - - build - - deploy - +- build +- deploy +- test build: stage: build image: node:lts cache: paths: - - node_modules + - node_modules script: - - npm install - - npm run lint - - npm run test-ci + - npm install + - npm run lint + - npm run test-ci artifacts: paths: - - node_modules - + - node_modules deploy: stage: deploy image: node:lts only: - - /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/ + - "/^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$/" script: - - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc - - npm version -no-git-tag-version $CI_COMMIT_REF_NAME - - npm publish + - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc + - npm version -no-git-tag-version $CI_COMMIT_REF_NAME + - npm publish +sast: + variables: + SAST_DEFAULT_ANALYZERS: eslint, nodejs-scan + stage: test +include: +- template: Security/SAST.gitlab-ci.yml