Managing Artifacts in GitLab CI/CD: Data Sharing Between Jobs
57%
Multi-Project Pipelines: Downloading Artifacts from Another Project
If you want to get artifacts from the pipeline of another project, you can use the needs keyword with the project keyword. This is how it is done:
In the first project, project 1, we will generate an artifact called artifact1.txt:
job_1:
script:
- echo "This is job 1"
- echo "some data" > artifact1.txt
artifacts:
paths:
- artifact1.txt
In the second project, project 2, we will get the artifact1.txt artifact from project 1:
job_2:Cloud Native CI/CD with GitLab
From Commit to Production ReadyEnroll now to unlock all content and receive all future updates for free.
