The buildArtifacts rest call creates a temp dir and dumps all build files into it. After it does that, it archives the dir, streams it back to the client, and removes the temp dir. As of today we don't really name the temp dir uniquely - the name is simply the build name + number.
This makes bad things happen when this call is used concurrently. To reproduce:
1.Deploy some build into artifactory
2.download and modify the attached script (and request payload) with your build name and number.
3.Run the attached script - see that some of the responses will be:
"errors" : [
With varying exceptions on the artifactory.log
This is happening because multiple threads try to read/write to the same dir at the same time.