Skip to content
Snippets Groups Projects
Commit e5bf5fcc authored by Owen Hayes's avatar Owen Hayes :speech_balloon:
Browse files

Update .gitlab-ci.yml file

parent 01ea0161
Branches
No related tags found
No related merge requests found
image: gcc
variables:
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
get-sonar-binaries:
stage: .pre
cache:
policy: push
key: "${CI_COMMIT_SHORT_SHA}"
paths:
- build-wrapper/
- sonar-scanner/
script:
# Download sonar-scanner
- curl -sSLo ./sonar-scanner.zip 'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747-linux.zip'
- unzip -o sonar-scanner.zip
- mv sonar-scanner-4.7.0.2747-linux sonar-scanner
# Download build-wrapper
- curl -sSLo ./build-wrapper-linux-x86.zip "${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip"
- unzip -oj build-wrapper-linux-x86.zip -d ./build-wrapper
only:
- merge_requests
- master
- develop
build:
stage: build
cache:
policy: pull-push
key: "${CI_COMMIT_SHORT_SHA}"
paths:
- build-wrapper/
- sonar-scanner/
- bw-output/
script:
# Run the build inside the build wrapper
- build-wrapper/build-wrapper-linux-x86-64 --out-dir bw-output make tranqc
only:
- merge_requests
- master
- develop
sonarcloud-check:
stage: .post
cache:
policy: pull
key: "${CI_COMMIT_SHORT_SHA}"
paths:
- build-wrapper/
- sonar-scanner/
- bw-output/
script:
- sonar-scanner/bin/sonar-scanner -Dsonar.host.url="${SONAR_HOST_URL}" -Dsonar.token="${SONAR_TOKEN}" -Dsonar.cfamily.build-wrapper-output=bw-output
only:
- merge_requests
- master
- develop
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment