Add retries option to the clone step (#44)

* Add retries option to the clone step
Used to support https://github.com/drone/drone-git/pull/43
Will require a go mod update to add the arg to the manifest: https://github.com/drone/runner-go/pull/22

* Update `runner-go` to v1.12.0

* Add test
This commit is contained in:
Julien Duchesne
2022-06-09 11:14:11 -04:00
committed by GitHub
parent 218235e419
commit 65d05f2c6d
4 changed files with 14 additions and 6 deletions

View File

@@ -34,6 +34,9 @@ func cloneParams(src manifest.Clone) map[string]string {
if depth := src.Depth; depth > 0 {
dst["PLUGIN_DEPTH"] = strconv.Itoa(depth)
}
if retries := src.Retries; retries > 0 {
dst["PLUGIN_RETRIES"] = strconv.Itoa(retries)
}
if skipVerify := src.SkipVerify; skipVerify {
dst["GIT_SSL_NO_VERIFY"] = "true"
dst["PLUGIN_SKIP_VERIFY"] = "true"