I'd add something like a sleep to the loop.... BR, Christoph
[email protected] schrieb am Donnerstag, 2. März 2023 um 01:27:09 UTC+1: > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/cb864544-9875-467b-b255-3abf944656efn%40googlegroups.com.
