Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cli/azd/extensions/microsoft.azd.demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 0.7.2 (2026-07-16)

- Simple test release of extension, with no changes.
Comment thread
chidozieononiwu marked this conversation as resolved.

## 0.7.1 (2026-07-14)

- Simple test release of extension, with no changes.
Expand Down
2 changes: 1 addition & 1 deletion cli/azd/extensions/microsoft.azd.demo/extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace: demo
displayName: Demo Extension
description: This extension provides examples of the azd extension framework.
usage: azd demo <command> [options]
version: 0.7.1
version: 0.7.2
Comment thread
chidozieononiwu marked this conversation as resolved.
language: go
capabilities:
- custom-commands
Expand Down
2 changes: 1 addition & 1 deletion cli/azd/extensions/microsoft.azd.demo/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.1
0.7.2
Comment thread
chidozieononiwu marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
parameters:
- name: npmrcPath
type: string
# When empty, defaults to the agent user's .npmrc ($HOME/.npmrc on
# Linux/macOS, %USERPROFILE%\.npmrc on Windows) so every subsequent
# npm / pnpm / npx call in the job inherits the registry + auth.
default: ""
- name: registryUrl
type: string
default: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/"
- name: CustomCondition
type: string
default: succeeded()
- name: ServiceConnection
type: string
default: ''
default: ""

steps:
- pwsh: |
Write-Host "Creating .npmrc file ${{ parameters.npmrcPath }} for registry ${{ parameters.registryUrl }}"
$parentFolder = Split-Path -Path '${{ parameters.npmrcPath }}' -Parent

if (!(Test-Path $parentFolder)) {
Write-Host "Creating folder $parentFolder"
New-Item -Path $parentFolder -ItemType Directory | Out-Null
}
- pwsh: |
$npmrcPath = '${{ parameters.npmrcPath }}'
if (-not $npmrcPath) { $npmrcPath = Join-Path $HOME '.npmrc' }

$content = "registry=${{ parameters.registryUrl }}`n`nalways-auth=true"
$content | Out-File '${{ parameters.npmrcPath }}'
displayName: 'Create .npmrc'
condition: ${{ parameters.CustomCondition }}
Write-Host "Creating .npmrc file $npmrcPath for registry ${{ parameters.registryUrl }}"
$parentFolder = Split-Path -Path $npmrcPath -Parent

- task: npmAuthenticate@0
displayName: Authenticate .npmrc
condition: ${{ parameters.CustomCondition }}
inputs:
workingFile: ${{ parameters.npmrcPath }}
azureDevOpsServiceConnection: ${{ parameters.ServiceConnection }}
if ($parentFolder -and -not (Test-Path $parentFolder)) {
Write-Host "Creating folder $parentFolder"
New-Item -Path $parentFolder -ItemType Directory | Out-Null
}

"registry=${{ parameters.registryUrl }}" | Out-File $npmrcPath
Write-Host "##vso[task.setvariable variable=resolvedNpmrcPath]$npmrcPath"
displayName: "Create .npmrc"
condition: ${{ parameters.CustomCondition }}

- task: npmAuthenticate@0
displayName: Authenticate .npmrc
condition: ${{ parameters.CustomCondition }}
inputs:
workingFile: $(resolvedNpmrcPath)
azureDevOpsServiceConnection: ${{ parameters.ServiceConnection }}
17 changes: 17 additions & 0 deletions eng/common/pipelines/templates/steps/maven-authenticate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
parameters:
Comment thread
chidozieononiwu marked this conversation as resolved.
SourceDirectory: $(Build.SourcesDirectory)

