Skip to content

Commit

Permalink
Merge pull request moby#230 from thaJeztah/18.09_backport_windows_tag
Browse files Browse the repository at this point in the history
[18.09 backport] Consider WINDOWS_BASE_IMAGE_TAG override when setting Windows base image for tests
  • Loading branch information
andrewhsu committed Jun 18, 2019
2 parents 41fbd15 + fed2792 commit bb54c5b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/test/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,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),
Expand Down

0 comments on commit bb54c5b

Please sign in to comment.