|
|
@ -1,30 +1,19 @@
|
|
|
|
kind: pipeline
|
|
|
|
kind: pipeline
|
|
|
|
ttype: docker
|
|
|
|
type: docker
|
|
|
|
name: ShakeAndCraft
|
|
|
|
name: ShakeAndCraft
|
|
|
|
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- push
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- name: install-unzip
|
|
|
|
- name: code-analysis
|
|
|
|
image: alpine
|
|
|
|
image: openjdk:8-jdk
|
|
|
|
commands:
|
|
|
|
|
|
|
|
- apk add --no-cache unzip
|
|
|
|
|
|
|
|
- name: install-sonar-scanner
|
|
|
|
|
|
|
|
image: gradle:jdk11
|
|
|
|
|
|
|
|
commands:
|
|
|
|
|
|
|
|
- curl -sSLo /tmp/sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216-linux.zip
|
|
|
|
|
|
|
|
- unzip -q /tmp/sonar-scanner-cli.zip -d /opt/sonar-scanner
|
|
|
|
|
|
|
|
- export PATH=$PATH:/opt/sonar-scanner/sonar-scanner-4.5.0.2216-linux/bin
|
|
|
|
|
|
|
|
- name: sonarqube
|
|
|
|
|
|
|
|
image: openjdk:latest
|
|
|
|
|
|
|
|
environment:
|
|
|
|
environment:
|
|
|
|
SONAR_TOKEN:
|
|
|
|
SONAR_TOKEN:
|
|
|
|
from_secret: SONAR_TOKEN
|
|
|
|
from_secret: SONAR_TOKEN
|
|
|
|
SONAR_HOST_URL: "https://your-sonarqube-url.com"
|
|
|
|
|
|
|
|
settings:
|
|
|
|
settings:
|
|
|
|
sources: ./ShakeAndCraft/
|
|
|
|
sources: ./src/
|
|
|
|
commands:
|
|
|
|
commands:
|
|
|
|
- export SONAR_SCANNER_VERSION=4.7.0.2747
|
|
|
|
- export SONAR_SCANNER_VERSION=4.7.0.2747
|
|
|
|
- export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
|
|
|
|
- export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
|
|
|
|