-
Notifications
You must be signed in to change notification settings - Fork 313
Sync eng/common directory with azure-sdk-tools for PR 12301 #3085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR syncs the eng/common directory with azure-sdk-tools for PR 12301, introducing vcpkg binary cache configuration support for Azure DevOps pipelines. The changes enable both read-only and read-write access to vcpkg binary caches stored in Azure Storage.
- Adds PowerShell script to configure write-mode vcpkg cache with SAS token authentication
- Introduces Azure DevOps pipeline template for setting vcpkg cache variables with conditional write access for internal projects
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
eng/common/scripts/Set-VcpkgWriteModeCache.ps1 | PowerShell script that generates SAS tokens and configures vcpkg binary cache for read-write access |
eng/common/pipelines/templates/steps/set-vcpkg-cache-vars.yml | Azure DevOps pipeline template that sets vcpkg cache variables with read-only access by default and write access for internal projects |
$moduleSeperator = ";" | ||
} | ||
else { | ||
$hostedAgentModulePath = "/usr/share" | ||
$moduleSeperator = ":" | ||
} | ||
$modulePaths = $env:PSModulePath -split $moduleSeperator | ||
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | ||
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | ||
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | ||
$modulePaths += $AzModuleCachePath | ||
} | ||
|
||
$env:PSModulePath = $modulePaths -join $moduleSeperator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name has a spelling error. Should be $moduleSeparator
instead of $moduleSeperator
.
$moduleSeperator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeperator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeperator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeperator | |
$moduleSeparator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeparator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeparator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeparator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeparator |
Copilot uses AI. Check for mistakes.
$moduleSeperator = ";" | ||
} | ||
else { | ||
$hostedAgentModulePath = "/usr/share" | ||
$moduleSeperator = ":" | ||
} | ||
$modulePaths = $env:PSModulePath -split $moduleSeperator | ||
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | ||
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | ||
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | ||
$modulePaths += $AzModuleCachePath | ||
} | ||
|
||
$env:PSModulePath = $modulePaths -join $moduleSeperator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name has a spelling error. Should be $moduleSeparator
instead of $moduleSeperator
.
$moduleSeperator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeperator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeperator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeperator | |
$moduleSeparator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeparator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeparator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeparator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeparator |
Copilot uses AI. Check for mistakes.
$moduleSeperator = ";" | ||
} | ||
else { | ||
$hostedAgentModulePath = "/usr/share" | ||
$moduleSeperator = ":" | ||
} | ||
$modulePaths = $env:PSModulePath -split $moduleSeperator | ||
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | ||
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | ||
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | ||
$modulePaths += $AzModuleCachePath | ||
} | ||
|
||
$env:PSModulePath = $modulePaths -join $moduleSeperator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name has a spelling error. Should be $moduleSeparator
instead of $moduleSeperator
.
$moduleSeperator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeperator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeperator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeperator | |
$moduleSeparator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeparator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeparator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeparator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeparator |
Copilot uses AI. Check for mistakes.
$moduleSeperator = ";" | ||
} | ||
else { | ||
$hostedAgentModulePath = "/usr/share" | ||
$moduleSeperator = ":" | ||
} | ||
$modulePaths = $env:PSModulePath -split $moduleSeperator | ||
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | ||
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | ||
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | ||
$modulePaths += $AzModuleCachePath | ||
} | ||
|
||
$env:PSModulePath = $modulePaths -join $moduleSeperator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name has a spelling error. Should be $moduleSeparator
instead of $moduleSeperator
.
$moduleSeperator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeperator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeperator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeperator | |
$moduleSeparator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeparator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeparator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeparator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeparator |
Copilot uses AI. Check for mistakes.
$moduleSeperator = ";" | ||
} | ||
else { | ||
$hostedAgentModulePath = "/usr/share" | ||
$moduleSeperator = ":" | ||
} | ||
$modulePaths = $env:PSModulePath -split $moduleSeperator | ||
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | ||
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | ||
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | ||
$modulePaths += $AzModuleCachePath | ||
} | ||
|
||
$env:PSModulePath = $modulePaths -join $moduleSeperator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name has a spelling error. Should be $moduleSeparator
instead of $moduleSeperator
.
$moduleSeperator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeperator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeperator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeperator | |
$moduleSeparator = ";" | |
} | |
else { | |
$hostedAgentModulePath = "/usr/share" | |
$moduleSeparator = ":" | |
} | |
$modulePaths = $env:PSModulePath -split $moduleSeparator | |
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) | |
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeparator | |
if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { | |
$modulePaths += $AzModuleCachePath | |
} | |
$env:PSModulePath = $modulePaths -join $moduleSeparator |
Copilot uses AI. Check for mistakes.
04b385d
to
82433b9
Compare
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#12301 See eng/common workflow