Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1973 from xamarin/eo-pool
Browse files Browse the repository at this point in the history
Target windows EO compliant agent pool
  • Loading branch information
Redth authored Mar 1, 2022
2 parents 33b55de + fc2f091 commit 14b8d4f
Showing 1 changed file with 42 additions and 31 deletions.
73 changes: 42 additions & 31 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,42 @@ resources:
- repository: components
type: github
name: xamarin/XamarinComponents
ref: refs/heads/main
endpoint: xamarin

stages:
- stage: build
displayName: Build Library
jobs:
- template: .ci/build.v1.yml@components
parameters:
- template: .ci/build.v1.yml@components
parameters:
${{ if eq(variables['System.TeamProject'], 'devdiv') }}: # The AzurePipelines-EO pool is only available in DevDiv
windowsAgentPoolName: AzurePipelines-EO
windowsImage: '' # Override the 'windows-latest' default settings
windowsImageOverride: AzurePipelinesWindows2019compliant
${{ if ne(variables['System.TeamProject'], 'devdiv') }}:
windowsImage: windows-2019
areaPath: 'DevDiv\Xamarin SDK'
masterBranchName: 'main'
preBuildSteps:
- pwsh: |
$pr = "pr." + $env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER
$nuget = $env:BASE_VERSION + "-" + $pr + "." + $env:BUILD_NUMBER
Write-Host "Preview label: $pr"
Write-Host "NuGet version: $nuget"
Write-Host "##vso[task.setvariable variable=PREVIEW_LABEL]$pr"
Write-Host "##vso[task.setvariable variable=NUGET_VERSION]$nuget"
displayName: Use a special preview label for PRs
condition: eq(variables['Build.Reason'], 'PullRequest')
- pwsh: |
$tagVersion = $env:BUILD_SOURCEBRANCHNAME
Write-Host "Tag version: $tagVersion"
Write-Host "##vso[task.setvariable variable=NUGET_VERSION]$tagVersion"
displayName: Override version for tags
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
- pwsh: |
Write-Host "##vso[build.updatebuildnumber]$env:NUGET_VERSION"
displayName: Update the build number with a more readable one
areaPath: 'DevDiv\Xamarin SDK'
masterBranchName: 'main'
preBuildSteps:
- pwsh: |
$pr = "pr." + $env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER
$nuget = $env:BASE_VERSION + "-" + $pr + "." + $env:BUILD_NUMBER
Write-Host "Preview label: $pr"
Write-Host "NuGet version: $nuget"
Write-Host "##vso[task.setvariable variable=PREVIEW_LABEL]$pr"
Write-Host "##vso[task.setvariable variable=NUGET_VERSION]$nuget"
displayName: Use a special preview label for PRs
condition: eq(variables['Build.Reason'], 'PullRequest')
- pwsh: |
$tagVersion = $env:BUILD_SOURCEBRANCHNAME
Write-Host "Tag version: $tagVersion"
Write-Host "##vso[task.setvariable variable=NUGET_VERSION]$tagVersion"
displayName: Override version for tags
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
- pwsh: |
Write-Host "##vso[build.updatebuildnumber]$env:NUGET_VERSION"
displayName: Update the build number with a more readable one
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- stage: signing
Expand Down Expand Up @@ -88,7 +94,12 @@ stages:
# skip for now
condition: false
pool:
vmImage: windows-2019
${{ if eq(variables['System.TeamProject'], 'devdiv') }}: # The AzurePipelines-EO pool is only available in DevDiv
name: AzurePipelines-EO
demands:
- ImageOverride -equals AzurePipelinesWindows2019compliant
${{ if ne(variables['System.TeamProject'], 'devdiv') }}:
vmImage: windows-2019
steps:
- script: 'certutil -importpfx $(Build.SourcesDirectory)\DeviceTests\DeviceTests.UWP\DeviceTests.UWP_TemporaryKey.pfx'
displayName: 'Run certutil'
Expand Down Expand Up @@ -122,7 +133,7 @@ stages:
runChecks: false
displayName: Android API 21
publishOutputSuffix: '-android21'
windowsImage: ''
windowsImage: '' # Mac only
areaPath: $(AREA_PATH)
verbosity: diagnostic
cakeFile: DeviceTests/build.cake
Expand All @@ -138,7 +149,7 @@ stages:
runChecks: false
displayName: Android API 22
publishOutputSuffix: '-android22'
windowsImage: ''
windowsImage: '' # Mac only
areaPath: $(AREA_PATH)
verbosity: diagnostic
cakeFile: DeviceTests/build.cake
Expand All @@ -155,7 +166,7 @@ stages:
# continueOnError: true
# displayName: Android API 23
# publishOutputSuffix: '-android23'
# windowsImage: ''
# windowsImage: '' # Mac only
# areaPath: $(AREA_PATH)
# verbosity: diagnostic
# cakeFile: DeviceTests/build.cake
Expand All @@ -171,7 +182,7 @@ stages:
runChecks: false
displayName: Android API 24
publishOutputSuffix: '-android24'
windowsImage: ''
windowsImage: '' # Mac only
areaPath: $(AREA_PATH)
verbosity: diagnostic
cakeFile: DeviceTests/build.cake
Expand All @@ -187,7 +198,7 @@ stages:
runChecks: false
displayName: Android API 26
publishOutputSuffix: '-android26'
windowsImage: ''
windowsImage: '' # Mac only
areaPath: $(AREA_PATH)
verbosity: diagnostic
cakeFile: DeviceTests/build.cake
Expand All @@ -203,7 +214,7 @@ stages:
runChecks: false
displayName: Android API 29
publishOutputSuffix: '-android29'
windowsImage: ''
windowsImage: '' # Mac only
areaPath: $(AREA_PATH)
verbosity: diagnostic
cakeFile: DeviceTests/build.cake
Expand All @@ -219,7 +230,7 @@ stages:
# runChecks: false
# displayName: Android API 30
# publishOutputSuffix: '-android30'
# windowsImage: ''
# windowsImage: '' # Mac only
# areaPath: $(AREA_PATH)
# verbosity: diagnostic
# cakeFile: DeviceTests/build.cake
Expand Down

0 comments on commit 14b8d4f

Please sign in to comment.