For anyone else that stumbles across this question, I figured it out. I used the following code snippet to ensure the Jenkins pipeline waits until it sees the artifact before completing the pipeline run so that if any downstream jobs see the success, they can assume that the artifact is readily available through Jenkins.
echo('Waiting for build artifact to upload to Azure...') while (!currentBuild.getRawBuild().getArtifacts().toString().contains( "<your-build-artifact>")); echo('Build artifact uploaded successfully') Thanks! On Wednesday, March 1, 2023 at 1:41:08 PM UTC-8 Ian Boudreaux wrote: > Hi, > > We are using the Jenkins archiveArtifacts step with the Azure Artifact > manager plugin to store our artifacts in an Azure storage account. > > When we archive large artifacts using the archiveArtifacts step, it takes > ~15 minutes for our artifacts to be uploaded and visible on Jenkins. > > However, the archiveArtifacts step completes instantly and does not cause > the pipeline to wait until that artifact is visible. This causes issues > because other downstream pipelines use the artifacts from that pipeline and > because the pipeline is completing successfully and not waiting until the > artifact is actually available through Jenkins, the downstream pipelines > are failing. > > TLDR: My question is how can we force this Jenkins pipeline to wait until > that artifact is actually visible and available through Jenkins before it > completes as successful? > > Thanks! > Ian > -- 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/e4bf7957-d91c-4efe-ba02-b33e6b2d5450n%40googlegroups.com.