-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
21 lines (19 loc) · 1.04 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
image: gcc:10.2
clone:
depth: full # SonarQube scanner needs the full history to assign issues properly
pipelines:
branches:
master:
- step:
name: Build and analyze on SonarQube
script:
- curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip
- unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
- curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip
- unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
- export PATH="$HOME/.sonar/sonar-scanner-4.6.2.2472-linux/bin:$HOME/.sonar/build-wrapper-linux-x86:$PATH"
- export BW_OUTPUT=build_wrapper_output_directory
- autoreconf --install
- ./configure
- build-wrapper-linux-x86-64 --out-dir $BW_OUTPUT make clean all
- sonar-scanner -Dsonar.cfamily.build-wrapper-output=$BW_OUTPUT