From 6a63956a8ed15915ab7fe97104ac176ebd1088c6 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 2 Apr 2026 15:02:03 -0500 Subject: [PATCH] add pip authenticate for all pipelines --- eng/ci/emulator-tests.yml | 3 ++- eng/ci/official-build.yml | 6 +++++- eng/ci/public-build.yml | 7 ++++++- eng/pack/templates/macos_64_env_gen.yml | 4 ++++ eng/pack/templates/nix_arm64_env_gen.yml | 4 ++++ eng/pack/templates/nix_env_gen.yml | 4 ++++ eng/pack/templates/win_env_gen.yml | 4 ++++ eng/templates/jobs/build.yml | 3 ++- eng/templates/jobs/ci-dependency-check.yml | 7 +++++++ eng/templates/jobs/ci-emulator-tests.yml | 5 +++++ eng/templates/jobs/ci-library-unit-tests.yml | 5 +++++ eng/templates/jobs/ci-unit-tests.yml | 5 +++++ eng/templates/official/jobs/build-library.yml | 4 ++++ eng/templates/official/jobs/ci-core-tools-tests.yml | 4 ++++ eng/templates/official/jobs/ci-custom-image-tests.yml | 4 ++++ .../official/jobs/ci-docker-consumption-tests.yml | 4 ++++ eng/templates/official/jobs/ci-docker-dedicated-tests.yml | 4 ++++ eng/templates/official/jobs/ci-e2e-tests.yml | 4 ++++ eng/templates/official/jobs/ci-lc-tests.yml | 4 ++++ eng/templates/official/jobs/publish-library-release.yml | 4 ++++ eng/templates/shared/build-steps.yml | 5 +++++ 21 files changed, 90 insertions(+), 4 deletions(-) diff --git a/eng/ci/emulator-tests.yml b/eng/ci/emulator-tests.yml index c7792ea94..a9eabcff5 100644 --- a/eng/ci/emulator-tests.yml +++ b/eng/ci/emulator-tests.yml @@ -49,4 +49,5 @@ extends: jobs: - template: /eng/templates/jobs/ci-emulator-tests.yml@self parameters: - PoolName: 1es-pool-azfunc \ No newline at end of file + PoolName: 1es-pool-azfunc + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' \ No newline at end of file diff --git a/eng/ci/official-build.yml b/eng/ci/official-build.yml index 40095352a..818656ba0 100644 --- a/eng/ci/official-build.yml +++ b/eng/ci/official-build.yml @@ -63,12 +63,14 @@ extends: - template: /eng/templates/jobs/ci-emulator-tests.yml@self parameters: PoolName: 1es-pool-azfunc + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' - stage: RunWorkerUnitTests dependsOn: BuildPythonWorker jobs: - template: /eng/templates/jobs/ci-unit-tests.yml@self parameters: PoolName: 1es-pool-azfunc + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' - stage: RunWorkerDockerConsumptionTests dependsOn: BuildPythonWorker jobs: @@ -99,6 +101,7 @@ extends: PROJECT_NAME: 'Python V2 Library' PROJECT_DIRECTORY: 'runtimes/v2' PoolName: 1es-pool-azfunc + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' # Python V1 Library Build and Test Stages - stage: BuildV1Library @@ -116,4 +119,5 @@ extends: parameters: PROJECT_NAME: 'Python V1 Library' PROJECT_DIRECTORY: 'runtimes/v1' - PoolName: 1es-pool-azfunc \ No newline at end of file + PoolName: 1es-pool-azfunc + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' \ No newline at end of file diff --git a/eng/ci/public-build.yml b/eng/ci/public-build.yml index 5605fa025..aa9dee25b 100644 --- a/eng/ci/public-build.yml +++ b/eng/ci/public-build.yml @@ -79,6 +79,7 @@ extends: - template: /eng/templates/jobs/ci-dependency-check.yml@self parameters: PoolName: 1es-pool-azfunc-public + ArtifactFeed: 'public/PythonWorker_PublicPackages' - stage: RunWorkerUnitTests dependsOn: BuildPythonWorker jobs: @@ -86,12 +87,14 @@ extends: parameters: PROJECT_DIRECTORY: 'workers' PoolName: 1es-pool-azfunc-public + ArtifactFeed: 'public/PythonWorker_PublicPackages' - stage: RunWorkerEmulatorTests dependsOn: BuildPythonWorker jobs: - template: /eng/templates/jobs/ci-emulator-tests.yml@self parameters: PoolName: 1es-pool-azfunc-public + ArtifactFeed: 'public/PythonWorker_PublicPackages' # Python V2 Library Build and Test Stages - stage: BuildV2Library @@ -110,6 +113,7 @@ extends: PROJECT_NAME: 'V2 Library' PROJECT_DIRECTORY: 'runtimes/v2' PoolName: 1es-pool-azfunc-public + ArtifactFeed: 'public/PythonWorker_PublicPackages' # Python V1 Library Build and Test Stages - stage: BuildV1Library @@ -127,4 +131,5 @@ extends: parameters: PROJECT_NAME: 'V1 Library' PROJECT_DIRECTORY: 'runtimes/v1' - PoolName: 1es-pool-azfunc-public \ No newline at end of file + PoolName: 1es-pool-azfunc-public + ArtifactFeed: 'public/PythonWorker_PublicPackages' \ No newline at end of file diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index 2b1c831a9..4168d2727 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -9,6 +9,10 @@ steps: versionSpec: ${{ parameters.pythonVersion }} allowUnstable: true addToPath: true +- task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - powershell: | # Parse the Python minor version $PY_VER = "$(pythonVersion)" diff --git a/eng/pack/templates/nix_arm64_env_gen.yml b/eng/pack/templates/nix_arm64_env_gen.yml index 528722e09..fd3d77a55 100644 --- a/eng/pack/templates/nix_arm64_env_gen.yml +++ b/eng/pack/templates/nix_arm64_env_gen.yml @@ -9,6 +9,10 @@ steps: versionSpec: ${{ parameters.pythonVersion }} allowUnstable: true addToPath: true +- task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - powershell: | # Parse the Python minor version $PY_VER = "$(pythonVersion)" diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index 079dbe21b..744f6fa6c 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -9,6 +9,10 @@ steps: versionSpec: ${{ parameters.pythonVersion }} allowUnstable: true addToPath: true +- task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - powershell: | # Parse the Python minor version $PY_VER = "$(pythonVersion)" diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index 1760193ea..4df08ee49 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -10,6 +10,10 @@ steps: allowUnstable: true architecture: ${{ parameters.architecture }} addToPath: true +- task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - powershell: | # Parse the Python minor version $PY_VER = "$(pythonVersion)" diff --git a/eng/templates/jobs/build.yml b/eng/templates/jobs/build.yml index 1ceb033db..7a6825008 100644 --- a/eng/templates/jobs/build.yml +++ b/eng/templates/jobs/build.yml @@ -18,4 +18,5 @@ jobs: parameters: PYTHON_VERSION: ${{ parameters.PYTHON_VERSION }} PROJECT_NAME: ${{ parameters.PROJECT_NAME }} - PROJECT_DIRECTORY: ${{ parameters.PROJECT_DIRECTORY }} \ No newline at end of file + PROJECT_DIRECTORY: ${{ parameters.PROJECT_DIRECTORY }} + ArtifactFeed: 'public/PythonWorker_PublicPackages' \ No newline at end of file diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index 1da4982f6..2334eb147 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -1,3 +1,6 @@ +parameters: + ArtifactFeed: '' + jobs: - job: "TestPython" displayName: "Run Dependency Checks" @@ -25,6 +28,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: ${{ parameters.ArtifactFeed }} - powershell: | $PY_VER = "$(PYTHON_VERSION)" Write-Host "Python version: $PY_VER" diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml index fe721cfb1..eddb6a32d 100644 --- a/eng/templates/jobs/ci-emulator-tests.yml +++ b/eng/templates/jobs/ci-emulator-tests.yml @@ -1,5 +1,6 @@ parameters: PROJECT_DIRECTORY: 'workers' + ArtifactFeed: '' jobs: - job: "TestPython" @@ -46,6 +47,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: ${{ parameters.ArtifactFeed }} - task: UseDotNet@2 displayName: 'Install .NET 8' inputs: diff --git a/eng/templates/jobs/ci-library-unit-tests.yml b/eng/templates/jobs/ci-library-unit-tests.yml index f82cf5850..b5eaefea4 100644 --- a/eng/templates/jobs/ci-library-unit-tests.yml +++ b/eng/templates/jobs/ci-library-unit-tests.yml @@ -1,6 +1,7 @@ parameters: PROJECT_NAME: '' PROJECT_DIRECTORY: '' + ArtifactFeed: '' jobs: - job: "TestPython" @@ -20,6 +21,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: ${{ parameters.ArtifactFeed }} - task: UseDotNet@2 displayName: 'Install .NET 8' inputs: diff --git a/eng/templates/jobs/ci-unit-tests.yml b/eng/templates/jobs/ci-unit-tests.yml index 45d98855d..45b0efa96 100644 --- a/eng/templates/jobs/ci-unit-tests.yml +++ b/eng/templates/jobs/ci-unit-tests.yml @@ -1,5 +1,6 @@ parameters: PROJECT_DIRECTORY: 'workers' + ArtifactFeed: '' jobs: - job: "TestPython" @@ -46,6 +47,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: ${{ parameters.ArtifactFeed }} - task: UseDotNet@2 displayName: 'Install .NET 8' inputs: diff --git a/eng/templates/official/jobs/build-library.yml b/eng/templates/official/jobs/build-library.yml index f68f8985b..c5bb02925 100644 --- a/eng/templates/official/jobs/build-library.yml +++ b/eng/templates/official/jobs/build-library.yml @@ -23,6 +23,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: "3.13" + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'public/PythonWorker_PublicPackages' - bash: | python --version displayName: 'Check python version' diff --git a/eng/templates/official/jobs/ci-core-tools-tests.yml b/eng/templates/official/jobs/ci-core-tools-tests.yml index 3e8a9b622..903630b49 100644 --- a/eng/templates/official/jobs/ci-core-tools-tests.yml +++ b/eng/templates/official/jobs/ci-core-tools-tests.yml @@ -13,6 +13,10 @@ jobs: inputs: versionSpec: "3.10" addToPath: true + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - task: UseDotNet@2 displayName: 'Install DotNet 3' inputs: diff --git a/eng/templates/official/jobs/ci-custom-image-tests.yml b/eng/templates/official/jobs/ci-custom-image-tests.yml index 581a3a7ce..8bf854858 100644 --- a/eng/templates/official/jobs/ci-custom-image-tests.yml +++ b/eng/templates/official/jobs/ci-custom-image-tests.yml @@ -14,6 +14,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(CUSTOM_PYTHON_VERSION) + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - bash: | chmod +x eng/scripts/install-dependencies.sh diff --git a/eng/templates/official/jobs/ci-docker-consumption-tests.yml b/eng/templates/official/jobs/ci-docker-consumption-tests.yml index c4af5c014..d8ee29cbe 100644 --- a/eng/templates/official/jobs/ci-docker-consumption-tests.yml +++ b/eng/templates/official/jobs/ci-docker-consumption-tests.yml @@ -41,6 +41,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - bash: | chmod +x eng/scripts/install-dependencies.sh diff --git a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml index dff9f5d1f..711c21d06 100644 --- a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml +++ b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml @@ -41,6 +41,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - bash: | chmod +x eng/scripts/install-dependencies.sh diff --git a/eng/templates/official/jobs/ci-e2e-tests.yml b/eng/templates/official/jobs/ci-e2e-tests.yml index dce8f8af2..2d319df8e 100644 --- a/eng/templates/official/jobs/ci-e2e-tests.yml +++ b/eng/templates/official/jobs/ci-e2e-tests.yml @@ -70,6 +70,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - task: UseDotNet@2 displayName: 'Install .NET 8' inputs: diff --git a/eng/templates/official/jobs/ci-lc-tests.yml b/eng/templates/official/jobs/ci-lc-tests.yml index 0bb4d365c..e8df65d25 100644 --- a/eng/templates/official/jobs/ci-lc-tests.yml +++ b/eng/templates/official/jobs/ci-lc-tests.yml @@ -42,6 +42,10 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - bash: | # Start Azurite storage emulator in the background diff --git a/eng/templates/official/jobs/publish-library-release.yml b/eng/templates/official/jobs/publish-library-release.yml index 341870568..345ec2fe4 100644 --- a/eng/templates/official/jobs/publish-library-release.yml +++ b/eng/templates/official/jobs/publish-library-release.yml @@ -79,6 +79,10 @@ jobs: displayName: 'Use Python 3.13' inputs: versionSpec: 3.13 + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' - pwsh: | $newLibraryVersion = "$(NewWorkerVersion)" $pypiToken = "$(PypiToken)" diff --git a/eng/templates/shared/build-steps.yml b/eng/templates/shared/build-steps.yml index 4ecd148c3..2ca962aa7 100644 --- a/eng/templates/shared/build-steps.yml +++ b/eng/templates/shared/build-steps.yml @@ -2,11 +2,16 @@ parameters: PYTHON_VERSION: '' PROJECT_NAME: '' PROJECT_DIRECTORY: '' + ArtifactFeed: '' steps: - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.PYTHON_VERSION }} + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: ${{ parameters.ArtifactFeed }} - bash: | python --version displayName: 'Check python version'