Use the artifacts property to pass build artifacts from one build stage down to all the following stages.
stages: |
In the .gitlab-ci.yml above we are defining a build with 2 stages.
In stage_1 we are creating 4 files:
. |
In stage_2, the following files files (created in stage_1) are available:
. |
The magic happens in the artifacts section of stage_1:
artifacts: |
which means pass file1.txt and the dir1 folder (+ it’s content) to all the following stages.