My scenario is: Jenkins job (shell script) performs some work and notifies me (with CURL) that the job is completing. Then it performs the last (internal) step - it compresses the artifacts to ZIP (Jenkins always do it). So, my notified service got the notification and started to download artifacts archive. Sure, Jenkins needs some time to compress them. In previous Jenkins versions I got HTTP 403 (which is wrong, it could be HTTP 404), but it was in previous version. Now Jenkins has more strange behavior while artifacts are not ready:
- downloading service (I use aria2 software for it) checks the artifacts with HTTP HEAD
- Jenkins responses with HTTP 200 and some length
- so the downloading service starts to download artifacts and gets zero length content
- so it fails with a message like "mismatched size: expected NNN but got 0 bytes"
As I understand, correct behavior must be HHTP 404 while artifacts are be ready - Gitlab does exactly this. How to fix it weird behavior?