I have the following Jenkins setup:
- A multi-branch pipeline which sometimes (on certain tag builds) triggers
- a pipeline that builds an installer from the upstream artifacts.
In the upstream MB-pipeline, I have the following fragments:
options {
copyArtifactPermission('my-downstream-project');
}
post {
success {
script {
if (isRelease()) {
build job: 'my-downstream-project'
}
}
}
}
The downstream pipeline, I then try to grab the artifacts:
copyArtifacts projectName: 'my-upstream-project',
selector: upstream(),
filter: '*.jar',
fingerprintArtifacts: true
While the downstream build is started, it fails with:
ERROR: Unable to find project for artifact copy: hds-access-code-cache This may be due to incorrect project name or permission settings; see help for project name in job configuration.
My understanding so far:
- While I can't configure the Copy Artifact permission via the configuration UI for the MB-pipeline, the option is accepted and should work.
- The examples I can find would use
projectName: 'my-upstream-project/tag-name'as that's the actual job. I don't have a fixed branch or tag, though.
How can I correctly access the upstream artifact?