-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Sync eng/common directory with azure-sdk-tools for PR 12301 #36096
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 to add vcpkg cache configuration functionality. The changes introduce a new PowerShell script and YAML template for managing vcpkg binary and asset cache configurations in Azure DevOps pipelines.
- Adds a PowerShell script to configure write-mode vcpkg cache with Azure Storage authentication
- Introduces a pipeline template that sets up vcpkg cache variables for both read-only and write access
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 | New PowerShell script that authenticates with Azure Storage and configures vcpkg cache variables for write access |
eng/common/pipelines/templates/steps/set-vcpkg-cache-vars.yml | New YAML template that sets vcpkg cache variables for read access and conditionally enables 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.
The variable name 'moduleSeperator' contains a typo. It should be 'moduleSeparator' (separator is spelled with an 'a').
$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.
The variable name 'moduleSeperator' contains a typo. It should be 'moduleSeparator' (separator is spelled with an 'a').
$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.
The variable name 'moduleSeperator' contains a typo. It should be 'moduleSeparator' (separator is spelled with an 'a').
$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.
The variable name 'moduleSeperator' contains a typo. It should be 'moduleSeparator' (separator is spelled with an 'a').
$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.
The variable name 'moduleSeperator' contains a typo. It should be 'moduleSeparator' (separator is spelled with an 'a').
$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.
e5aa2ee
to
d3d6777
Compare
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#12301 See eng/common workflow