|
1 | 1 | jobs: |
2 | | -- job: build_testartifacts |
| 2 | +- job: build_testartifacts_win |
3 | 3 | variables: |
4 | 4 | - name: runCodesignValidationInjection |
5 | 5 | value: false |
6 | 6 | - name: NugetSecurityAnalysisWarningLevel |
7 | 7 | value: none |
8 | 8 | - group: DotNetPrivateBuildAccess |
9 | | - displayName: Build test artifacts |
| 9 | + displayName: Build windows test artifacts |
10 | 10 | condition: succeeded() |
11 | 11 | pool: |
12 | | - # testing |
13 | | - vmImage: ubuntu-latest |
| 12 | + name: PowerShell1ES |
| 13 | + demands: |
| 14 | + - ImageOverride -equals PSMMS2019-Secure |
14 | 15 | steps: |
15 | 16 | - checkout: self |
16 | 17 | clean: true |
|
46 | 47 | win7-x64 { $packageName = "TestPackage-win-x64.zip" } |
47 | 48 | win7-x86 { $packageName = "TestPackage-win-x86.zip" } |
48 | 49 | win-arm64 { $packageName = "TestPackage-win-arm64.zip" } |
| 50 | + } |
| 51 | +
|
| 52 | + Rename-Item $(System.ArtifactsDirectory)/TestPackage.zip $packageName |
| 53 | + Write-Host "##vso[artifact.upload containerfolder=testArtifacts;artifactname=testArtifacts]$(System.ArtifactsDirectory)/$packageName" |
| 54 | + } |
| 55 | +
|
| 56 | + BuildTestPackage -runtime win7-x64 |
| 57 | + BuildTestPackage -runtime win7-x86 |
| 58 | + BuildTestPackage -runtime win-arm64 |
| 59 | +
|
| 60 | + displayName: Build test package and upload |
| 61 | + retryCountOnTaskFailure: 1 |
| 62 | +
|
| 63 | +- job: build_testartifacts_nonwin |
| 64 | + variables: |
| 65 | + - name: runCodesignValidationInjection |
| 66 | + value: false |
| 67 | + - name: NugetSecurityAnalysisWarningLevel |
| 68 | + value: none |
| 69 | + - group: DotNetPrivateBuildAccess |
| 70 | + displayName: Build non-windows test artifacts |
| 71 | + condition: succeeded() |
| 72 | + pool: |
| 73 | + name: PowerShell1ES |
| 74 | + demands: |
| 75 | + - ImageOverride -equals PSMMSUbuntu20.04-Secure |
| 76 | + steps: |
| 77 | + - checkout: self |
| 78 | + clean: true |
| 79 | + |
| 80 | + - template: /tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml |
| 81 | + parameters: |
| 82 | + repoRoot: $(Build.SourcesDirectory) |
| 83 | + |
| 84 | + - pwsh: | |
| 85 | + Import-Module ./build.psm1 |
| 86 | + Start-PSBootstrap |
| 87 | + displayName: Bootstrap |
| 88 | + env: |
| 89 | + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) |
| 90 | + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) |
| 91 | +
|
| 92 | + - pwsh: | |
| 93 | + Import-Module ./build.psm1 |
| 94 | +
|
| 95 | + function BuildTestPackage([string] $runtime) |
| 96 | + { |
| 97 | + Write-Verbose -Verbose "Starting to build package for $runtime" |
| 98 | +
|
| 99 | + New-TestPackage -Destination $(System.ArtifactsDirectory) -Runtime $runtime |
| 100 | +
|
| 101 | + if (-not (Test-Path $(System.ArtifactsDirectory)/TestPackage.zip)) |
| 102 | + { |
| 103 | + throw "Test Package was not found at: $(System.ArtifactsDirectory)" |
| 104 | + } |
| 105 | +
|
| 106 | + switch ($runtime) |
| 107 | + { |
49 | 108 | linux-x64 { $packageName = "TestPackage-linux-x64.zip" } |
50 | 109 | linux-arm { $packageName = "TestPackage-linux-arm.zip" } |
51 | 110 | linux-arm64 { $packageName = "TestPackage-linux-arm64.zip" } |
|
57 | 116 | Write-Host "##vso[artifact.upload containerfolder=testArtifacts;artifactname=testArtifacts]$(System.ArtifactsDirectory)/$packageName" |
58 | 117 | } |
59 | 118 |
|
60 | | - BuildTestPackage -runtime win7-x64 |
61 | | - BuildTestPackage -runtime win7-x86 |
62 | | - BuildTestPackage -runtime win-arm64 |
63 | 119 | BuildTestPackage -runtime linux-x64 |
64 | 120 | BuildTestPackage -runtime linux-arm |
65 | 121 | BuildTestPackage -runtime linux-arm64 |
|
0 commit comments