Skip to content

Commit

Permalink
Replace "fail on warning" with Jenkins quality gate
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
HeikoKlare committed Feb 5, 2024
1 parent 0f5d45a commit 41c66df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
-Dnative=${{ matrix.config.native }}
-Dcompare-version-with-baselines.skip=true
-Dtycho.baseline.replace=none
-Dmaven.compiler.failOnWarning=true
--fail-at-end
-DskipNativeTests=false
-DfailIfNoTests=false
Expand All @@ -81,7 +80,6 @@ jobs:
mvn --batch-mode -V -U
-DforkCount=1
-Dcompare-version-with-baselines.skip=true
-Dmaven.compiler.failOnWarning=true
--fail-at-end
-DskipNativeTests=true
-DfailIfNoTests=true
Expand Down
5 changes: 3 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ pipeline {
sh '''
mvn clean verify \
--batch-mode --threads 1C -DforkCount=0 \
-Dcompare-version-with-baselines.skip=false -Dmaven.compiler.failOnWarning=true \
-Dcompare-version-with-baselines.skip=false \
-Dorg.eclipse.swt.tests.junit.disable.test_isLocal=true \
-Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true
'''
Expand All @@ -312,7 +312,8 @@ pipeline {
junit 'eclipse.platform.swt/tests/*.test*/target/surefire-reports/*.xml'
archiveArtifacts artifacts: '**/*.log,**/*.html,**/target/*.jar,**/target/*.zip'
discoverGitReferenceBuild referenceJob: 'eclipse.platform.swt/master'
recordIssues publishAllIssues: true, tools: [eclipse(pattern: '**/target/compilelogs/*.xml'), mavenConsole(), javaDoc()]
recordIssues publishAllIssues: true, tools: [eclipse(name: 'Compiler and API Tools', pattern: '**/target/compilelogs/*.xml'), javaDoc()], qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
recordIssues publishAllIssues: true, tool: mavenConsole(), qualityGates: [[threshold: 1, type: 'DELTA_ERROR', unstable: true]]
}
}
}
Expand Down

0 comments on commit 41c66df

Please sign in to comment.