Commit adea5782 authored by Nicolas PERNOUD's avatar Nicolas PERNOUD
Browse files

Merge branch 'concurrent_ci' into 'master'

Run sonar analysis concurrently for better performance.

See merge request !1
parents b93ae05b 15e38414
Pipeline #7783 failed with stage
in 1 minute and 37 seconds
......@@ -18,38 +18,37 @@ variables:
GIT_DEPTH: 0
stages:
- sonar-analysis
- build
sonarqube:
stage: sonar-analysis
image: skilldlabs/sonar-scanner:3.4.0
script:
- >
sonar-scanner
-Dsonar.projectName=${CI_PROJECT_NAME}
-Dsonar.projectVersion=1.0
-Dsonar.sourceEncoding=UTF-8
-Dsonar.projectBaseDir=.
-Dsonar.host.url=${SONAR_URL}
-Dsonar.projectKey=${SONAR_PROJECT_KEY}
-Dsonar.login=${SONAR_TOKEN}
- build-and-test-with-sonar-concurrently
build-master:
stage: build
stage: build-and-test-with-sonar-concurrently
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- DOCKER_BUILDKIT=1 docker build --build-arg BUILDKIT_INLINE_CACHE=1 --pull -t "$CI_REGISTRY_IMAGE" .
- DOCKER_BUILDKIT=1 docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
build:
stage: build
stage: build-and-test-with-sonar-concurrently
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- DOCKER_BUILDKIT=1 docker build --build-arg BUILDKIT_INLINE_CACHE=1 --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- DOCKER_BUILDKIT=1 docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master
sonarqube:
stage: build-and-test-with-sonar-concurrently
image: registry.forge.grandlyon.com/apoyen/sonnar-scanner-gl:master
script:
- >
sonar-scanner
-Dsonar.projectName=${CI_PROJECT_NAME}
-Dsonar.projectVersion=1.0
-Dsonar.sourceEncoding=UTF-8
-Dsonar.projectBaseDir=.
-Dsonar.host.url=${SONAR_URL}
-Dsonar.projectKey=${SONAR_PROJECT_KEY}
-Dsonar.login=${SONAR_TOKEN}
-Dsonar.exclusions=**/*_test.go
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