Skip to content

ci: Use a dummy collector if the feature is not available

Lin Jen-Shin requested to merge use-dummy-collector-if-no-feature into master

What does this MR do and why?

Use a dummy collector if the feature is not available

Dev is a CE/FOSS instance so needs.project is not available, breaking the whole pipeline. See: https://dev.gitlab.org/gitlab/gitlab-ee/-/pipelines/314462

Which shows:

jobs:rspec:artifact-collector as-if-foss:needs:need has an unsupported type

We detect if the feature is available. If it is, include the file which has the original job definition. Otherwise, just include a dummy one which defines a dummy job. It's ok, this job is optional anyway, running or not doesn't matter.

How to validate

Tested at https://dev.gitlab.org/gitlab/gitlab-ee/-/merge_requests/1556/pipelines

Edited by Lin Jen-Shin

Merge request reports