pardahlman
pardahlman

Reputation: 1454

Depend on named artifact in GitLab pipeline

The first job in my GitLab pipeline builds multiple large artifacts of different types:

The job publishes multiple artifacts, at the moment one for each type. The size of all artifacts are in the realm om hundreds of megabytes.

In the next stage, multiple jobs are run in parallel to process and publish the artifacts from the build step. A significant amount of time is spent to download all artifacts from the build job, even though each job only needs one artifact. How can I configure GitLab CI so that a job depends on a specific artifact from a job?

Upvotes: 1

Views: 604

Answers (1)

rink.attendant.6
rink.attendant.6

Reputation: 46267

At time of writing (GitLab Runner 16.3), this is not possible. The most granular that can be done is by job:

dependencies

Use the dependencies keyword to define a list of jobs to fetch artifacts from. You can also set a job to download no artifacts at all.

If you do not use dependencies, all artifacts from previous stages are passed to each job.

Keyword type: Job keyword. You can use it only as part of a job.

Possible inputs:

The names of jobs to fetch artifacts from. An empty array ([]), to configure the job to not download any artifacts.

If it is possible to split the first job into multiple jobs that generate separate artifacts, you can work around the issue by specifying the specific build job in the corresponding process and process jobs.

Upvotes: 0

Related Questions