moby/hack/ci
Sebastiaan van Stijn 640193b2bb
Windows: fix Golang version checks for GO_VERSION build-arg
This check was used to make sure we don't bump Go versions independently
(Linux/Windows). The Dockerfile switched to using a build-arg to allow
overriding the Go version, which rendered this check non-functional.

It also fails if Linux versions use a specific variant of the image;

08:41:31 ERROR: Failed 'ERROR: Mismatched GO versions between Dockerfile and Dockerfile.windows. Update your PR to ensure that both files are updated and in sync. ${GO_VERSION}-stretch ${GO_VERSION}' at 07/20/2019 08:41:31
08:41:31 At C:\gopath\src\github.com\docker\docker\hack\ci\windows.ps1:448 char:9
08:41:31 +         Throw "ERROR: Mismatched GO versions between Dockerfile and D ...
08:41:31 +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This patch fixes the check by looking for the value of `GO_VERSION` instead
of looking at the `FROM` line (which is harder to parse).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4fa57a8191)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-08 03:21:12 +02:00
..
arm Add a new entrypoint for CI 2017-09-20 17:26:30 -04:00
experimental Add a new entrypoint for CI 2017-09-20 17:26:30 -04:00
janky Move docker-py tests to the end 2019-04-05 10:15:08 -04:00
powerpc Add a new entrypoint for CI 2017-09-20 17:26:30 -04:00
windows.ps1 Windows: fix Golang version checks for GO_VERSION build-arg 2019-08-08 03:21:12 +02:00
z Add a new entrypoint for CI 2017-09-20 17:26:30 -04:00