What happens when two jobs produce artifacts with conflicting locations?
In my GitLab CI log I pipeline with three stages
buildcreates a distribution
semantic-releasewhich bumps the version
The problem occurs in
publish. Sometimes I see the version unbumped. You can see here that
semantic-releasehas the higher number 148288 and it's running BEFORE
buildwhich overwriting the files. This means this job results in failure,
Downloading artifacts for semantic-release (148288)... Downloading artifacts from coordinator... ok id=148288 responseStatus=200 OK token=xFzfAzW6 Downloading artifacts for build (148285)... Downloading artifacts from coordinator... ok id=148285 responseStatus=200 OK token=zxTTXZoA
But sometimes the same pipeline elsewhere is succeeding,
Downloading artifacts for build (113579)... Downloading artifacts from coordinator... ok id=113579 responseStatus=200 OK token=Cfqjv8bG Downloading artifacts for semantic-release (113665)... Downloading artifacts from coordinator... ok id=113665 responseStatus=200 OK token=GAyN8S9M
Notice on this one the
buildjob comes before
semantic-release. That means the older artifacts are replaced. What happens if the artifact in
buildconflict by path? Is this defined?
inna last edited by
With the bug, basically the rule of thumb is this,
A job can rely on an artifact produced by a previous job only so long as no jobs previous to that one produced the same artifact.
The bug report suggests using https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html to only download specific artifacts.