Artifacts persist on builds image with GIT_STRATEGY = None
If the same runner is reused by b across two pipelines without being used by a, the second run will have artifacts from both pipelines.
stages:
- a
- b
job_a:
stage: a
tags:
- docker
script:
- touch $PIPELINE_ID
artifacts:
paths:
- $PIPELINE_ID
job_b:
stage: b
variables:
GIT_STRATEGY: none
tags:
- docker
script:
- ls
before_script:
- ls
after_script:
- ls
dependencies:
- job_a
You can't leverage before or after script because before is run after artifacts are downloaded and after is run before they are uploaded.