Automatically restart a build

My git clone step very often fails. Would it be possible to automatically retry the clone step or restart the build when it happens?

The clone is handled by plugins, which means you could create a custom clone plugin with retry logic. You can override the default clone plugin with the below syntax [1]

+ default:
+   image: allanrenucci/custom-clone-plugins-with-retry

    image: golang
    commands: go build

We have some basic tutorials available for creating plugins in bash [1] and Go [2], however, you can use pretty much any language you want as long as it runs in a docker container.


1 Like