pages:deploy job removes artifacts even when there are stages to run after it, breaking those stages
For pushing changes to GitLab.com Pages, I have two jobs over two stages:
- A job named
pagesthat creates the
publicartifacts; it runs in a
- A job that hits the Cloudflare API to purge the CDN cache for the site; it runs in a
deploystage following the above.
With this, I regularly receive the runner error in the
deploy stage, preventing the Cloudflare CDN cache purge as the job doesn't run:
ERROR: Downloading artifacts from coordinator... not found id=****** responseStatus=404 Not Found token=******
The error occurs randomly; it smells like a race condition.
ARTIFACT_DOWNLOAD_ATTEMPTS variable does not help, presumably because the artifacts were deleted by some other process. Does this occur because the GitLab Pages job does something "special" for handling of the
pages artifacts? (Does it move/copy/delete them?)
Is there a way to disable the requirements for the second job having access to the artifacts? (It doesn't need them; and only relies on a copy of the git checkout.) I couldn't find any
gitlab-ci.yml documentation suggesting this was possible, though it would be handy.