I'm using declarative pipeline as Jenkins job. Stages 'Build' and 'Archive' run both in parallel to build and gather artifacts from nodes of different platforms (linux 32 & 64, windows, etc...)
Unfortunately, the artifacts are all of the same name. I cannot archive multiple mylib.so
in a single pipeline job. Or can I?
Well, in the case of Windows the library will be a .dll
and so there is a difference, but that cannot be an overall solution to this.
Is there a way to distinguish between artifacts built by several nodes?
My pipeline looks similar to this:
pipeline {
agent none
stages {
stage('Build') {
parallel {
stage('Build on some Linux x64') {
agent { node { label 'linux_64' } }
steps {
// call make
}
}
stage('Build some more...') { ... }
}
}
stage('Archive') {
parallel {
stage('Archive from Linux x64') {
agent { node { label 'linux_64' } }
steps {
archive includes: 'out/*.so'
}
}
stage('Archive some more...') { ... }
}
}
}
}
I've also seen this, so there may be nothing directly out-of-the-box.