Commit b7d1134e authored by David Foucher's avatar David Foucher

Add sonarqube check

parent f10a89ce
Pipeline #3918 passed with stage
in 2 minutes and 2 seconds
#TODO test docker image with https://github.com/aelsabbahy/goss
variables:
TREFLE_OLD_VERSION: "api-v0.7.14"
......@@ -21,6 +20,27 @@ test:
except:
- /^WIP-.*$/
sonarqube-check:
image:
name: sonarsource/sonar-scanner-cli:latest
variables:
SONAR_TOKEN: "${SONAR_TOKEN}"
SONAR_HOST_URL: "https://sonarqube.beta.pole-emploi.fr"
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: 0 # Tells git to fetch all the branches of the project, required by the analysis task
cache:
key: ${CI_JOB_NAME}
paths:
- .sonar/cache
stage: test
script:
- sonar-scanner -Dsonar.qualitygate.wait=true
allow_failure: true
only:
- master
api publish:
image:
name: gcr.io/kaniko-project/executor:debug
......@@ -33,6 +53,7 @@ api publish:
- /^api-v[0-9.ab]+$/
- /^testing$/
deploy API to staging:
type: deploy
environment:
......@@ -53,6 +74,7 @@ deploy API to staging:
- /^api-v[0-9.ab]+$/
- /^testing$/
backoffice publish:
image:
name: gcr.io/kaniko-project/executor:debug
......@@ -64,6 +86,7 @@ backoffice publish:
only:
- /^backoffice-v[0-9.ab]+$/
deploy Backoffice to staging:
type: deploy
environment:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment