mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
* Fixed an error in the release pipeline * Fixed ReleaseTag and Version variable in validate packages * Switched from Netlock to KS3 --------- Co-authored-by: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Co-authored-by: Justin Chung <chungjustin@microsoft.com>
This commit is contained in:
co-authored by
Justin Chung
Justin Chung
parent
3031ef7e6f
commit
a6525aa080
@@ -88,7 +88,7 @@ extends:
|
||||
featureFlags:
|
||||
WindowsHostVersion:
|
||||
Version: 2022
|
||||
Network: Netlock
|
||||
Network: KS3
|
||||
cloudvault:
|
||||
enabled: false
|
||||
globalSdl:
|
||||
|
||||
@@ -15,12 +15,12 @@ steps:
|
||||
displayName: Set Release Tag
|
||||
|
||||
- pwsh: |
|
||||
$azureVersion = '$(ReleaseTag)'.ToLowerInvariant() -replace '\.', '-'
|
||||
$vstsCommandString = "vso[task.setvariable variable=AzureVersion]$azureVersion"
|
||||
$azureVersion = '$(OutputReleaseTag.ReleaseTag)'.ToLowerInvariant() -replace '\.', '-'
|
||||
$vstsCommandString = "vso[task.setvariable variable=AzureVersion;isOutput=true]$azureVersion"
|
||||
Write-Host "sending " + $vstsCommandString
|
||||
Write-Host "##$vstsCommandString"
|
||||
|
||||
$version = '$(ReleaseTag)'.ToLowerInvariant().Substring(1)
|
||||
$version = '$(OutputReleaseTag.ReleaseTag)'.ToLowerInvariant().Substring(1)
|
||||
$vstsCommandString = "vso[task.setvariable variable=Version;isOutput=true]$version"
|
||||
Write-Host ("sending " + $vstsCommandString)
|
||||
Write-Host "##$vstsCommandString"
|
||||
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
azurePowerShellVersion: LatestVersion
|
||||
pwsh: true
|
||||
inline: |
|
||||
$containerName = '$(AzureVersion)-private'
|
||||
$containerName = '$(OutputVersion.AzureVersion)-private'
|
||||
$storageAccount = '$(StorageAccount)'
|
||||
|
||||
$storageContext = New-AzStorageContext -StorageAccountName $storageAccount -UseConnectedAccount
|
||||
|
||||
@@ -63,6 +63,7 @@ jobs:
|
||||
pwsh: true
|
||||
script: |
|
||||
Import-module '$(Pipeline.Workspace)/ToolArtifact/GitHubRelease.psm1'
|
||||
$releaseVersion = '$(ReleaseTag)' -replace '^v',''
|
||||
Write-Verbose -Verbose "Available modules: "
|
||||
Get-Module | Write-Verbose -Verbose
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
$packageName = '${{ parameters.globalToolPackageName }}'
|
||||
Write-Verbose -Verbose "Installing $packageName"
|
||||
|
||||
dotnet tool install --add-source "$ENV:PIPELINE_WORKSPACE/PSPackagesOfficial/drop_nupkg_build_nupkg" --tool-path $toolPath --version '$(Version)' $packageName
|
||||
dotnet tool install --add-source "$ENV:PIPELINE_WORKSPACE/PSPackagesOfficial/drop_nupkg_build_nupkg" --tool-path $toolPath --version '$(OutputVersion.Version)' $packageName
|
||||
|
||||
Get-ChildItem -Path $toolPath
|
||||
|
||||
@@ -133,7 +133,7 @@ jobs:
|
||||
|
||||
$versionFound = & $toolPath -c '$PSVersionTable.PSVersion.ToString()'
|
||||
|
||||
if ( '$(Version)' -ne $versionFound)
|
||||
if ( '$(OutputVersion.Version)' -ne $versionFound)
|
||||
{
|
||||
throw "Expected version of global tool not found. Installed version is $versionFound"
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
inline: |
|
||||
$storageAccount = Get-AzStorageAccount -ResourceGroupName '$(StorageResourceGroup)' -Name '$(StorageAccount)'
|
||||
$ctx = $storageAccount.Context
|
||||
$container = '$(AzureVersion)'
|
||||
$container = '$(OutputVersion.AzureVersion)'
|
||||
|
||||
$destinationPath = '$(System.ArtifactsDirectory)'
|
||||
$blobList = Get-AzStorageBlob -Container $container -Context $ctx
|
||||
|
||||
@@ -95,7 +95,7 @@ jobs:
|
||||
</packageSources>
|
||||
"@
|
||||
|
||||
$releaseVersion = '$(Version)'
|
||||
$releaseVersion = '$(OutputVersion.Version)'
|
||||
|
||||
Write-Verbose -Message "Release Version: $releaseVersion" -Verbose
|
||||
|
||||
|
||||
Reference in New Issue
Block a user