Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16108

Option to use "last unstable" as fallback for "Upstream build which trigger" instead of only "last successful"

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • copyartifact-plugin
    • None
    • WinXP

      If one chooses "Upstream build which trigger" as option for copying artifacts there is only the possibility to get "last successful as fallback" and not "last unstable" which I would like to have as well.

      However the wording for last successful is inconsistent in my opinion because if you just choose copying from "Lastest succesfull build" also unstable builds are considered.

      If you look at JENKINS-11828 and the merge of pull request #7 you see the place which my feature could be implemented. (see return isFallbackToLastSucessful() && run.getResult().isBetterOrEqualTo(Result.SUCCESS);

      Thank you!

          [JENKINS-16108] Option to use "last unstable" as fallback for "Upstream build which trigger" instead of only "last successful"

          Any estimate when this will be fixed? In my opinion this is even a bug, because in Jenkins terms "successful" means stable or unstable (but not failed). However, the plug-in will only copy from the last stable job which may lead to unexpected results.

          Thorsten Meinl added a comment - Any estimate when this will be fixed? In my opinion this is even a bug, because in Jenkins terms "successful" means stable or unstable (but not failed). However, the plug-in will only copy from the last stable job which may lead to unexpected results.

          Would love that feature as well. At my company we're moving legacy code to a setup with Unit Tests and Code Analysis.

          We're marking build as 'Unstable' depending on test and analysis results. But since the plugin only copies from the last 'Stable', we have to turn that feature off, which also means no email notification, ...

          Chris Werner Rau added a comment - Would love that feature as well. At my company we're moving legacy code to a setup with Unit Tests and Code Analysis. We're marking build as 'Unstable' depending on test and analysis results. But since the plugin only copies from the last 'Stable', we have to turn that feature off, which also means no email notification, ...

          Craig Ringer added a comment -

          This is possible with the copyArtifacts plugin now, it's just less than clear in the docs.

          copyArtifacts(
          projectName: "blah"
          selector: lastSuccessful(stable: false),
          ...
          )

          Craig Ringer added a comment - This is possible with the copyArtifacts plugin now, it's just less than clear in the docs. copyArtifacts( projectName: "blah" selector: lastSuccessful(stable: false), ... )

            Unassigned Unassigned
            schmida Andreas Schmid
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: