0

I need to configure a gitlab ci job to be re-executed when it fails. More specifically the deploy job. I set up the job with a retry value and tried to force it to fail to test it. But I couldn't achieve the job start again. Here an example of what I'm trying to do:

deploy:
    stage: deploy
    retry: 2
    script:
        - echo "running..."
        - exit 1
    only: [qa_branch]

  • Can you try to add `retry:when` to select which failure to retry. Here are the possible input options for `retry:when` https://docs.gitlab.com/ee/ci/yaml/#retry – Sourav Oct 06 '22 at 02:29

0 Answers0