-
Notifications
You must be signed in to change notification settings - Fork 128
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
[JENKINS-29144] Extend CoreStep to also pass EnvVars to SimpleBuildStep. #116
Conversation
Builds on jenkinsci/jenkins#4766 (incremental version 2.240-rc30032.5a9c198e2a33). Note: I'm getting test failures from CatchErrorStepTest.optionalMessage(), but that doesn't involve CoreStep, so is probably caused by something else in current Jenkins master.
And a spotbugs error in code I have not touched. Yay. Should I fix these as part of this PR? |
The remaining issue now, a test failure in CatchErrorStepTest.optionalMessage. That seems to test whether |
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.
Thanks for the PR! The main idea looks good to me, but I added some comments about the unrelated issues you ran into because of the core upgrade.
src/test/java/org/jenkinsci/plugins/workflow/steps/CatchErrorStepTest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/workflow/steps/PwdStep.java
Outdated
Show resolved
Hide resolved
This allowed dropping manual attempts at resolving dependency conflicts. Unfortunate side effect is that IntelliJ no longer resolves the dependencies, breaking code completion and navigation.
The feature is still broken, but with the latest plugin parent, the test passes again.
src/test/java/org/jenkinsci/plugins/workflow/steps/CoreStepTest.java
Outdated
Show resolved
Hide resolved
So what happens next? Wait for jenkins/PR4766 to be merged, then when the weekly is released, reference that and convert this to non-draft? |
Yes, more or less. One thing though is that this plugin is used widely enough that I do not want it to depend on such a new version of Jenkins core, instead I would prefer to use reflection to call the new overload of |
That's a bit messy, and it'll get messier when adding JENKINS-46175. I thought to have read something about plugin versioning supporting "branches", so 2.22 and onwards would reference jenkins 2.240 (or whatever the weekly turns out to be), but a later 2.25.1 might reference 2.163 (for a fix for a bug reported for 2.21 or earlier that does not depend on new API), with the update center offering the 2.21 -> 2.25.1 upgrade to users running older Jenkins releases. |
Yes, my preference (FWIW) is to keep things simple, declaring whatever Jenkins version you want, and using something like https://gist.github.com/jglick/86a30894446ed38f918050c1180483e2 to create backport branches on demand (typically just for significant bug fixes). But the decision rests on whomever is actually merging PRs and cutting releases, probably @dwnusbaum in this case. |
Now that the core part of JENKINS-21944 is merged, I can start JENKINS-46175. |
Decided to keep this separate despite the overlap with #117 |
CoreStep now invokes the correct perform() via reflection. The unit test is skipped on Jenkins below 2.241.
Switched to the released 2.241. Then did as requested and dropped the requirement back to 2.164.3, invoking the new API via reflection when running on 2.241 or later. Would just need that Jenkinsfile change to build against old & new. |
The build also seems to have failed for no obvious reason. |
Closing - superseded by #121 |
Note that you do not need to close this: if #121 is merged (without squash or rebase!), this will automatically be marked merged as well. |
I did not know that. No harm done I guess. |
See JENKINS-29144
Builds on jenkinsci/jenkins#4766 (incremental version 2.240-rc30032.5a9c198e2a33).
Note: I'm getting test failures from CatchErrorStepTest.optionalMessage(), but that doesn't involve CoreStep, so is probably caused by something else in current Jenkins master.
@jglick