forked from dotnet/dotnet-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-and-test.ps1
45 lines (43 loc) · 1.33 KB
/
build-and-test.ps1
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
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env pwsh
[cmdletbinding(
DefaultParameterSetName = 'BuildAndTest'
)]
param(
[string]$VersionFilter = "*",
[string]$OSFilter = "*",
[string]$ArchitectureFilter = "amd64",
[Parameter(ParameterSetName = "Build")]
[Parameter(ParameterSetName = "BuildAndTest")]
[string]$OptionalImageBuilderArgs,
[Parameter(ParameterSetName = "Build")]
[switch]$BuildOnly,
[Parameter(ParameterSetName = "Test")]
[switch]$TestOnly,
[Parameter(ParameterSetName = "Test")]
[Parameter(ParameterSetName = "BuildAndTest")]
[ValidateSet("runtime", "runtime-deps", "aspnet", "sdk", "sample", "image-size")]
[string[]]$TestCategories = @("runtime", "runtime-deps", "aspnet", "sdk", "sample", "image-size")
)
if ($PSCmdlet.ParameterSetName -eq 'BuildAndTest') {
$build = $true
$test = $true
}
else {
$build = $BuildOnly
$test = $TestOnly
}
if ($build) {
& ./eng/common/build-and-test.ps1 `
-VersionFilter $VersionFilter `
-OSFilter $OSFilter `
-ArchitectureFilter $ArchitectureFilter `
-OptionalImageBuilderArgs $OptionalImageBuilderArgs `
-SkipTesting
}
if ($test) {
& ./tests/run-tests.ps1 `
-VersionFilter $VersionFilter `
-OSFilter $OSFilter `
-ArchitectureFilter $ArchitectureFilter `
-TestCategories $TestCategories
}