Skip to content
Snippets Groups Projects
Commit 0707a62b authored by François Agneray's avatar François Agneray
Browse files

add sonar stage into gitlab-ci

parent c53f81e6
No related branches found
No related tags found
2 merge requests!68Develop,!55Sonar
Pipeline #1562 passed
stages: stages:
- install - install
- sonar
- build - build
- deploy - deploy
variables: variables:
VERSION: "3.0"
SONARQUBE_URL: https://sonarqube.lam.fr
CONTAINER_IMAGE: portus.lam.fr/anis/anis-client CONTAINER_IMAGE: portus.lam.fr/anis/anis-client
install: install:
...@@ -19,7 +22,16 @@ install: ...@@ -19,7 +22,16 @@ install:
policy: push policy: push
only: only:
refs: refs:
- develop - sonar
sonar_scanner:
image: portus.lam.fr/ci-tools/sonar-scanner:latest
stage: sonar
script:
- sonar-scanner -Dsonar.projectKey=anis-client -Dsonar.sources=src -Dsonar.projectVersion=$VERSION -Dsonar.host.url=$SONARQUBE_URL -Dsonar.login=$SONAR_TOKEN
only:
refs:
- sonar
build: build:
image: docker:stable image: docker:stable
...@@ -35,7 +47,7 @@ build: ...@@ -35,7 +47,7 @@ build:
policy: pull policy: pull
only: only:
refs: refs:
- develop - sonar
deploy: deploy:
image: alpine image: alpine
...@@ -45,4 +57,4 @@ deploy: ...@@ -45,4 +57,4 @@ deploy:
- curl -XPOST $DEV_WEBHOOK - curl -XPOST $DEV_WEBHOOK
only: only:
refs: refs:
- develop - sonar
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment