I even added the "onlyIfSuccessful" option, to no avail archiveArtifacts artifacts: "DependencyCheckerFailuresReport.yml",
fingerprint: true, onlyIfSuccessful: false On Monday, September 21, 2020 at 6:06:46 PM UTC-4 zil...@gmail.com wrote: > I have a JobA that copies an artifact produced JobB > > JobA > > stage('Get dependency checker failures report') { > > try { > > copyArtifacts projectName: "JobB", > > filter: 'DependencyCheckerFailuresReport.yml', > > fingerprintArtifacts: true, > > selector: specific(depCheckJob.number.toString()) > > archiveArtifacts artifacts: "DependencyCheckerFailuresReport.yml", > > fingerprint: true > > } > > catch(err) { > > foundDepCheckErrors = false > > *println* "No dependency check failures!" > > } > > } > > if (foundDepCheckErrors) { > > currentBuild.result = 'FAILURE' > > } > > and that functionality works fine, that is, I see on the JobA's console > > Copied 1 artifact from "JobB" build number 145 > <https://ci.eng.ziftsolutions.com/job/Utilities/job/ECS-dependecy-checker/145/> > > [Pipeline] archiveArtifacts > <https://ci.eng.ziftsolutions.com/view/Zift-Mono-ECS/job/production-check-dependencies/16/console#> > > Archiving artifacts > > However, I don't see the artifact on JobA's page, on the part part that > shows "Last successful artifacts" section? If I remove the last if() > clause, I do see the artifact. However, I want the if() clause there, that > is, if JobA is able to copy this artifact from JobB, I want JobA to fail. > > Any ideas? > > Thanks, > Chris > -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0e7ada39-0eb3-42ef-8708-f9c7d4d1dc05n%40googlegroups.com.