Skip to content
Snippets Groups Projects
Select Git revision
  • ecd316e78bf1c2c62e335e1fd45a43a82c203d7c
  • main default protected
2 results

checksum.json

Blame
  • .gitlab-ci.yml 1.04 KiB
    image: node:latest
    
    include:
      - project: 'general/templates'
        file: '/cicd/SAST-nodejs.gitlab-ci.yml'
      - project: 'general/templates'
        file: '/cicd/npm-audit.gitlab-ci.yml'
      - project: 'general/templates'
        file: '/cicd/sonarqube.gitlab-ci.yml'
    
    variables:
      SONAR_PROJECT_KEY: config
      SONAR_TOKEN: 11922a8e774494f51e1d2f0e695949e4073e7df8
      NPM_REGISTRY: https://it-devops-01.br-edv.brnet.int:4873
      NPM_TOKEN: ZMh1NzlklUTNNvt573Imgw==
    
    cache:
      paths:
        - node_modules/
        - docs/
    
    stages:
      - build
      - test
      - quality
      - publish
    
    build:
      stage: build
      script:
        - npm install --production
    
    test:
      stage: test
      before_script:
        - npm install -g jest
      script:
        - jest
      artifacts:
        paths:
          - docs/test-report.html
          - docs/coverage/lcov.info
    
    publish:
      stage: publish
      script:
        - printenv NPM_TOKEN
        - npm config set strict-ssl false
        - npm config set //it-devops-01.br-edv.brnet.int:4873/:_authToken ${NPM_TOKEN}
        - npm token list --registry $NPM_REGISTRY
        - npm publish --verbose --registry $NPM_REGISTRY