changed the integration script for Windows to remove residual artifacts from bin folder
During the integration test setup, we need the artifacts from "C:\Program Files\Amazon\ECS" to be removed. Not doing so has the potential to break integration tests.
@@ -35,6 +35,7 @@ if ($Platform -like "windows2016") {
exit 1
}
+$ProgramFiles="C:\Program Files\Amazon\ECS"
$env:BASE_IMAGE_NAME=$BaseImageName
$env:BASE_IMAGE_NAME_WITH_DIGEST=$BaseImageNameWithDigest
@@ -45,6 +46,9 @@ if (-Not ($dockerImages -like "*$BaseImageName*")) {
}
Invoke-Expression "docker tag $BaseImageName amazon-ecs-ftest-windows-base:make"
+# Ensure that "C:/Program Files/Amazon/ECS" is empty before preparing dependencies.
+Remove-Item -Path "$ProgramFiles\*" -Recurse -Force -ErrorAction:SilentlyContinue
+
# Prepare dependencies
Invoke-Expression "${PSScriptRoot}\..\misc\volumes-test\build.ps1"
Invoke-Expression "${PSScriptRoot}\..\misc\image-cleanup-test-images\build.ps1"
