Skip to content

Commit 89fa13f

Browse files
committed
[Build] Enable quality gates
1 parent a97e0cd commit 89fa13f

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

Jenkinsfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pipeline {
22
options {
33
timeout(time: 45, unit: 'MINUTES')
4-
buildDiscarder(logRotator(numToKeepStr:'5', artifactNumToKeepStr: 'main'.equals(env.BRANCH_NAME) ? '5' : '1' ))
4+
buildDiscarder(logRotator(numToKeepStr: 'main'.equals(env.BRANCH_NAME) ? '20' : '5', artifactNumToKeepStr: 'main'.equals(env.BRANCH_NAME) ? '5' : '1' ))
55
disableConcurrentBuilds(abortPrevious: true)
66
timestamps()
77
}
@@ -45,6 +45,12 @@ pipeline {
4545
m2e-core-tests/*/target/work/data/.metadata/.log,\
4646
**/target/artifactcomparison/*'
4747
junit '*/target/surefire-reports/TEST-*.xml,*/*/target/surefire-reports/TEST-*.xml'
48+
discoverGitReferenceBuild referenceJob: 'm2e/main'
49+
recordIssues enabledForFailure: true, publishAllIssues: true, ignoreQualityGate: true, tools: [
50+
eclipse(name: 'Compiler', pattern: '**/target/compilelogs/*.xml'),
51+
mavenConsole(),
52+
javaDoc()
53+
], qualityGates: [[threshold: 1, type: 'NEW', unstable: true]]
4854
}
4955
}
5056
}

m2e-parent/pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2626
<tycho.p2.baselineMode>warn</tycho.p2.baselineMode>
2727
<scmConnectionRaw>scm:git:https://github.com/eclipse-m2e/m2e-core.git</scmConnectionRaw>
28+
<compileLogDir>${project.build.directory}/compilelogs</compileLogDir>
2829
</properties>
2930

3031
<organization>
@@ -154,6 +155,8 @@
154155
<pattern>**/jars/jansi-*.jar</pattern>
155156
<pattern>org/eclipse/m2e/core/internal/lifecyclemapping/model/**/*.java</pattern>
156157
</ignoredPatterns>
158+
<enhanceLogs>true</enhanceLogs>
159+
<logDirectory>${compileLogDir}</logDirectory>
157160
</configuration>
158161
</plugin>
159162
</plugins>
@@ -233,7 +236,6 @@
233236
<plugin>
234237
<groupId>org.eclipse.tycho</groupId>
235238
<artifactId>tycho-p2-plugin</artifactId>
236-
<version>${tycho-version}</version>
237239
<configuration>
238240
<baselineMode>warn</baselineMode>
239241
</configuration>

pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@
169169
<version>${tycho-version}</version>
170170
<configuration>
171171
<useJDK>${tycho.useJDK}</useJDK>
172+
<log>xml</log>
173+
<logDirectory>${compileLogDir}</logDirectory>
174+
<showWarnings>true</showWarnings>
175+
<showDeprecation>true</showDeprecation>
176+
<compilerArgs>
177+
<arg>-enableJavadoc</arg>
178+
<arg>-verbose</arg>
179+
</compilerArgs>
172180
</configuration>
173181
</plugin>
174182
<plugin>

0 commit comments

Comments
 (0)