Feedback

Chat Icon

Cloud Native CI/CD with GitLab

From Commit to Production Ready

Managing Artifacts in GitLab CI/CD: Data Sharing Between Jobs
56%

Displaying Artifacts in the Merge Request UI

When you have a merge request, you can display the artifacts generated by the pipeline in the merge request UI with a custom name. This is done using the expose_as keyword. In the following example, we will create a new branch, add the expose_as keyword to the flake8.txt artifact, and push the changes to the remote repository:

# Create a new branch
git checkout -b feature/testing-artifacts

Change the .gitlab-ci.yml file as follows and add the expose_as keyword:

cat <$HOME/todo/app/.gitlab-ci.yml && \
cd $HOME/todo/app && \
git add . && \
git commit -m "Add expose_as" && \
git push origin feature/testing-artifacts
image: python:3.12

stages:
  - build  
  - test   
  - report

build:
  stage: build  
  script:
    - pip install -r requirements.txt

test:
  stage: test

Cloud Native CI/CD with GitLab

From Commit to Production Ready

Enroll now to unlock all content and receive all future updates for free.