Hi,

I'm trying to migrate some of our jobs to Jenkins 2.0 Pipeline and I'm 
facing issues copying data around. 

Our jobs are generated by a DSL and there are a big bunch of jobs created. 
I use 'build' steps to run those jobs and try to copy data from them to use 
them in the following steps... But I'm unable to copy anything...

Example:

node('master') {
stage("Produce data") {
    build('test.producer')
}

stage("Collect data") {
    unarchive(mapping: ['file.txt': 'file.txt'])
    readProperties('file.txt')
    echo "Variable value: ${DATA}"
}
}


I tried everything... stash and unstash, unarchive, etc... What I'm doing 
wrong?

The 'test.producer' job creates a file that is expected to be copied at the 
Collect stage.

This is the output:

[Pipeline] nodeRunning on master in 
/var/jenkins_home/jobs/test.pipeline/workspace[Pipeline] {[Pipeline] 
stage[Pipeline] { (Produce data)[Pipeline] build (Building 
test.producer)Scheduling project: test.producer 
<http://192.168.99.100:18080/job/test.producer/>

Starting building: test.producer #7 
<http://192.168.99.100:18080/job/test.producer/7/>[Pipeline] }[Pipeline] // 
stage[Pipeline] stage[Pipeline] { (Collect data)[Pipeline] unarchive[Pipeline] 
}[Pipeline] // stage[Pipeline] }[Pipeline] // node[Pipeline] End of 
PipelineERROR: no artifacts to unarchive in file.txtFinished 
<http://stacktrace.jenkins-ci.org/search?query=Finished>: FAILURE


with stash

Started by user anonymous <http://192.168.99.100:18080/user/null>[Pipeline] 
nodeRunning on master in 
/var/jenkins_home/jobs/test.pipeline/workspace[Pipeline] {[Pipeline] 
stage[Pipeline] { (Produce data)[Pipeline] build (Building 
test.producer)Scheduling project: test.producer 
<http://192.168.99.100:18080/job/test.producer/>
Starting building: test.producer #4 
<http://192.168.99.100:18080/job/test.producer/4/>[Pipeline] stash[Pipeline] 
}[Pipeline] // stage[Pipeline] }[Pipeline] // node[Pipeline] End of 
PipelineERROR: No files included in stashFinished 
<http://stacktrace.jenkins-ci.org/search?query=Finished>: FAILURE


Thanks for the help you can provide me

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f95ef25a-c8d7-4e3d-9eb9-27b4280f12d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to