mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-19 18:11:39 -05:00
When we first transitioned to the `R1` network isolation environment--which required us to _not_ contact powershellgallery.com--we had to give up on the `AzureFileCopy` task. Since then, the `AzurePowerShell` task has also become somewhat broken while OneBranch fixed the issue that prevented us from using `AzureFileCopy`. In short, we now need to: - Install the Azure PowerShell modules directly from our own feed (which satisfies the network constraint) - ... using `PSResourceGet` ... - ... for Windows PowerShell 5.1 ... - which is used by `AzureFileCopy` to later perform authentication.
This commit is contained in:
2
.github/actions/spelling/expect/expect.txt
vendored
2
.github/actions/spelling/expect/expect.txt
vendored
@@ -78,7 +78,6 @@ autoscrolling
|
|||||||
Autowrap
|
Autowrap
|
||||||
AVerify
|
AVerify
|
||||||
awch
|
awch
|
||||||
AZCOPY
|
|
||||||
azurecr
|
azurecr
|
||||||
AZZ
|
AZZ
|
||||||
backgrounded
|
backgrounded
|
||||||
@@ -1342,7 +1341,6 @@ PROPTITLE
|
|||||||
propvar
|
propvar
|
||||||
propvariant
|
propvariant
|
||||||
psa
|
psa
|
||||||
PSCRED
|
|
||||||
PSECURITY
|
PSECURITY
|
||||||
pseudoconsole
|
pseudoconsole
|
||||||
psh
|
psh
|
||||||
|
|||||||
@@ -75,13 +75,30 @@ jobs:
|
|||||||
}
|
}
|
||||||
displayName: "Wrangle Unpackaged builds into place, rename"
|
displayName: "Wrangle Unpackaged builds into place, rename"
|
||||||
|
|
||||||
- task: AzurePowerShell@5
|
- task: PowerShell@2
|
||||||
|
displayName: Install Azure Modules from custom PowerShell Gallery Repo
|
||||||
|
env:
|
||||||
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||||
|
inputs:
|
||||||
|
pwsh: false # We are preparing modules for AzureFileCopy, which uses PowerShell 5.1
|
||||||
|
targetType: inline
|
||||||
|
script: |-
|
||||||
|
$MachineToken = $env:SYSTEM_ACCESSTOKEN | ConvertTo-SecureString -AsPlainText -Force
|
||||||
|
$Credential = [PSCredential]::new("ONEBRANCH_TOKEN", $MachineToken)
|
||||||
|
$MachineToken = $null
|
||||||
|
$Feed = "https://pkgs.dev.azure.com/shine-oss/terminal/_packaging/TerminalDependencies/nuget/v3/index.json"
|
||||||
|
Register-PSResourceRepository -Name "PSGalleryUpstream" -Uri $Feed -Trusted
|
||||||
|
Get-PSResourceRepository
|
||||||
|
|
||||||
|
Install-PSResource -Name Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute -Repository "PSGalleryUpstream" -Credential $Credential
|
||||||
|
|
||||||
|
- task: AzureFileCopy@6
|
||||||
displayName: Publish to Storage Account
|
displayName: Publish to Storage Account
|
||||||
inputs:
|
inputs:
|
||||||
|
sourcePath: _out/*
|
||||||
|
Destination: AzureBlob
|
||||||
azureSubscription: ${{ parameters.subscription }}
|
azureSubscription: ${{ parameters.subscription }}
|
||||||
azurePowerShellVersion: LatestVersion
|
storage: ${{ parameters.storageAccount }}
|
||||||
pwsh: true
|
ContainerName: ${{ parameters.storageContainer }}
|
||||||
ScriptType: InlineScript
|
AdditionalArgumentsForBlobCopy: "--content-type application/octet-stream"
|
||||||
Inline: |-
|
|
||||||
$Env:AZCOPY_AUTO_LOGIN_TYPE="PSCRED"
|
|
||||||
& AzCopy copy "_out\*" "https://${{ parameters.storageAccount }}.blob.core.windows.net/${{ parameters.storageContainer }}/" --content-type application/octet-stream
|
|
||||||
|
|||||||
Reference in New Issue
Block a user