update git clone image tags for windows

This commit is contained in:
Brad Rydzewski 2019-03-14 17:42:31 -07:00
parent 961c7a1954
commit d8a884b861
2 changed files with 16 additions and 2 deletions

View File

@ -33,8 +33,14 @@ func cloneImage(src *yaml.Pipeline) string {
return "drone/git:linux-arm"
case src.Platform.OS == "linux" && src.Platform.Arch == "arm64":
return "drone/git:linux-arm64"
case src.Platform.OS == "windows" && src.Platform.Version == "1809":
return "drone/git:windows-1809-amd64"
case src.Platform.OS == "windows" && src.Platform.Version == "1803":
return "drone/git:windows-1803" // TODO update to correct format
case src.Platform.OS == "windows" && src.Platform.Version == "1709":
return "drone/git:windows-1709-amd64"
case src.Platform.OS == "windows":
return "drone/git:windows-1803"
return "drone/git:windows-1809-amd64"
default:
return "drone/git"
}

View File

@ -28,9 +28,17 @@ func TestCloneImage(t *testing.T) {
platform: yaml.Platform{OS: "linux", Arch: "arm64"},
image: "drone/git:linux-arm64",
},
{
platform: yaml.Platform{OS: "windows", Arch: "amd64", Version: "1709"},
image: "drone/git:windows-1709-amd64",
},
{
platform: yaml.Platform{OS: "windows", Arch: "amd64", Version: "1809"},
image: "drone/git:windows-1809-amd64",
},
{
platform: yaml.Platform{OS: "windows", Arch: "amd64"},
image: "drone/git:windows-1803",
image: "drone/git:windows-1809-amd64",
},
{
platform: yaml.Platform{},