Managing Artifacts in GitLab CI/CD: Data Sharing Between Jobs
43%
The Isolation Principle in CI/CD
Artifacts are files generated by a job that you want to pass to another job. You can use artifacts to pass files between jobs in the same pipeline or between jobs in different pipelines.
Let's say we want to show the warnings generated by the flake8 tool (the code style guide enforcement tool for Python) in a job called report. This is how we may proceed to create and launch the pipeline:
cat <$HOME/todo/app/.gitlab-ci.yml && \
cd $HOME/todo/app && \
git add . && \
git commit -m "Show warnings in the report job" && \
git push origin main
image: python:3.12
stages:
- build
- test
- report
build:
stage: build
script:
- pip install -r requirements.txt
test:
stage: testCloud Native CI/CD with GitLab
From Commit to Production ReadyEnroll now to unlock all content and receive all future updates for free.
