Is it possible in Gitlab UI to run a skipped item of the pipeline?
Asked Answered
T

1

15

I have a pipeline on Gitlab that have multiple steps. One step in the middle is optional but configured as mandatory and today it started to fail.

In Gitlab UI when it fails all next pipeline items are marked as skipped and greyed out.

Is it possible to run manually in UI a next step after the failed one?

Thiamine answered 22/4, 2021 at 14:41 Comment(2)
put allow_failure: true on this job and it will not impact next jobsAquila
yes, this can be a workaround but I'd like to run it manually only once without committing anything and making rollback later, if possible.Thiamine
E
2

Why it's not directly possible

CI pipelines are designed with a strong emphasis on dependency management. When a job in a pipeline fails, subsequent jobs are marked as skipped because they may rely on the output or success of the failed job. (Forcing execution could lead to unexpected errors.)

Workaround using allow_failure

You can mark a job as "allowed to fail" in your config. This way, subsequent jobs are not influenced by the status of this job.

allow_failure: true 

Important: Subsequent jobs should obviously not strictly depend on the job's successful completion and/or have built-in error handling.

https://docs.gitlab.com/ee/ci/yaml/#allow_failure

Ephesus answered 16/2 at 10:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.