1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Consider WINDOWS_BASE_IMAGE_TAG override when setting Windows base image for tests

Signed-off-by: Deep Debroy <ddebroy@docker.com>
(cherry picked from commit 15419d7ba0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Deep Debroy 2019-05-14 13:27:18 -07:00 committed by Sebastiaan van Stijn
parent 55c5381584
commit d347049802
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -78,10 +78,13 @@ func getPlatformDefaults(info types.Info, osType string) PlatformDefaults {
}
case "windows":
baseImage := "microsoft/windowsservercore"
if override := os.Getenv("WINDOWS_BASE_IMAGE"); override != "" {
baseImage = override
fmt.Println("INFO: Windows Base image is ", baseImage)
if overrideBaseImage := os.Getenv("WINDOWS_BASE_IMAGE"); overrideBaseImage != "" {
baseImage = overrideBaseImage
if overrideBaseImageTag := os.Getenv("WINDOWS_BASE_IMAGE_TAG"); overrideBaseImageTag != "" {
baseImage = baseImage + ":" + overrideBaseImageTag
}
}
fmt.Println("INFO: Windows Base image is ", baseImage)
return PlatformDefaults{
BaseImage: baseImage,
VolumesConfigPath: filepath.FromSlash(volumesPath),