1
1
variables :
2
- SONAR_TOKEN : ebe2ea223c26b8dda8eb79c3237cf8b7d3ecbd96 # SonarQube project token
3
- SONAR_HOST_URL : https://sonar.qc.on-target.tech # Base URL of SonarQube server
2
+ SONAR_TOKEN : $SONAR_API_TOKEN # SonarQube project token
3
+ SONAR_HOST_URL : $SONAR_URL # Base URL of SonarQube server
4
4
SONAR_USER_HOME : " ${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
5
5
GIT_DEPTH : 0 # Tells git to fetch all the branches of the project, required by the sonar analysis task
6
- DAST_WEBSITE : https://cdw-build.apps.tanzu.on-target.tech # Website to be scanned in the DAST stage
6
+ DAST_WEBSITE : $DAST_URL # Website to be scanned in the DAST stage
7
+ BUILD_PATH : target/demo-0.0.1-SNAPSHOT.jar
7
8
KUBERNETES_CPU_REQUEST : 2
8
9
KUBERNETES_CPU_LIMIT : 6
9
10
KUBERNETES_MEMORY_REQUEST : 8Gi
30
31
script : ./mvnw clean package
31
32
artifacts :
32
33
paths :
33
- - target/demo-0.0.1-SNAPSHOT.jar
34
+ - $BUILD_PATH
34
35
35
36
# Run code quality checks on the SonarQube server
36
37
sonarqube-check :
@@ -39,7 +40,7 @@ sonarqube-check:
39
40
name : sonarsource/sonar-scanner-cli:latest
40
41
allow_failure : true
41
42
script :
42
- - sonar-scanner -Dsonar.qualitygate.wait=true -Dsonar.projectKey=cdw-build -Dsonar.java.binaries=target/demo-0.0.1-SNAPSHOT.jar
43
+ - sonar-scanner -Dsonar.qualitygate.wait=true -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.java.binaries=$BUILD_PATH
43
44
only :
44
45
- merge_requests
45
46
- master
@@ -51,9 +52,9 @@ staging-deploy:
51
52
name : openjdk:11-jdk
52
53
script :
53
54
- curl --location "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=7.0.2&source=github-rel" | tar zx
54
- - ./cf api https://api.sys.tanzu.on-target.tech
55
- -
./cf auth [email protected] $CF_PASSWORD
56
- - ./cf target -o labs-canada -s tyler
55
+ - ./cf api $CF_API
56
+ - ./cf auth $CF_USER $CF_PASSWORD
57
+ - ./cf target -o $CF_ORG -s $CF_SPACE
57
58
- ./cf push -f manifest.yml
58
59
only :
59
60
- master
0 commit comments