Julio Romero
Julio Romero

Reputation: 31

Gitlab CI retry failed job automatically

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]

Upvotes: 3

Views: 7066

Answers (0)

Related Questions