jenkinsci / artifactory-artifact-manager-plugin

artifactory-artifact-manager-plugin
https://plugins.jenkins.io/artifactory-artifact-manager/
MIT License
0 stars 5 forks source link

Copy artifacts and stash doesn't work when replaying jobs #3

Closed jonesbusy closed 6 months ago

jonesbusy commented 6 months ago

Jenkins and plugins versions report

All

What Operating System are you using (both controller, and any agents involved in the problem)?

All

Reproduction steps

pipeline {
    agent none
    options {
        preserveStashes()
    }
    stages {
      stage('Build') {
        parallel {
          stage('Agent 1') {
            agent any
            steps {
              sh(script: 'mkdir target && echo "Hello" > target/foo.txt')
              stash(name: 'agent1', includes: 'target/**')
            }
          }
          stage('Agent 2') {
            agent any
            steps {
              sh(script: 'mkdir dist && echo "World" > dist/bar.txt')
              stash(name: 'agent2', includes: 'dist/**')
            }
          }
        }
      }
      stage('Result') {
        agent any
        steps {
          unstash(name: 'agent1')
          unstash(name: 'agent2')
        }
      }
    }
}

Then replay on stage 'Result'

Expected Results

Artifact and stashes are restored if possible

Actual Results

[18:01:10.441+01:00] - Restarted from build #5, stage Result
[18:01:10.463+01:00] - Copy {0} artifacts and {1} stashes from {2} to {3}
[18:01:10.532+01:00] - Failed to copy artifact and stashes on Artifactory Storage. Details Failed to copy from src=*****/jenkins/*****/temp/test-demo/5/artifacts to target=******/jenkins/****/temp/test-demo/6/artifacts: Could not find item at ******:jenkins/*******/temp/test-demo/5/artifacts
[18:01:10.533+01:00] - org.jfrog.artifactory.client.impl.CopyMoveException: Failed to copy from src=*******/jenkins/*****/temp/test-demo/5/artifacts to target=*****/jenkins/*****/temp/test-demo/6/artifacts: Could not find item at *****:jenkins/****/temp/test-demo/5/artifacts

Anything else?

No response

Are you interested in contributing a fix?

Yes I will