-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Clean workspace before building incrementals #141
Changes from 5 commits
cd79afe
21c73ad
f424c9b
c05194b
09edbc1
b1d715d
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 |
---|---|---|
|
@@ -65,6 +65,17 @@ def call(Map params = [:]) { | |
isMaven = fileExists('pom.xml') | ||
incrementals = fileExists('.mvn/extensions.xml') && | ||
readFile('.mvn/extensions.xml').contains('git-changelist-maven-extension') | ||
if (incrementals) { // Incrementals needs 'git status -s' to be empty at start of job | ||
if (isUnix()) { | ||
sh(script: 'git clean -xffd > /dev/null 2>&1', | ||
label:'Clean for incrementals', | ||
returnStatus: true) // Ignore failure if CLI git is not available | ||
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. Does the 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. It should, but I was practicing an "abundance of caution" in hopes that a peripheral cleanup operation would have even less chance of inadvertently breaking a build. 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. So then 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, should. Same "abundance of caution" logic. If ignoring the return value inside the script somehow did not work, also take the active measure of ignoring the return value from the step. Both
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've changed to hide the output from git clean and ignore the return code in c05194b . Let me know if other changes are needed (after the fix to change the Windows null device to the correct name |
||
} else { | ||
bat(script: 'git clean -xffd 1> nul 2>&1', | ||
label:'Clean for incrementals', | ||
returnStatus: true) // Ignore failure if CLI git is not available | ||
} | ||
} | ||
} | ||
|
||
String changelistF | ||
|
@@ -224,7 +235,7 @@ List<Map<String, String>> getConfigurations(Map params) { | |
error("Configuration field \"platform\" must be specified: $c") | ||
} | ||
if (!c.jdk) { | ||
error("Configuration filed \"jdk\" must be specified: $c") | ||
error("Configuration field \"jdk\" must be specified: $c") | ||
} | ||
} | ||
|
||
|
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.
Could we not just do this unconditionally?
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.
We certainly could, but I wanted to keep the impact of the change to only those specific cases where I know it is an issue. I'm willing to change the pull request to do it in all cases if that will help with its approval.