Skip to content

Commit

Permalink
Release build: Change the names of the PATs (#20307) (#20315)
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisEz13 committed Sep 20, 2023
1 parent 22a813e commit 7487559
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/releaseBuild/azureDevOps/releasePipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ variables:
- name: BUILDSECMON_OPT_IN
value: true
- group: ReleasePipelineSecrets
- group: PipelineExecutionPats

stages:
- stage: MSIXBundle
Expand Down Expand Up @@ -211,7 +212,7 @@ stages:
Get-ChildItem -Path $(Build.SourcesDirectory)
Import-Module $(Build.SourcesDirectory)\ReleaseTools\AzDO -Force
Set-AzDoProjectInfo -ProjectOwner PowerShell-Rel -ProjectName Release-Automation
Set-AzDoAuthToken -Token $(RELEASEAUTOMATIONPAT)
Set-AzDoAuthToken -Token $(powershellRelExecutionPat)
$packageBuildID = $(resources.pipeline.releasePipeline.runID)
$metadata = Get-Content -Raw -Path '$(Pipeline.Workspace)/releasePipeline/metadata/release.json' | ConvertFrom-Json
$buildInvocationInfo = Start-AzDOBuild -BuildDefinitionId 10 -BuildArguments @{ POWERSHELL_PACKAGE_BUILD_BUILDID = $packageBuildID } -Tag $metadata.ReleaseVersion, 'InProgress' -PassThru
Expand Down Expand Up @@ -254,7 +255,7 @@ stages:
- pwsh: |
Import-Module $(Build.SourcesDirectory)\ReleaseTools\AzDO -Force
Set-AzDoProjectInfo -ProjectOwner PowerShell-Rel -ProjectName Release-Automation
Set-AzDoAuthToken -Token $(RELEASEAUTOMATIONPAT)
Set-AzDoAuthToken -Token $(powershellRelExecutionPat)
$metadata = Get-Content -Raw -Path '$(Pipeline.Workspace)/releasePipeline/metadata/release.json' | ConvertFrom-Json
$azDOBuild = Get-AzDOBuild -buildDefinitionId 10 -MaximumResult 100 | Where-Object { $_.tags -in $metadata.ReleaseVersion }
$azDoBuild | Remove-AzDOBuildTag -tag 'InProgress' -Pass | Add-AzDOBuildTag -tag 'SignedOff'
Expand Down Expand Up @@ -435,7 +436,7 @@ stages:
- pwsh: |
Import-Module $(Build.SourcesDirectory)\ReleaseTools\AzDO -Force
Set-AzDoProjectInfo -ProjectOwner PowerShell-Rel -ProjectName PowerShell
Set-AzDoAuthToken -Token $(RELEASEAUTOMATIONPAT)
Set-AzDoAuthToken -Token $(powershellRelExecutionPat)
$metadata = Get-Content -Raw -Path '$(Pipeline.Workspace)/releasePipeline/metadata/release.json' | ConvertFrom-Json
$buildInvocationInfo = Start-AzDOBuild -BuildDefinitionId 49 -Tag $metadata.ReleaseVersion, 'InProgress' -PassThru
Write-Verbose -Verbose "Kicked off snap build: $($buildInvocationInfo.WebUrl)"
Expand Down Expand Up @@ -476,7 +477,7 @@ stages:
- pwsh: |
Import-Module $(Build.SourcesDirectory)\ReleaseTools\AzDO -Force
Set-AzDoProjectInfo -ProjectOwner PowerShell-Rel -ProjectName PowerShell
Set-AzDoAuthToken -Token $(RELEASEAUTOMATIONPAT)
Set-AzDoAuthToken -Token $(powershellRelExecutionPat)
$metadata = Get-Content -Raw -Path '$(Pipeline.Workspace)/releasePipeline/metadata/release.json' | ConvertFrom-Json
$azDOBuild = Get-AzDOBuild -buildDefinitionId 49 -MaximumResult 100 | Where-Object { $_.tags -in $metadata.ReleaseVersion }
$azDoBuild | Remove-AzDOBuildTag -tag 'InProgress' -Pass | Add-AzDOBuildTag -tag 'SignedOff'
Expand Down Expand Up @@ -580,7 +581,7 @@ stages:
- pwsh: |
Import-Module $(Build.SourcesDirectory)\ReleaseTools\AzDO -Force
Set-AzDoProjectInfo -ProjectOwner mscodehub -ProjectName PowerShellCore
Set-AzDoAuthToken -Token $(MSCODEHUBPAT)
Set-AzDoAuthToken -Token $(mscodehubBuildExecutionPat)
$metadata = Get-Content -Raw -Path '$(Pipeline.Workspace)/releasePipeline/metadata/release.json' | ConvertFrom-Json
$releaseVersion = $metadata.ReleaseVersion -replace '^v',''
$semanticVersion = [System.Management.Automation.SemanticVersion]$releaseVersion
Expand Down

0 comments on commit 7487559

Please sign in to comment.