cache used for passing artifacts in maven project
The documentation at
https://docs.gitlab.com/ee/ci/caching/#cache-vs-artifacts
says
Don’t use caching for passing artifacts between stages, as it is designed to store runtime dependencies needed to compile the project
but the example in the documentation at
is using exactly the caching mechanism.
The documentation should be updated to use the artifacts mechanism, because we recently encountered exactly this problem and deployed a wrong artifact with the pipeline.