Skip to content

Conversation

azure-sdk
Copy link
Collaborator

Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#12301 See eng/common workflow

@azure-sdk azure-sdk requested a review from a team as a code owner October 1, 2025 18:56
@azure-sdk azure-sdk added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Oct 1, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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

Comment on lines 14 to 27
$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
Copy link
Preview

Copilot AI Oct 1, 2025

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').

Suggested change
$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.

Comment on lines 14 to 27
$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
Copy link
Preview

Copilot AI Oct 1, 2025

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').

Suggested change
$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.

Comment on lines 14 to 27
$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
Copy link
Preview

Copilot AI Oct 1, 2025

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').

Suggested change
$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.

Comment on lines 14 to 27
$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
Copy link
Preview

Copilot AI Oct 1, 2025

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').

Suggested change
$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.

Comment on lines 14 to 27
$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
Copy link
Preview

Copilot AI Oct 1, 2025

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').

Suggested change
$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.

@azure-sdk azure-sdk force-pushed the sync-eng/common-djurek/eng-common-vcpkg-12301 branch from e5aa2ee to d3d6777 Compare October 1, 2025 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants