forked from microsoft/dotnet-framework-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-and-test.ps1
More file actions
33 lines (29 loc) · 719 Bytes
/
Copy pathbuild-and-test.ps1
File metadata and controls
33 lines (29 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env pwsh
[cmdletbinding()]
param(
[string]$VersionFilter = "*",
[string]$OSFilter = "*",
[string]$ImageBuilderCustomArgs,
[switch]$CleanupDocker,
[switch]$SkipTesting = $false
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
function Invoke-CleanupDocker()
{
if ($CleanupDocker) {
./scripts/Invoke-CleanupDocker.ps1
}
}
pushd $PSScriptRoot
try {
Invoke-CleanupDocker
./scripts/Invoke-ImageBuilder.ps1 "build --path '$VersionFilter/*/$OSFilter' $ImageBuilderCustomArgs"
if (-not $SkipTesting) {
./tests/run-tests.ps1 -VersionFilter $VersionFilter -OSFilter $OSFilter -IsLocalRun
}
}
finally {
Invoke-CleanupDocker
popd
}