Gitlab CI retry failed job automatically

3.3k views Asked by At

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]

0

There are 0 answers