-
Bug
-
Resolution: Not A Defect
-
Minor
-
Jenkins: 2.107.3
Plugin: 1.39.1
OS: CentOS release 6.9
Apache Tomcat/9.0.8
-
-
n/a
I have 2 Freestyle jobs that each create a series of files/subdirs/files. I have updated these jobs to set Permission to Copy Artifact for my 3rd job. I have added Archive the artifacts as a Post Build Action for the Mac_job and have specified the files I want archived. I have the desired files in the workspace of the Win_job as an experiment to see if either configuration works better than the other. This part appears to be working fine for both build jobs, and the resulting artifacts are being stored in their archive directories:
~/.jenkins/jobs/Mac_job/lastSuccessful/archive/release
~/.jenkins/workspace/Win_job/release
I have a 3rd job (deploy_job) that needs to pull in the artifacts from the other two jobs into its workspace so that it can stage the files to other locations. The job is parameterized with 2 boolean parameters (MAC_RELEASE, WIN_RELEASE), each to align with one of the "upstream" jobs. Note that this is not a pipeline job though.
I've added two build steps - Copy artifacts from another project, and have set them to the other project names. The first one for the Mac_job is using Latest successful build. The second one for the Win_job is using Copy from WORKSPACE of latest completed build. They're different merely because I haven't gotten either configuration to work and have been experimenting. I have specified the Artifacts to copy (release/**), have provided a separate Target directory in the deploy_job for each copy task and have set a Parameter filter for each copy task using the associated boolean parameter, like so:
MAC_RELEASE=true <–for the Mac_job
WIN_RELEASE=true <–for the Win_job
I do have the Fingerprint Artifacts selected, though not really sure what this step does. In my Post-build Actions, I use Flexible publish plugin, and if the boolean resolves to true, it takes the files in the deploy_job Target directory(ies) and copies them to another system. But from the console log it doesn't look like it even gets this far in the job as it errors out trying to copy the artifacts from the other projects into the workspace. If I run the deploy_job checking both boolean parameters in the Build with Parameters, it appears to error at trying to locate the Mac_job build artifact directory. The complete console output:
Building on master in workspace ~/.jenkins/workspace/deploy_job
Run condition [Boolean condition] enabling prebuild for step [[Send build artifacts over SSH]]
Run condition [Boolean condition] enabling prebuild for step [[Send build artifacts over SSH]]
No emails were triggered.
ERROR: Unable to find a build for artifact copy from: Mac_job
[Boolean condition] checking [true] against [^(1|y|yes|t|true|on|run)$] (origin token: ${MAC_RELEASE})
Run condition [Boolean condition] enabling perform for step [[Send build artifacts over SSH]]
SSH: Current build result is [FAILURE], not going to run.
[Boolean condition] checking [true] against [^(1|y|yes|t|true|on|run)$] (origin token: ${WIN_RELEASE})
Run condition [Boolean condition] enabling perform for step [[Send build artifacts over SSH]]
SSH: Current build result is [FAILURE], not going to run.
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
From the output it appears that it fails the job because it is unable to map to the lastSuccessful link on the Mac_job. But what's more confusing is if I run the deploy_job with only having the WIN_RELEASE boolean parameter checked, it still looks like it's trying to find the Mac_job build artifacts for some reason. Though the boolean value says it's preventing the step from being performed, there is still the error in attempting to locate the build artifacts. But it shouldn't be trying to locate any source or files because the parameter was set to false.
Building on master in workspace /opt/app/ngt/support/.jenkins/workspace/deploy_job
Run condition [Boolean condition] enabling prebuild for step [[Send build artifacts over SSH]]
Run condition [Boolean condition] enabling prebuild for step [[Send build artifacts over SSH]]
No emails were triggered.
ERROR: Unable to find a build for artifact copy from: Mac_job
[Boolean condition] checking [false] against [^(1|y|yes|t|true|on|run)$] (origin token: ${MAC_RELEASE})
Run condition [Boolean condition] preventing perform for step [[Send build artifacts over SSH]]
[Boolean condition] checking [true] against [^(1|y|yes|t|true|on|run)$] (origin token: ${WIN_RELEASE})
Run condition [Boolean condition] enabling perform for step [[Send build artifacts over SSH]]
SSH: Current build result is [FAILURE], not going to run.
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
None of the output is in line with what I am used to seeing in console logs, and I'm not sure if it's the Copy Artifacts plugin that is generating the Run condition lines at the top of the output? So either the Which build and/or Parameter filters components are not working in the Copy artifacts plugin, or the documentation is misleading on how to use these components for this plugin.