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

Using "Upstream build which triggered" with "Last successfull" fallback uses last build as fallback and not last successful

      Failed build can be used as fallback

          [JENKINS-11828] Using "Upstream build which triggered" with "Last successfull" fallback uses last build as fallback and not last successful

          Vitalii Tymchyshyn added a comment - Fix is in https://github.com/jenkinsci/copyartifact-plugin/pull/6

          Code changed in jenkins
          User: Fred G
          Path:
          src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java
          src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
          http://jenkins-ci.org/commit/copyartifact-plugin/781095924528496b3ec7998a625808875c5215c0
          Log:
          Reverted imports to original style, adapted test for JENKINS-11828

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Fred G Path: src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/781095924528496b3ec7998a625808875c5215c0 Log: Reverted imports to original style, adapted test for JENKINS-11828

          Code changed in jenkins
          User: Fred G
          Path:
          src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
          src/main/java/hudson/plugins/copyartifact/FilePathCopyMethod.java
          src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java
          src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
          http://jenkins-ci.org/commit/copyartifact-plugin/4fb9dba52c63c433cd44403af71067c79f2764e5
          Log:
          Merge pull request #7 from fredg02/master

          merged tivv's pull request and adapted test for JENKINS-11828

          Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/6ff97e6...4fb9dba

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Fred G Path: src/main/java/hudson/plugins/copyartifact/CopyArtifact.java src/main/java/hudson/plugins/copyartifact/FilePathCopyMethod.java src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/4fb9dba52c63c433cd44403af71067c79f2764e5 Log: Merge pull request #7 from fredg02/master merged tivv's pull request and adapted test for JENKINS-11828 Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/6ff97e6...4fb9dba

          dogfood added a comment -

          Integrated in plugins_copyartifact #69
          Reverted imports to original style, adapted test for JENKINS-11828

          Fred G : 781095924528496b3ec7998a625808875c5215c0
          Files :

          • src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java
          • src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java

          dogfood added a comment - Integrated in plugins_copyartifact #69 Reverted imports to original style, adapted test for JENKINS-11828 Fred G : 781095924528496b3ec7998a625808875c5215c0 Files : src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java

          Fred G added a comment -

          Fixed in version 1.19. Thanks Vitalii.

          Fred G added a comment - Fixed in version 1.19. Thanks Vitalii.

          Daniel Mladek added a comment -

          I wonder how to utilised this in Declarative Pipeline. 
          I have something like this:

          stage('Copy Artifacts from the UPSTREAM job') {
                steps {
                   script {
                       step ([$class: 'CopyArtifact',
                       projectName: 'Avon Trunk Boot Verify',
                       selector: upstream(),
                       filter: "FW/mcspuck*.*,FW/mcsangelo*.*",
                       target: '.']);
                   }
                }
              }
          

          But dunno how to set that attribute to true like it is in the UI.

          Thanks

          Daniel Mladek added a comment - I wonder how to utilised this in Declarative Pipeline.  I have something like this: stage( 'Copy Artifacts from the UPSTREAM job' ) { steps { script { step ([$class: 'CopyArtifact' , projectName: 'Avon Trunk Boot Verify' , selector: upstream(), filter: "FW/mcspuck*.*,FW/mcsangelo*.*" , target: '.' ]); } } } But dunno how to set that attribute to true like it is in the UI. Thanks

            fredg Fred G
            tivv Vitalii Tymchyshyn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: