mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows: Ensure frozen cope with prefix
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
37fe4bdb59
commit
b820ead426
1 changed files with 10 additions and 3 deletions
|
@ -3,7 +3,7 @@ set -e
|
||||||
|
|
||||||
# This scripts sets up the required images for Windows to Windows CI
|
# This scripts sets up the required images for Windows to Windows CI
|
||||||
|
|
||||||
# Tag windowsservercore as latest
|
# Tag (microsoft/)windowsservercore as latest
|
||||||
set +e
|
set +e
|
||||||
! BUILD=$(docker images | grep windowsservercore | grep -v latest | awk '{print $2}')
|
! BUILD=$(docker images | grep windowsservercore | grep -v latest | awk '{print $2}')
|
||||||
if [ -z $BUILD ]; then
|
if [ -z $BUILD ]; then
|
||||||
|
@ -11,11 +11,18 @@ if [ -z $BUILD ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Get the name. Around 2016 6D TP5, these have the microsoft/ prefix, hence cater for both.
|
||||||
|
! IMAGENAME=$(docker images | grep windowsservercore | grep -v latest | awk '{print $1}')
|
||||||
|
if [ -z $IMAGENAME ]; then
|
||||||
|
echo "ERROR: Could not find windowsservercore image"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
! LATESTCOUNT=$(docker images | grep windowsservercore | grep -v $BUILD | wc -l)
|
! LATESTCOUNT=$(docker images | grep windowsservercore | grep -v $BUILD | wc -l)
|
||||||
if [ $LATESTCOUNT -ne 1 ]; then
|
if [ $LATESTCOUNT -ne 1 ]; then
|
||||||
set -e
|
set -e
|
||||||
docker tag windowsservercore:$BUILD windowsservercore:latest
|
docker tag $IMAGENAME:$BUILD windowsservercore:latest
|
||||||
echo "INFO: Tagged windowsservercore:$BUILD with latest"
|
echo "INFO: Tagged $IMAGENAME:$BUILD as windowsservercore:latest"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Busybox (requires windowsservercore)
|
# Busybox (requires windowsservercore)
|
||||||
|
|
Loading…
Add table
Reference in a new issue