steps:
# Copy mirror settings to default Maven location so all requests go through CFS
- pwsh: |
$m2Dir = if ($env:USERPROFILE) { "$env:USERPROFILE\.m2" } else { "$HOME/.m2" }
New-Item -ItemType Directory -Force -Path $m2Dir | Out-Null
Copy-Item -Path "${{ parameters.SourceDirectory }}/eng/settings.xml" -Destination "$m2Dir/settings.xml"
displayName: "Setup Maven mirror settings"
# Authenticate with Azure Artifacts feeds
# MavenAuthenticate adds <server> entries to ~/.m2/settings.xml matching mirror id 'azure-sdk-for-java'
- task: MavenAuthenticate@0
displayName: "Maven Authenticate"
inputs:
artifactsFeeds: "azure-sdk-for-java"
49 changes: 49 additions & 0 deletions eng/common/pipelines/templates/steps/pypi-auth-dev-feed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
parameters:
Comment thread
chidozieononiwu marked this conversation as resolved.
Comment thread
chidozieononiwu marked this conversation as resolved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still open from my last pass, and I found the specific fix this time. This template already exists upstream as eng/common/pipelines/templates/steps/auth-dev-feed.yml in azure-sdk-tools. Same parameters, same steps, same uv block; only quote style and indentation differ. There is no pypi-auth-dev-feed.yml upstream.

The eng/common sync isn't additive. It clears the destination directory and re-copies from azure-sdk-tools, so downstream-only files get deleted (that's what removed files in #5413). Once the next sync lands, this file is gone and both - template: /eng/common/pipelines/templates/steps/pypi-auth-dev-feed.yml references, build-cli.yml:115 and build-and-test.yml:161, fail during template expansion, before the run starts.

Rename it to auth-dev-feed.yml using the upstream bytes and point both references at that name. Then the sync overwrites it harmlessly instead of deleting it.

Related, so nobody "fixes" the wrong thing: create-authenticated-npmrc.yml and maven-authenticate.yml in this PR are already byte-identical to upstream (blobs 3fa699b387d and 1b84e984add match azure-sdk-tools exactly). Don't apply local edits to those two, including the suggestion to switch artifactsFeeds to public/azure-sdk-for-java. Anything like that has to land upstream first or the next sync reverts it.

DevFeedName: "public/azure-sdk-for-python"
EnableTwineAuth: true
EnablePipAuth: true
EnableUvAuth: true

steps:
- pwsh: |
# For safety default to publishing to the private feed.
# Publish to https://dev.azure.com/azure-sdk/internal/_packaging?_a=feed&feed=azure-sdk-for-python-pr
$devopsFeedName = 'internal/azure-sdk-for-python-pr'
if (-not ('$(Build.Repository.Name)').EndsWith('-pr')) {
# Publish to https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-python
$devopsFeedName = '${{ parameters.DevFeedName }}'
}
echo "##vso[task.setvariable variable=DevFeedName]$devopsFeedName"
echo "Using DevopsFeed = $devopsFeedName"
displayName: Setup DevOpsFeedName

- ${{ if eq(parameters.EnableTwineAuth, true) }}:
- task: TwineAuthenticate@0
displayName: "Twine Authenticate to feed"
inputs:
artifactFeeds: $(DevFeedName)

- ${{ if eq(parameters.EnablePipAuth, true) }}:
- task: PipAuthenticate@1
displayName: "Pip Authenticate to feed"
inputs:
artifactFeeds: $(DevFeedName)
onlyAddExtraIndex: false

- ${{ if eq(parameters.EnableUvAuth, true) }}:
- pwsh: |
if ($env:PIP_INDEX_URL) {
Write-Host "Found pip index URL: $($env:PIP_INDEX_URL)"
# UV_DEFAULT_INDEX is the canonical replacement for the deprecated UV_INDEX_URL (uv 0.4.23+).
# PIP_INDEX_URL is set by PipAuthenticate@1 and contains embedded credentials, which uv
# will use for Basic auth against the ADO feed (and its PyPI upstream) per astral-sh/uv#12651.
Write-Host "##vso[task.setvariable variable=UV_DEFAULT_INDEX]$($env:PIP_INDEX_URL)"
# Disable keyring so uv uses the URL-embedded credentials directly.
Write-Host "##vso[task.setvariable variable=UV_KEYRING_PROVIDER]disabled"
} else {
Write-Host "##[warning]PIP_INDEX_URL not set - uv will fall back to public PyPI."
}
# Force any managed Python downloads to go directly to GitHub releases
# rather than the default CDN (releases.astral.sh).
Write-Host "##vso[task.setvariable variable=UV_PYTHON_INSTALL_MIRROR]https://github.com/astral-sh/python-build-standalone/releases/download"
displayName: "Configure UV Authentication"
19 changes: 19 additions & 0 deletions eng/pipelines/templates/jobs/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
timeoutInMinutes: 180
steps:
- checkout: self

