-
Notifications
You must be signed in to change notification settings - Fork 168
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
[FIXED JENKINS-16213] Add global and local settings to promote newest or oldest build #41
base: master
Are you sure you want to change the base?
Conversation
Also promotion order changed if same downstream build is triggered by many upstream builds. Now latest build is promoted. If copy artifacts plugin used, then promoted build where artifacts are copied
plugins » promoted-builds-plugin #52 SUCCESS |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
…s to select if newest or oldest build is promoted
Now there is more clever solution. Solution copied from CopyArtifact plugin. There is now global settings default UseOldest. And there is also job configuration default UseGlobal. So behaiviour will stay as it was earlier. Behaiviour is easy to change from one global settings. |
As written in JIRA, I am dubious that this approach is right. Possibly stems from a misunderstanding of how downstream promotions are supposed to work. Admittedly using the Promoted Builds plugin correctly is notoriously hard (pupils in Jenkins training repeatedly stumble over it), which was one of my motivations in the design of the Workflow plugin. At any rate, Also PRs without tests are usually pushed to the back burner. In this case it looks like (Also as a rule we do not want plugins adding global configuration options for things which can anyway be changed on a per-job basis. There are several job templating plugins available which can be used to avoid duplication.) By the way this plugin has no permanent maintainer that I know of. |
I'm not the current maintainer of the plugin, but let me chip in. There is insufficient info in JENKINS-16213 to conclude what exactly is the problem. Are there any |
The fix smells to be the error-prome @karisivo |
JENKINS-16213
There are jenkins ticket for copyArtifact plugin JENKINS-11655, where blamed that plugin copy wrong artifacts. I didn't finad any similar issue for Build Promotion plugin, even it have the same problem. When there are used "Downsteam trigger" in promotion criteria, and downstream build is started by more than one build, first build is promoted when job is done. In this change latest build is promoted.
BUT, if you are using Copy Artifact plugin in downstream job, job where Artifacts are copied will be promoted.
There is need to fix this issue in Copy Artifact plugin to get it work also like this promotion plugin.