-
Bug
-
Resolution: Unresolved
-
Major
-
None
The method download is not working synchronous in a scripted pipeline.
A simple could like this turns out the method starts to download some files (but not all) and then then next message in the script is already executed:
timestamps { node('compile') { deleteDir() stage ('Checkout SystemTools'){ Artefacts art = new Artefacts() println("Before Downloading SystemTools") art.download('AEP.Tools/system-tools/windows/*', '.\\SystemTools\\') println("After Downloading SystemTools") println("Before Downloading cyclondx") art.download('AEP.Tools/cyclonedx-cli/cyclonedx-cli.exe', '.\\SystemTools\\') }
In the attached screenshot you can see that the message "After Downloading Systemtools" is printed out BEFORE the download is finished completely.
This behavior can cause serious race conditions in the code.