Skip to content

Commit c55dc7b

Browse files
committed
Refactor .gitlab-ci.yml file to use several stages, and allow failures of Sonar jobs.
1 parent 238b8e9 commit c55dc7b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.gitlab-ci.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,24 @@ cache:
1212
# Cache the downloaded dependencies and plugins between builds.
1313
- '$GRADLE_USER_HOME'
1414

15-
build:
15+
build-job:
16+
stage: build
1617
script:
1718
- $GRADLE build
19+
20+
test-job:
21+
stage: test
22+
script:
1823
- $GRADLE test jacocoTestCoverageVerification
24+
25+
deploy-job:
26+
stage: deploy
27+
script:
1928
- if [ $NEXUS_USER_NAME ]; then $GRADLE publish; fi
2029
- if [ !$NEXUS_USER_NAME ]; then $GRADLE publishToMavenLocal; fi
30+
31+
sonar-job:
32+
stage: deploy
33+
allow_failure: true
34+
script:
2135
- if [ $SONAR_LOGIN ]; then $GRADLE -Dorg.gradle.jvmargs='-XX:MetaspaceSize=1024M -XX:MaxMetaspaceSize=1024M' jacocoTestReport sonar -Dsonar.host.url=$SONAR -Dsonar.login=${SONAR_LOGIN}; fi

0 commit comments

Comments
 (0)