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 
+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  and Go , however, you can use pretty much any language you want as long as it runs in a docker container.