Skip to content
Snippets Groups Projects
Commit a8580b5d authored by Jérôme POIRIER's avatar Jérôme POIRIER
Browse files

ci: enable all gitlab stages

parent 5db05fa0
No related branches found
No related tags found
2 merge requests!2feat: enhance winston logs exploitability,!1Release
Pipeline #66795 passed
stages:
# - build
# - test
# - sonar
- build
- test
- sonar
- docker
- deploy
# # *********************************************************************************************
# # * BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD *
# # * BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD *
# # *********************************************************************************************
# *********************************************************************************************
# * BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD *
# * BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD BUILD *
# *********************************************************************************************
# build-back:
# stage: build
# image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.11.1-alpine
# script:
# - cd back
# - npm i
# - npm run build
# artifacts:
# paths:
# - ./back/node_modules
# expire_in: 1h
# only:
# changes:
# - .gitlab-ci.yml
# - back/**/*
build-back:
stage: build
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.11.1-alpine
script:
- cd back
- npm i
- npm run build
artifacts:
paths:
- ./back/node_modules
expire_in: 1h
only:
changes:
- .gitlab-ci.yml
- back/**/*
# # *********************************************************************************************
# # * TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST *
# # * TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST *
# # *********************************************************************************************
# *********************************************************************************************
# * TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST *
# * TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST *
# *********************************************************************************************
# test-back:
# stage: test
# image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.11.1-alpine
# script:
# - cd back
# - npm run test:cov
# artifacts:
# paths:
# - ./back/coverage/lcov.info
# expire_in: 5 mins
# only:
# changes:
# - .gitlab-ci.yml
# - back/**/*
test-back:
stage: test
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.11.1-alpine
script:
- cd back
- npm run test:cov
artifacts:
paths:
- ./back/coverage/lcov.info
expire_in: 5 mins
only:
changes:
- .gitlab-ci.yml
- back/**/*
# # *********************************************************************************************
# # * SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR *
# # * SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR *
# # *********************************************************************************************
# *********************************************************************************************
# * SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR *
# * SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR SONAR *
# *********************************************************************************************
# sonarqube-back:
# stage: sonar
# rules:
# - if: $CI_PIPELINE_SOURCE == "schedule"
# allow_failure: true
# before_script:
# - apk add --no-cache 'npm>7'
# - cd back
# - npm install --save sonar-scanner
# image:
# name: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/sonarsource/sonar-scanner-cli:4
# entrypoint: [""]
# variables:
# SONAR_URL: http://sonarqube.forge.grandlyon.com:9000
# GIT_STRATEGY: clone
# GIT_DEPTH: 0
# script:
# - >
# sonar-scanner
# -Dsonar.projectName=${CI_PROJECT_NAME}-server
# -Dsonar.projectVersion=1.0
# -Dsonar.sourceEncoding=UTF-8
# -Dsonar.projectBaseDir=.
# -Dsonar.host.url=${SONAR_URL}
# -Dsonar.projectKey=${SONAR_PROJECT_KEY_SERVER}
# -Dsonar.login=${SONAR_TOKEN_SERVER}
# -Dsonar.sources=src
# -Dsonar.exclusions=**/main.ts,**/*.module.ts,**/*.spec.ts
sonarqube-back:
stage: sonar
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
allow_failure: true
before_script:
- apk add --no-cache 'npm>7'
- cd back
- npm install --save sonar-scanner
image:
name: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/sonarsource/sonar-scanner-cli:4
entrypoint: [""]
variables:
SONAR_URL: http://sonarqube.forge.grandlyon.com:9000
GIT_STRATEGY: clone
GIT_DEPTH: 0
script:
- >
sonar-scanner
-Dsonar.projectName=${CI_PROJECT_NAME}-server
-Dsonar.projectVersion=1.0
-Dsonar.sourceEncoding=UTF-8
-Dsonar.projectBaseDir=.
-Dsonar.host.url=${SONAR_URL}
-Dsonar.projectKey=${SONAR_PROJECT_KEY_SERVER}
-Dsonar.login=${SONAR_TOKEN_SERVER}
-Dsonar.sources=src
-Dsonar.exclusions=**/main.ts,**/*.module.ts,**/*.spec.ts
# *********************************************************************************************
# * DOCKER DOCKER DOCKER DOCKER DOCKER DOCKER DOCKER DOCKER DOCKER DOCKER DOCKER DOCKER DOCKE *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment