Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions engine/compiler/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 8 additions & 1 deletion engine/compiler/clone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,17 @@ func TestCloneParams(t *testing.T) {
if len(params) != 0 {
t.Errorf("Expect zero depth ignored")
}
params = cloneParams(manifest.Clone{Depth: 50, SkipVerify: true})
params = cloneParams(manifest.Clone{Retries: 0})
if len(params) != 0 {
t.Errorf("Expect zero retries ignored")
}
params = cloneParams(manifest.Clone{Depth: 50, SkipVerify: true, Retries: 4})
if params["PLUGIN_DEPTH"] != "50" {
t.Errorf("Expect clone depth 50")
}
if params["PLUGIN_RETRIES"] != "4" {
t.Errorf("Expect clone retries 4")
}
if params["GIT_SSL_NO_VERIFY"] != "true" {
t.Errorf("Expect GIT_SSL_NO_VERIFY is true")
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/docker/go-connections v0.3.0 // indirect
github.com/drone/drone-go v1.7.1
github.com/drone/envsubst v1.0.3
github.com/drone/runner-go v1.11.0
github.com/drone/runner-go v1.12.0
github.com/drone/signal v1.0.0
github.com/ghodss/yaml v1.0.0
github.com/gogo/protobuf v0.0.0-20170307180453-100ba4e88506 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ github.com/drone/drone-go v1.7.1/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRp
github.com/drone/envsubst v1.0.2/go.mod h1:bkZbnc/2vh1M12Ecn7EYScpI4YGYU0etwLJICOWi8Z0=
github.com/drone/envsubst v1.0.3 h1:PCIBwNDYjs50AsLZPYdfhSATKaRg/FJmDc2D6+C2x8g=
github.com/drone/envsubst v1.0.3/go.mod h1:N2jZmlMufstn1KEqvbHjw40h1KyTmnVzHcSc9bFiJ2g=
github.com/drone/runner-go v1.10.0 h1:IVfdfZi/p36D0hgXiVUieGJoLrvJTL02Kk3CXDVFInE=
github.com/drone/runner-go v1.10.0/go.mod h1:vu4pPPYDoeN6vdYQAY01GGGsAIW4aLganJNaa8Fx8zE=
github.com/drone/runner-go v1.11.0 h1:zcn8Hmi0H1I4pxdJCauykG5teu3AH84Uw4WM7VrKlIM=
github.com/drone/runner-go v1.11.0/go.mod h1:vu4pPPYDoeN6vdYQAY01GGGsAIW4aLganJNaa8Fx8zE=
github.com/drone/runner-go v1.12.0 h1:zUjDj9ylsJ4n4Mvy4znddq/Z4EBzcUXzTltpzokKtgs=
github.com/drone/runner-go v1.12.0/go.mod h1:vu4pPPYDoeN6vdYQAY01GGGsAIW4aLganJNaa8Fx8zE=
github.com/drone/signal v1.0.0 h1:NrnM2M/4yAuU/tXs6RP1a1ZfxnaHwYkd0kJurA1p6uI=
github.com/drone/signal v1.0.0/go.mod h1:S8t92eFT0g4WUgEc/LxG+LCuiskpMNsG0ajAMGnyZpc=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
Expand Down