Skip to content

Commit 775621f

Browse files
committed
always pull new image
1 parent 82a3623 commit 775621f

5 files changed

Lines changed: 31 additions & 4 deletions

File tree

eng/docker/build-docker-sdk.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ if ($buildWindowsContainers)
3535

3636
$dockerFile="$dockerFilePrefix.windows.Dockerfile"
3737

38-
docker build --tag $imageName `
38+
docker build --pull `
39+
--tag $imageName `
3940
--build-arg CONFIGURATION=$configuration `
4041
--build-arg TESTHOST_LOCATION=. `
4142
--file $dockerFile `

eng/docker/build-docker-sdk.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ if [[ $privateaspnetcore -eq 1 ]]; then
5353
docker_file="$scriptroot/libraries-sdk-aspnetcore.linux.Dockerfile"
5454
fi
5555

56-
docker build --tag $imagename \
56+
docker build --pull \
57+
--tag $imagename \
5758
--build-arg CONFIGURATION=$configuration \
5859
--file $docker_file \
5960
$repo_root

src/libraries/System.Net.Http/tests/StressTests/HttpStress/run-docker-compose.ps1

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,17 @@ if ($useWindowsContainers)
5959

6060
$originalErrorPreference = $ErrorActionPreference
6161
$ErrorActionPreference = 'Continue'
62-
try {
63-
docker-compose --log-level DEBUG --file "$COMPOSE_FILE" build $BUILD_ARGS.Split() 2>&1 | ForEach-Object { "$_" }
62+
try {
63+
docker-compose --file "$compose_file" pull client
64+
if ($LASTEXITCODE -ne 0) {
65+
throw "docker-compose exited with error code $LASTEXITCODE"
66+
}
67+
docker-compose --file "$compose_file" pull server
68+
if ($LASTEXITCODE -ne 0) {
69+
throw "docker-compose exited with error code $LASTEXITCODE"
70+
}
71+
72+
docker-compose --log-level DEBUG --file "$COMPOSE_FILE" build $BUILD_ARGS.Split() 2>&1 | ForEach-Object { "$_" }
6473
if ($LASTEXITCODE -ne 0) {
6574
throw "docker-compose exited with error code $LASTEXITCODE"
6675
}

src/libraries/System.Net.Http/tests/StressTests/HttpStress/run-docker-compose.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ fi
8989

9090
compose_file="$scriptroot/docker-compose.yml"
9191

92+
if ! docker-compose --file "$compose_file" pull client; then
93+
exit $?
94+
fi
95+
if ! docker-compose --file "$compose_file" pull server; then
96+
exit $?
97+
fi
98+
9299
if ! docker-compose --file "$compose_file" build $build_args; then
93100
exit $?
94101
fi

src/libraries/System.Net.Security/tests/StressTests/SslStress/run-docker-compose.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ if ($useWindowsContainers)
6060
$originalErrorPreference = $ErrorActionPreference
6161
$ErrorActionPreference = 'Continue'
6262
try {
63+
docker-compose --file "$compose_file" pull client
64+
if ($LASTEXITCODE -ne 0) {
65+
throw "docker-compose exited with error code $LASTEXITCODE"
66+
}
67+
docker-compose --file "$compose_file" pull server
68+
if ($LASTEXITCODE -ne 0) {
69+
throw "docker-compose exited with error code $LASTEXITCODE"
70+
}
71+
6372
docker-compose --log-level DEBUG --file "$COMPOSE_FILE" build $BUILD_ARGS.Split() 2>&1 | ForEach-Object { "$_" }
6473
if ($LASTEXITCODE -ne 0) {
6574
throw "docker-compose exited with error code $LASTEXITCODE"

0 commit comments

Comments
 (0)