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

Jenkins pipeline Declarative build step

XMLWordPrintable

      Hi there,

      I'm experiencing an issue with the last version of Jenkins 2.235.2.

      I have a jenkins declarative pipeline whit a  fews steps, that includes creating of an artifact and the trigger of another build job, everything from a pipleine prospective works fine, the issue that I'm having is with the downstream job that is not coping the artifact created by the

      last build running but from the last success build.

      I can attach some console output

      Started by upstream project "NJ/deploy%2Fproduction" build number 31
      originally caused by:
       Started by user DEV Jenkins
      Running as DEV Jenkins
      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] Start of Pipeline
      [Pipeline] node
      Running on DEV-DEPLOY01 in /jenkins/workspace/NJ/DeployToProd
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Admin approval required)
      [Pipeline] input
      Does the prod environment look OK?
      Proceed or Abort
      Approved by DEV Jenkins
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Copy Artifact from last build)
      [Pipeline] copyArtifacts
      Copied 1 artifact from "NJ » deploy/production" build number 22
      [Pipeline] }

      as you can see the original build is #31 but is getting the artifact from #22 (the last success build)

       

      this is the downstream project step

      pipeline {
       agent {
       label 'DEV-DEPLOY01'
       }
       stages {
       stage('Admin approval required') {
       steps {
       input 'Does the prod environment look OK?'
       }
       }
       stage('Copy Artifact from last build') {
       steps { 
       copyArtifacts(projectName: 'NJ/deploy%2Fproduction',filter: "build/nje*.rpm",target: '.')
       }
       }

       

      Did something change? in the previuos version was working smoothly

      Regards

       

       

            carminefabrizio Carmine Fabrizio
            carminefabrizio Carmine Fabrizio
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: