Copied artifact not shown in job?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Copied artifact not shown in job?

ZillaYT
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 [Pipeline] archiveArtifacts 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5e3ab099-1f8d-4ba0-9dbf-d7df50e5c333n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Copied artifact not shown in job?

ZillaYT
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 [hidden email] 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 [Pipeline] archiveArtifacts 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0e7ada39-0eb3-42ef-8708-f9c7d4d1dc05n%40googlegroups.com.