- template: /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml

- template: /eng/common/pipelines/templates/steps/maven-authenticate.yml
Comment thread
chidozieononiwu marked this conversation as resolved.

- template: /eng/pipelines/templates/steps/setup-go.yml

- template: /eng/pipelines/templates/steps/set-cli-version-cd.yml
Expand Down Expand Up @@ -101,9 +106,21 @@ jobs:
version: '9.x'
displayName: Set up .NET 9

- bash: dotnet nuget add source --name azure-sdk-for-net https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
displayName: Add Azure SDK dev nuget feed

- bash: dotnet nuget add source --name dotnet9 https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json
displayName: Add internal dotnet nuget feed

- template: /eng/common/pipelines/templates/steps/pypi-auth-dev-feed.yml
Comment thread
chidozieononiwu marked this conversation as resolved.
parameters:
EnableTwineAuth: false
EnablePipAuth: true
EnableUvAuth: false

- task: NuGetAuthenticate@1
displayName: Authenticate NuGet feeds

- template: /eng/pipelines/templates/steps/configure-oidc-auth.yml

- pwsh: |
Expand Down Expand Up @@ -154,6 +171,8 @@ jobs:
# Code Coverage: Generate junit report to publish results
GOTESTSUM_JUNITFILE: junitTestReport.xml
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
PIP_INDEX_URL: $(PIP_INDEX_URL)
PIP_EXTRA_INDEX_URL: $(PIP_EXTRA_INDEX_URL)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PIP_EXTRA_INDEX_URL never gets set, so this hands literal text to the test process.

The template gives PipAuthenticate@1 a single feed with onlyAddExtraIndex: false. The task shifts that one endpoint into PIP_INDEX_URL and only sets PIP_EXTRA_INDEX_URL when endpoints remain, which they don't (Tasks/PipAuthenticateV1/pipauthenticatemain.ts). Azure Pipelines leaves unresolved $(...) macros as-is, so go test ends up with PIP_EXTRA_INDEX_URL=$(PIP_EXTRA_INDEX_URL).

pip warns on a non-URL index and ignores it rather than failing, so nothing breaks. It's just log noise and a misleading env var. Drop the line.

# Disable MSBuild node reuse for Aspire-related tests.
# MSBuild node reuse is a pure performance optimization that is generally recommended to be disabled on CI environments
# that deal with short-lived processes.
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/stages/1es-redirect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extends:
enabled: true
settings:
skipBuildTagsForGitHubPullRequests: true
networkIsolationPolicy: Permissive
networkIsolationPolicy: Permissive, CFSClean
Comment thread
chidozieononiwu marked this conversation as resolved.
Comment thread
chidozieononiwu marked this conversation as resolved.
sdl:
# Turn off the build warnings caused by disabling some sdl checks
createAdoIssuesForJustificationsForDisablement: false
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/templates/stages/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ stages:
steps:
- checkout: self

- template: /eng/common/pipelines/templates/steps/pypi-auth-dev-feed.yml

- template: /eng/pipelines/templates/steps/setup-go.yml

- template: /eng/pipelines/templates/steps/set-cli-version-cd.yml
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/templates/steps/build-msi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ steps:
displayName: Restore NuGet packages
inputs:
restoreSolution: cli/installer/windows.sln
feedsToUse: select
vstsFeed: 'public/azure-sdk-for-net'

- ${{ if eq(parameters.ShouldBuildForRelease, 'true') }}:
- pwsh: |
Expand Down
13 changes: 13 additions & 0 deletions eng/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>azure-sdk-for-java</id>
<name>Azure Artifacts Maven Mirror</name>
<url>https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-java/maven/v1</url>
<mirrorOf>external:*</mirrorOf>
</mirror>
</mirrors>
</settings>
Loading