mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:20:12 +01:00
updated pipeline
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
e118feb3ab
commit
027d301745
@ -1,22 +1,35 @@
|
|||||||
# This is a sample build configuration for all languages.
|
image: gcc:6.5
|
||||||
# Check our guides at https://confluence.atlassian.com/x/VYk8Lw for more examples.
|
|
||||||
# Only use spaces to indent your .yml configuration.
|
|
||||||
# -----
|
|
||||||
# You can specify a custom docker image from Docker Hub as your build environment.
|
|
||||||
|
|
||||||
image: sutoj/builder:bionic
|
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: full # SonarCloud scanner needs the full history to assign issues properly
|
||||||
|
|
||||||
pipelines:
|
definitions:
|
||||||
default:
|
caches:
|
||||||
- step:
|
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
|
||||||
|
steps:
|
||||||
|
- step: &build-test-sonarcloud
|
||||||
|
name: Build, test and analyze on SonarCloud
|
||||||
|
caches:
|
||||||
|
- sonar
|
||||||
script:
|
script:
|
||||||
- service mysql start
|
- export SONAR_SCANNER_VERSION=4.4.0.2170
|
||||||
- ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-database=mariadb
|
- export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
|
||||||
- make clean all install
|
- export BW_OUTPUT=$HOME/.sonar/bw-output
|
||||||
- mysql -u piler -ppiler123 piler1 < /usr/share/piler/db-mysql.sql
|
- mkdir -p $BW_OUTPUT
|
||||||
- cd unit_tests
|
- curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
|
||||||
- ./run.sh
|
- unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
||||||
- cd ..
|
- export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
||||||
- phpunit
|
- export SONAR_SCANNER_OPTS="-server"
|
||||||
|
- curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
|
||||||
|
- unzip -o $HOME/.sonar/sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
|
||||||
|
- export PATH=$HOME/.sonar/sonar/build-wrapper-linux-x86:$PATH
|
||||||
|
- build-wrapper-linux-x86-64 --out-dir $BW_OUTPUT <your clean build command>
|
||||||
|
- sonar-scanner -Dsonar.cfamily.build-wrapper-output=$BW_OUTPUT
|
||||||
|
|
||||||
|
pipelines: # More info here: https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html
|
||||||
|
branches:
|
||||||
|
master:
|
||||||
|
- step: *build-test-sonarcloud
|
||||||
|
pull-requests:
|
||||||
|
'**':
|
||||||
|
- step: *build-test-sonarcloud
|
||||||
|
Loading…
Reference in New Issue
Block a user