Integration CI mit SonarQube
This commit is contained in:
@@ -1,21 +1,44 @@
|
||||
variables:
|
||||
MVN_OPTS: >-
|
||||
--batch-mode
|
||||
--errors
|
||||
--fail-at-end
|
||||
--show-version
|
||||
--no-transfer-progress
|
||||
-DinstallAtEnd=true
|
||||
-DdeployAtEnd=true
|
||||
-Dsonar.host.url=https://sonar.fbe-adswen.rwu.de
|
||||
-Dsonar.token=sqa_c39258caceb01d59515d6dfa9440a7b05cdd15f4
|
||||
-Dhttps.protocols=TLSv1.2
|
||||
-Dorg.slf4j.simpleLogger.showDateTime=true
|
||||
-Djava.awt.headless=true
|
||||
|
||||
image: maven:3.9.1-eclipse-temurin-17
|
||||
|
||||
cache:
|
||||
key: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- .m2/repository
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- analyze
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- echo "Maven Build started..."
|
||||
- "mvn compile"
|
||||
- echo "Starting Maven build..."
|
||||
- mvn $MVN_OPTS clean compile
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- echo "Maven Test started..."
|
||||
- "mvn test"
|
||||
- echo "Starting Maven Test..."
|
||||
- mvn $MVN_OPTS test
|
||||
|
||||
analyze:
|
||||
stage: analyze
|
||||
script:
|
||||
- echo "Starting Code Analysis..."
|
||||
- mvn $MVN_OPTS verify sonar:sonar -Pcoverage
|
||||
|
||||
Reference in New Issue
Block a user