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]
+clone:
+ default:
+ image: allanrenucci/custom-clone-plugins-with-retry
pipeline:
build:
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] http://docs.drone.io/cloning/
[2] http://docs.drone.io/creating-custom-plugins-bash/
[3] http://docs.drone.io/creating-custom-plugins-golang/
1 Like