Skip to content

Commit

Permalink
Fix the variables of the new pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Mar 3, 2022
1 parent 7daeac4 commit 5f8ae3e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion scripts/azure-templates-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ stages:
- template: azure-templates-variables.yml
parameters:
updateBuild: true
- pwsh: 'dir env:'
- template: azure-templates-github-status.yml
parameters:
context: 'SkiaSharp-Tests'
Expand Down
21 changes: 10 additions & 11 deletions scripts/azure-templates-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:
displayName: Determine the feature name, if any
- pwsh: |
$isPR = [regex]::Match("$:env:BUILD_SOURCEBRANCH", 'refs\/pull\/(\d+)\/merge')
$isPR = [regex]::Match("$env:BUILD_SOURCEBRANCH", 'refs\/pull\/(\d+)\/merge')
if ($isPR) {
if (-not $env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER) {
$pr = $isPR.Groups[1].Value
Expand Down Expand Up @@ -50,16 +50,15 @@ steps:
condition: eq(variables['Build.Reason'], 'Schedule')
- pwsh: |
if ($env:RESOURCES_PIPELINE_SKIASHARP_RUNNAME) {
Write-Host "Working with $env:RESOURCES_PIPELINE_SKIASHARP_RUNNAME"
$match = [regex]::Match("$env:RESOURCES_PIPELINE_SKIASHARP_RUNNAME", '.*\-(.+)\.(\d+)')
$label = $match.Groups[1].Value
Write-Host "Preview label: $label"
Write-Host "##vso[task.setvariable variable=PREVIEW_LABEL]$label"
$buildnumber = $match.Groups[2].Value
Write-Host "Build number: $buildnumber"
Write-Host "##vso[task.setvariable variable=BUILD_NUMBER]$buildnumber"
}
Write-Host "Working with $env:RESOURCES_PIPELINE_SKIASHARP_RUNNAME"
$match = [regex]::Match("$env:RESOURCES_PIPELINE_SKIASHARP_RUNNAME", '.*\-(.+)\.(\d+)')
$label = $match.Groups[1].Value
Write-Host "Preview label: $label"
Write-Host "##vso[task.setvariable variable=PREVIEW_LABEL]$label"
$buildnumber = $match.Groups[2].Value
Write-Host "Build number: $buildnumber"
Write-Host "##vso[task.setvariable variable=BUILD_NUMBER]$buildnumber"
condition: eq(variables['Build.Reason'], 'ResourceTrigger')
displayName: Override the preview label and build number if this is a secondary build
- pwsh: |
Expand Down

0 comments on commit 5f8ae3e

Please sign in to comment.