From c29b190b531de627d2b1ec3133d7805fecd81f5a Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Wed, 1 Apr 2026 13:31:07 -0500 Subject: [PATCH 1/2] add pip auth --- eng/templates/jobs/build.yml | 4 ++++ eng/templates/jobs/ci-tests.yml | 4 ++++ eng/templates/official/jobs/build-artifacts.yml | 4 ++++ eng/templates/official/jobs/publish-release.yml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/eng/templates/jobs/build.yml b/eng/templates/jobs/build.yml index a9838d6a..08aa38e4 100644 --- a/eng/templates/jobs/build.yml +++ b/eng/templates/jobs/build.yml @@ -22,6 +22,10 @@ jobs: - bash: | python --version displayName: 'Check python version' + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'public/PythonSDK_PublicPackages' - bash: | python -m pip install -U pip python -m pip install build diff --git a/eng/templates/jobs/ci-tests.yml b/eng/templates/jobs/ci-tests.yml index e36ecf1f..831f6c66 100644 --- a/eng/templates/jobs/ci-tests.yml +++ b/eng/templates/jobs/ci-tests.yml @@ -23,6 +23,10 @@ jobs: VERSION=$(python -c "import re; content = open('azure/functions/__init__.py').read(); match = re.search(r\"__version__ = '(\d+)\.(\d+)\.(\d+).*'\", content); print(match.group(1)) if match else '1'") echo "##vso[task.setvariable variable=MAJOR_VERSION]$VERSION" displayName: 'Detect package version' + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'public/PythonSDK_PublicPackages' - bash: | PYTHON_MAJOR=$(echo $(PYTHON_VERSION) | cut -d. -f1) PYTHON_MINOR=$(echo $(PYTHON_VERSION) | cut -d. -f2) diff --git a/eng/templates/official/jobs/build-artifacts.yml b/eng/templates/official/jobs/build-artifacts.yml index 37817855..07b28161 100644 --- a/eng/templates/official/jobs/build-artifacts.yml +++ b/eng/templates/official/jobs/build-artifacts.yml @@ -21,6 +21,10 @@ jobs: - bash: | python --version displayName: 'Check python version' + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'public/PythonSDK_PublicPackages' - bash: | python -m pip install -U pip python -m pip install build diff --git a/eng/templates/official/jobs/publish-release.yml b/eng/templates/official/jobs/publish-release.yml index 47590cdb..006c96d8 100644 --- a/eng/templates/official/jobs/publish-release.yml +++ b/eng/templates/official/jobs/publish-release.yml @@ -239,6 +239,10 @@ jobs: displayName: 'Use Python 3.11' inputs: versionSpec: 3.11 + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'public/PythonSDK_PublicPackages' - pwsh: | $newLibraryVersion = "${{ parameters.libraryVersion }}" $pypiToken = "$(PypiToken)" From 02cfc2e93d8f2e3b6757e449489ce54e81b4c347 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Wed, 1 Apr 2026 14:02:08 -0500 Subject: [PATCH 2/2] fixes --- eng/ci/official-build.yml | 2 ++ eng/ci/public-build.yml | 2 ++ eng/templates/jobs/ci-tests.yml | 6 +++++- eng/templates/official/jobs/build-artifacts.yml | 2 +- eng/templates/official/jobs/publish-release.yml | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/eng/ci/official-build.yml b/eng/ci/official-build.yml index d4f4e9a7..ace115e5 100644 --- a/eng/ci/official-build.yml +++ b/eng/ci/official-build.yml @@ -48,3 +48,5 @@ extends: dependsOn: Build jobs: - template: /eng/templates/jobs/ci-tests.yml@self + parameters: + artifactFeed: 'internal/PythonSDK_Internal_TestPackages' diff --git a/eng/ci/public-build.yml b/eng/ci/public-build.yml index 074d0eb9..6805c560 100644 --- a/eng/ci/public-build.yml +++ b/eng/ci/public-build.yml @@ -48,3 +48,5 @@ extends: dependsOn: Build jobs: - template: /eng/templates/jobs/ci-tests.yml@self + parameters: + artifactFeed: 'public/PythonSDK_PublicPackages' diff --git a/eng/templates/jobs/ci-tests.yml b/eng/templates/jobs/ci-tests.yml index 831f6c66..b126d23e 100644 --- a/eng/templates/jobs/ci-tests.yml +++ b/eng/templates/jobs/ci-tests.yml @@ -1,3 +1,7 @@ +parameters: + - name: artifactFeed + type: string + jobs: - job: "TestPython" displayName: "Run Python SDK Unit Tests" @@ -26,7 +30,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'public/PythonSDK_PublicPackages' + artifactFeeds: ${{ parameters.artifactFeed }} - bash: | PYTHON_MAJOR=$(echo $(PYTHON_VERSION) | cut -d. -f1) PYTHON_MINOR=$(echo $(PYTHON_VERSION) | cut -d. -f2) diff --git a/eng/templates/official/jobs/build-artifacts.yml b/eng/templates/official/jobs/build-artifacts.yml index 07b28161..b3c7a5a0 100644 --- a/eng/templates/official/jobs/build-artifacts.yml +++ b/eng/templates/official/jobs/build-artifacts.yml @@ -24,7 +24,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'public/PythonSDK_PublicPackages' + artifactFeeds: 'internal/PythonSDK_Internal_TestPackages' - bash: | python -m pip install -U pip python -m pip install build diff --git a/eng/templates/official/jobs/publish-release.yml b/eng/templates/official/jobs/publish-release.yml index 006c96d8..89940ac1 100644 --- a/eng/templates/official/jobs/publish-release.yml +++ b/eng/templates/official/jobs/publish-release.yml @@ -242,7 +242,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'public/PythonSDK_PublicPackages' + artifactFeeds: internal/PythonSDK_Internal_TestPackages - pwsh: | $newLibraryVersion = "${{ parameters.libraryVersion }}" $pypiToken = "$(PypiToken)"