Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to NOT download artifacts from previous stages for build configuration?

I have a gitlab CI build process with 4 steps, in which artifacts produced in first step are packaged into docker image in 2nd step, then the output image is given as the artifact to 3rd step, and there is a 4th step afterwards, that notifies external service.

The 2nd step needs artifacts from step 1, the 3rd step need artifacts from step 2. This is done with 'dependencies'parameter and it works fine.

What is not working is the step 4, that need no artifacts. I've skipped the 'dependencies' block, then I've declared dependencies: [], but in both cases the both artifacts are downloaded!

How do I correct inform gitlab CI that the step has no dependencies? Or is it some bug in Gitlab CI?

like image 398
9ilsdx 9rvj 0lo Avatar asked Dec 05 '17 15:12

9ilsdx 9rvj 0lo


People also ask

Where are GitLab artifacts stored?

The artifacts are stored by default in /home/git/gitlab/shared/artifacts . Save the file and restart GitLab for the changes to take effect.

What are CI CD artifacts?

A release is a collection of artifacts in your DevOps CI/CD processes. An artifact is a deployable component of your application. Azure Pipelines can deploy artifacts that are produced by a wide range of artifact sources, and stored in different types of artifact repositories.

What are artifacts in GitLab CI?

Artifacts are files created as part of a build process that often contain metadata about that build's jobs like test results, security scans, etc. These can be used for reports that are displayed directly in GitLab or can be published to GitLab Pages or in some other way for users to review.

What are GitLab runners?

GitLab runner is a build instance which is used to run the jobs over multiple machines and send the results to GitLab and which can be placed on separate users, servers, and local machine. You can register the runner as shared or specific after installing it.


1 Answers

As per the gitlab-ci documentation:

To disable artifact passing, define the job with empty dependencies:

job:
  stage: build
  script: make build
  dependencies: []

I've found the same issue here: https://gitlab.com/gitlab-org/gitlab-runner/issues/228

This seems to be fixed in: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10359

Please update your CI Runner to a newer version as that should fix it.

like image 137
dbrekelmans Avatar answered Oct 22 '22 14:10

dbrekelmans