2

Is there a way of retriggering a successful child pipeline in gitlab ? I don't see any retry button in trigger job, which we otherwise see in normal pipline job. Is there a way/workaround to get an option to do so ?

I went through the gitlab doc, it only talks about retrying failed jobs in child pipeline.

1 Answers1

2

That is currently (Q4 2022) not supported yet.
(And retry: is indeed only for failed job)

It is requested by issue 29456:

Ability to rerun a successful pipeline via "Retry" button

Not only failed pipelines sometimes need a rerun but also successful ones:

  • If your tests are unreliable and you are sceptical that the test success is repeatable
  • If your jobs depend on outside factors
  • If your job depends on some predefined CI variable which can change without a code change

So in general, a pipeline should show the retry button even in case of a success. Then, all jobs should be retried again

The currently suggested workaround of CI / CD -> Pipelines -> Run Pipeline does not always work, especially not for merge request pipelines.
In my case, I have all jobs defined as only: merge_requests and "Run Pipeline" responds with the error "No stages / jobs for this pipeline"

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Other use cases: [issue 3450](https://gitlab.com/gitlab-org/gitlab/-/issues/3450) or ["How do I always force a rerun of a job defined as a dependency (Gitlab CI/CD)"](https://stackoverflow.com/q/72511382/6309). – VonC Nov 07 '22 at 07:46