-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use a more simple Jenkinsfile and build on windows #508
Changes from all commits
d521444
5c35922
6f05328
cdc0653
6959c5b
1ca45c0
ea47b5c
fa67727
c36f2fc
ae019a2
e8b3acc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
properties([buildDiscarder(logRotator(numToKeepStr: '20'))]) | ||
node('maven-11') { | ||
checkout scm | ||
timeout(time: 1, unit: 'HOURS') { | ||
// TODO Azure mirror | ||
ansiColor('xterm') { | ||
withEnv(['MAVEN_OPTS=-Djansi.force=true']) { | ||
sh 'mvn -B -Dstyle.color=always -ntp clean verify' | ||
} | ||
} | ||
} | ||
} | ||
// Builds a module using https://github.com/jenkins-infra/pipeline-library | ||
buildPlugin(useAci: true, configurations: [ | ||
[ platform: "linux", jdk: "8" ], | ||
[ platform: "linux", jdk: "11" ], | ||
[ platform: "windows", jdk: "11" ] | ||
]) |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -930,7 +930,10 @@ | |||
<goal>run</goal> | ||||
</goals> | ||||
<configuration> | ||||
<streamLogs>true</streamLogs> | ||||
<writeJunitReport>true</writeJunitReport> | ||||
<junitPackageName>io.jenkins.plugins.pom.its</junitPackageName> | ||||
<!-- <streamLogs>true</streamLogs>--> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
<streamLogsOnFailures>true</streamLogsOnFailures> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you do not actually want this. If a test fails,
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just to have the failure directly in the build output in case of IT failure which may be a bit more convenient when running test locally. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
OK. Or you can use the profile trick I developed in jenkinsci/maven-hpi-plugin#301. |
||||
<showErrors>true</showErrors> | ||||
<cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo> | ||||
<localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath> | ||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1 +1 @@ | ||||||
invoker.goals=-P jmh-benchmark -Dstyle.color=always -ntp clean test | ||||||
invoker.goals=-P jmh-benchmark -ntp clean test | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
invoker.goals=-Dstyle.color=always -ntp clean install | ||
invoker.goals=-ntp clean install | ||
invoker.buildResult=failure |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
invoker.goals=-Dstyle.color=always -ntp clean install | ||
invoker.goals=-ntp clean install |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1 +1 @@ | ||||||
invoker.goals=-Dstyle.color=always -ntp clean install | ||||||
invoker.goals= -ntp clean install | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,3 @@ | ||||||
invoker.goals.1=-Dstyle.color=always -ntp clean install | ||||||
invoker.goals.1= -ntp clean install | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
# real extension will not work here due to its not being at the root of a repository, so fake it: | ||||||
invoker.goals.2=-Dstyle.color=always -ntp -Dset.changelist -Dchangelist=-rc1234.deadbeef5678 clean install | ||||||
invoker.goals.2= -ntp -Dset.changelist -Dchangelist=-rc1234.deadbeef5678 clean install | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,2 +1,2 @@ | ||||||
# release.skipTests normally set in jenkins-release profile since release:perform would do the tests | ||||||
invoker.goals=-Dstyle.color=always -ntp -Pjenkins-release -Drelease.skipTests=false clean verify | ||||||
invoker.goals= -ntp -Pjenkins-release -Drelease.skipTests=false clean verify | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,3 @@ | ||||||
# install, not verify, because we want to check the artifact as we would be about to deploy it | ||||||
# release.skipTests normally set in jenkins-release profile since release:perform would do the tests | ||||||
invoker.goals=-Dstyle.color=always -ntp -Pjenkins-release -Drelease.skipTests=false clean install | ||||||
invoker.goals= -ntp -Pjenkins-release -Drelease.skipTests=false clean install | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,9 @@ under the License. | |
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<disableXmlReport>true</disableXmlReport> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the part that makes me somewhat uncomfortable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well you wanted to avoid noise (#508 (review)) from those files which should not be scanned by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, I know. |
||
</properties> | ||
<repositories> | ||
<repository> | ||
<id>local.central</id> | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,2 +1,2 @@ | ||||||
invoker.goals=-Dstyle.color=always -ntp clean install | ||||||
invoker.goals= -ntp clean install | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
invoker.buildResult=failure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Results in much less readable IT logs unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean in Jenkins?
because before it looks a bit strange to me and full of weird characters (from https://ci.jenkins.io/job/Tools/job/plugin-pom/job/master/601/console )
whereas with this change (https://ci.jenkins.io/job/Tools/job/plugin-pom/job/PR-508/5/console)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid the
ansicolor
plugin is buggy when it comes to partial logs. https://ci.jenkins.io/job/Tools/job/plugin-pom/job/master/601/consoleFull looks nice.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see jenkins-infra/pipeline-library#263