Skip to content

Commit c8d8944

Browse files
HeikoKlareHannesWell
authored andcommitted
Replace "fail on warning" with Jenkins quality gate
The GitHub Actions and Jenkins build specifications currently contain the option `-Dmaven.compiler.failOnWarning=true`. Since warnings were defined to be ignored in the parent POM, this did not have any effect. The configuration to ignore warnings has been removed from the parent POM, so that the builds now fail as the code actually contains warnings. This change removes the "fail on warning" option. As a replacement, it enables Jenkins quality gate.
1 parent 0f5d45a commit c8d8944

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/maven.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
-Dnative=${{ matrix.config.native }}
6969
-Dcompare-version-with-baselines.skip=true
7070
-Dtycho.baseline.replace=none
71-
-Dmaven.compiler.failOnWarning=true
7271
--fail-at-end
7372
-DskipNativeTests=false
7473
-DfailIfNoTests=false
@@ -81,7 +80,6 @@ jobs:
8180
mvn --batch-mode -V -U
8281
-DforkCount=1
8382
-Dcompare-version-with-baselines.skip=true
84-
-Dmaven.compiler.failOnWarning=true
8583
--fail-at-end
8684
-DskipNativeTests=true
8785
-DfailIfNoTests=true

Jenkinsfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ pipeline {
300300
sh '''
301301
mvn clean verify \
302302
--batch-mode --threads 1C -DforkCount=0 \
303-
-Dcompare-version-with-baselines.skip=false -Dmaven.compiler.failOnWarning=true \
303+
-Dcompare-version-with-baselines.skip=false \
304304
-Dorg.eclipse.swt.tests.junit.disable.test_isLocal=true \
305305
-Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true
306306
'''
@@ -312,7 +312,8 @@ pipeline {
312312
junit 'eclipse.platform.swt/tests/*.test*/target/surefire-reports/*.xml'
313313
archiveArtifacts artifacts: '**/*.log,**/*.html,**/target/*.jar,**/target/*.zip'
314314
discoverGitReferenceBuild referenceJob: 'eclipse.platform.swt/master'
315-
recordIssues publishAllIssues: true, tools: [eclipse(pattern: '**/target/compilelogs/*.xml'), mavenConsole(), javaDoc()]
315+
recordIssues publishAllIssues: true, tools: [eclipse(name: 'Compiler and API Tools', pattern: '**/target/compilelogs/*.xml'), javaDoc()], qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
316+
recordIssues publishAllIssues: true, tool: mavenConsole(), qualityGates: [[threshold: 1, type: 'DELTA_ERROR', unstable: true]]
316317
}
317318
}
318319
}

0 commit comments

Comments
 (0)