diff --git a/eng/ci/emulator-tests.yml b/eng/ci/emulator-tests.yml
index c165b02e..c7792ea9 100644
--- a/eng/ci/emulator-tests.yml
+++ b/eng/ci/emulator-tests.yml
@@ -49,6 +49,4 @@ extends:
jobs:
- template: /eng/templates/jobs/ci-emulator-tests.yml@self
parameters:
- PoolName: 1es-pool-azfunc
- ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages'
- NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages'
\ No newline at end of file
+ PoolName: 1es-pool-azfunc
\ No newline at end of file
diff --git a/eng/ci/official-build.yml b/eng/ci/official-build.yml
index 876ac571..7571086f 100644
--- a/eng/ci/official-build.yml
+++ b/eng/ci/official-build.yml
@@ -63,16 +63,12 @@ extends:
- template: /eng/templates/jobs/ci-emulator-tests.yml@self
parameters:
PoolName: 1es-pool-azfunc
- ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages'
- NuGetServiceConnection: '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'
- NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages'
- stage: RunWorkerDockerDedicatedTests
dependsOn: BuildPythonWorker
jobs:
@@ -99,8 +95,6 @@ extends:
PROJECT_NAME: 'Python V2 Library'
PROJECT_DIRECTORY: 'runtimes/v2'
PoolName: 1es-pool-azfunc
- ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages'
- NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages'
# Python V1 Library Build and Test Stages
- stage: BuildV1Library
@@ -118,6 +112,4 @@ extends:
parameters:
PROJECT_NAME: 'Python V1 Library'
PROJECT_DIRECTORY: 'runtimes/v1'
- PoolName: 1es-pool-azfunc
- ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages'
- NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages'
\ No newline at end of file
+ PoolName: 1es-pool-azfunc
\ No newline at end of file
diff --git a/eng/ci/public-build.yml b/eng/ci/public-build.yml
index e9c5b414..a7d6419c 100644
--- a/eng/ci/public-build.yml
+++ b/eng/ci/public-build.yml
@@ -79,7 +79,6 @@ 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:
@@ -87,17 +86,12 @@ extends:
parameters:
PROJECT_DIRECTORY: 'workers'
PoolName: 1es-pool-azfunc-public
- ArtifactFeed: 'public/PythonWorker_PublicPackages'
- NuGetServiceConnection: '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'
- NuGetServiceConnection: 'PythonWorker_PublicPackages'
-
# Python V2 Library Build and Test Stages
- stage: BuildV2Library
dependsOn: []
@@ -115,8 +109,6 @@ extends:
PROJECT_NAME: 'V2 Library'
PROJECT_DIRECTORY: 'runtimes/v2'
PoolName: 1es-pool-azfunc-public
- ArtifactFeed: 'public/PythonWorker_PublicPackages'
- NuGetServiceConnection: 'PythonWorker_PublicPackages'
# Python V1 Library Build and Test Stages
- stage: BuildV1Library
@@ -134,6 +126,4 @@ extends:
parameters:
PROJECT_NAME: 'V1 Library'
PROJECT_DIRECTORY: 'runtimes/v1'
- PoolName: 1es-pool-azfunc-public
- ArtifactFeed: 'public/PythonWorker_PublicPackages'
- NuGetServiceConnection: 'PythonWorker_PublicPackages'
\ No newline at end of file
+ PoolName: 1es-pool-azfunc-public
\ 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 de3c65fa..d09eace1 100644
--- a/eng/pack/templates/macos_64_env_gen.yml
+++ b/eng/pack/templates/macos_64_env_gen.yml
@@ -5,9 +5,10 @@ parameters:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.pythonVersion }}
@@ -69,12 +70,6 @@ steps:
# args: '${{ parameters.pythonVersion }}'
# displayName: 'Build dependencies from source'
# condition: eq(variables['isRC'], 'true')
-- bash: |
- pip install pip-audit
- cd workers
- pip-audit -r requirements.txt
- displayName: 'Run vulnerability scan'
- continueOnError: true
- task: CopyFiles@2
inputs:
contents: '$(workerPath)'
diff --git a/eng/pack/templates/nix_arm64_env_gen.yml b/eng/pack/templates/nix_arm64_env_gen.yml
index ef68cae4..6b65928d 100644
--- a/eng/pack/templates/nix_arm64_env_gen.yml
+++ b/eng/pack/templates/nix_arm64_env_gen.yml
@@ -5,9 +5,10 @@ parameters:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.pythonVersion }}
@@ -69,12 +70,6 @@ steps:
args: '${{ parameters.pythonVersion }}'
displayName: 'Build dependencies from scratch'
condition: eq(variables['isRC'], 'true')
-- bash: |
- pip install pip-audit
- cd workers
- pip-audit -r requirements.txt
- displayName: 'Run vulnerability scan'
- continueOnError: true
- task: CopyFiles@2
inputs:
contents: '$(workerPath)'
diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml
index 4f5278fb..f8116469 100644
--- a/eng/pack/templates/nix_env_gen.yml
+++ b/eng/pack/templates/nix_env_gen.yml
@@ -5,9 +5,10 @@ parameters:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.pythonVersion }}
@@ -69,12 +70,6 @@ steps:
# args: '${{ parameters.pythonVersion }}'
# displayName: 'Build dependencies from source'
# condition: eq(variables['isRC'], 'true')
-- bash: |
- pip install pip-audit
- cd workers
- pip-audit -r requirements.txt
- displayName: 'Run vulnerability scan'
- continueOnError: true
- task: CopyFiles@2
inputs:
contents: '$(workerPath)'
diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml
index 1027cc85..6446db35 100644
--- a/eng/pack/templates/win_env_gen.yml
+++ b/eng/pack/templates/win_env_gen.yml
@@ -5,9 +5,10 @@ parameters:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.pythonVersion }}
@@ -68,12 +69,6 @@ steps:
# arguments: '${{ parameters.pythonVersion }}'
# displayName: 'Build dependencies from source'
# condition: eq(variables['isRC'], 'true')
-- bash: |
- pip install pip-audit
- cd workers
- pip-audit -r requirements.txt
- displayName: 'Run vulnerability scan'
- continueOnError: true
- task: CopyFiles@2
inputs:
contents: '$(workerPath)'
diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh
index e7e0dd00..edf7bb3a 100644
--- a/eng/scripts/install-dependencies.sh
+++ b/eng/scripts/install-dependencies.sh
@@ -1,6 +1,11 @@
#!/bin/bash
set -e
+# Forward PipAuthenticate's index URL to uv, which does not read pip's config.
+if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then
+ export UV_DEFAULT_INDEX="$PIP_INDEX_URL"
+fi
+
# Install uv for faster dependency resolution / installation.
python -m pip install --upgrade pip
python -m pip install uv
@@ -24,7 +29,7 @@ fi
# Install everything else in a single uv invocation so the resolver runs once
# and all wheels are downloaded in parallel.
-$UV_PIP -U --prerelease=allow \
+$UV_PIP -U --prerelease=if-necessary-or-explicit \
azure-functions \
-e "$2/[dev]" \
-e "$2/[test-http-v2]" \
diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh
index 3bd5adea..1d2228cc 100644
--- a/eng/scripts/test-extensions.sh
+++ b/eng/scripts/test-extensions.sh
@@ -1,6 +1,10 @@
#!/bin/bash
set -e
+if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then
+ export UV_DEFAULT_INDEX="$PIP_INDEX_URL"
+fi
+
python -m pip install --upgrade pip
python -m pip install uv
@@ -8,7 +12,7 @@ UV_PIP="python -m uv pip install --system"
$UV_PIP "setuptools>=62,<82.0"
$UV_PIP -e $1/PythonExtensionArtifact/$3
-$UV_PIP --prerelease=allow -e workers/[test-http-v2]
-$UV_PIP -U --prerelease=allow -e workers/[test-deferred-bindings]
+$UV_PIP --prerelease=if-necessary-or-explicit -e workers/[test-http-v2]
+$UV_PIP -U --prerelease=if-necessary-or-explicit -e workers/[test-deferred-bindings]
$UV_PIP -U -e workers/[dev]
\ No newline at end of file
diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh
index cf5caf1e..a342670e 100644
--- a/eng/scripts/test-sdk.sh
+++ b/eng/scripts/test-sdk.sh
@@ -1,6 +1,10 @@
#!/bin/bash
set -e
+if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then
+ export UV_DEFAULT_INDEX="$PIP_INDEX_URL"
+fi
+
python -m pip install --upgrade pip
python -m pip install uv
@@ -10,5 +14,5 @@ $UV_PIP "setuptools>=62,<82.0"
$UV_PIP -e $1/PythonSdkArtifact
$UV_PIP -e workers/[dev]
-$UV_PIP -U --prerelease=allow -e workers/[test-http-v2]
-$UV_PIP -U --prerelease=allow -e workers/[test-deferred-bindings]
\ No newline at end of file
+$UV_PIP -U --prerelease=if-necessary-or-explicit -e workers/[test-http-v2]
+$UV_PIP -U --prerelease=if-necessary-or-explicit -e workers/[test-deferred-bindings]
\ No newline at end of file
diff --git a/eng/templates/jobs/build.yml b/eng/templates/jobs/build.yml
index 2af6eeee..2e228a72 100644
--- a/eng/templates/jobs/build.yml
+++ b/eng/templates/jobs/build.yml
@@ -19,4 +19,4 @@ jobs:
PYTHON_VERSION: ${{ parameters.PYTHON_VERSION }}
PROJECT_NAME: ${{ parameters.PROJECT_NAME }}
PROJECT_DIRECTORY: ${{ parameters.PROJECT_DIRECTORY }}
- ArtifactFeed: 'public/PythonWorker_PublicPackages'
\ No newline at end of file
+
\ 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 a3bdaa54..b3b4cda1 100644
--- a/eng/templates/jobs/ci-dependency-check.yml
+++ b/eng/templates/jobs/ci-dependency-check.yml
@@ -1,6 +1,3 @@
-parameters:
- ArtifactFeed: ''
-
jobs:
- job: "TestPython"
displayName: "Run Dependency Checks"
@@ -26,9 +23,10 @@ jobs:
PYTHON_VERSION: '3.14'
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: ${{ parameters.ArtifactFeed }}
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
@@ -54,6 +52,9 @@ jobs:
displayName: 'Set necessary variables'
- bash: |
echo "Checking azure_functions_worker (Python < 3.13)..."
+ if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then
+ export UV_DEFAULT_INDEX="$PIP_INDEX_URL"
+ fi
cd workers
python -m pip install --upgrade pip
python -m pip install uv
@@ -67,6 +68,9 @@ jobs:
condition: eq(variables['proxyWorker'], false)
- bash: |
echo "Checking proxy_worker (Python >= 3.13)..."
+ if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then
+ export UV_DEFAULT_INDEX="$PIP_INDEX_URL"
+ fi
cd workers
python -m pip install --upgrade pip
python -m pip install uv
@@ -79,6 +83,9 @@ jobs:
condition: eq(variables['proxyWorker'], true)
- bash: |
echo "Checking V1 Library Worker (Python >= 3.13)..."
+ if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then
+ export UV_DEFAULT_INDEX="$PIP_INDEX_URL"
+ fi
cd runtimes/v1
python -m pip install --upgrade pip
python -m pip install uv
@@ -88,6 +95,9 @@ jobs:
condition: eq(variables['proxyWorker'], true)
- bash: |
echo "Checking V2 Library Worker (Python >= 3.13)..."
+ if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then
+ export UV_DEFAULT_INDEX="$PIP_INDEX_URL"
+ fi
cd runtimes/v2
python -m pip install --upgrade pip
python -m pip install uv
diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml
index 10d563fa..466f590f 100644
--- a/eng/templates/jobs/ci-emulator-tests.yml
+++ b/eng/templates/jobs/ci-emulator-tests.yml
@@ -1,7 +1,5 @@
parameters:
PROJECT_DIRECTORY: 'workers'
- ArtifactFeed: ''
- NuGetServiceConnection: ''
jobs:
- job: "TestPython"
@@ -28,9 +26,10 @@ jobs:
PYTHON_VERSION: '3.14'
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: ${{ parameters.ArtifactFeed }}
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- bash: |
echo "Disk space before cleanup:"
df -h
@@ -77,19 +76,7 @@ jobs:
inputs:
version: 10.0.x
- task: NuGetAuthenticate@1
- displayName: 'NuGet Authenticate'
- - bash: |
- # Remove the feed that doesn't match the current service connection
- if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then
- # Remove internal feed for public builds
- sed -i '/_Internal_PublicPackages/d' nuget.config
- else
- # Remove public feed for internal builds
- sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config
- fi
- echo "Updated nuget.config:"
- cat nuget.config
- displayName: 'Configure NuGet feed for current organization'
+ displayName: 'Authenticate NuGet to CFS'
- bash: |
chmod +x eng/scripts/install-dependencies.sh
eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }}
diff --git a/eng/templates/jobs/ci-library-unit-tests.yml b/eng/templates/jobs/ci-library-unit-tests.yml
index d7d0a1a6..a792790d 100644
--- a/eng/templates/jobs/ci-library-unit-tests.yml
+++ b/eng/templates/jobs/ci-library-unit-tests.yml
@@ -1,8 +1,6 @@
parameters:
PROJECT_NAME: ''
PROJECT_DIRECTORY: ''
- ArtifactFeed: ''
- NuGetServiceConnection: ''
jobs:
- job: "TestPython"
@@ -20,9 +18,10 @@ jobs:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: ${{ parameters.ArtifactFeed }}
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
@@ -31,19 +30,7 @@ jobs:
inputs:
version: 10.0.x
- task: NuGetAuthenticate@1
- displayName: 'NuGet Authenticate'
- - bash: |
- # Remove the feed that doesn't match the current service connection
- if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then
- # Remove internal feed for public builds
- sed -i '/_Internal_PublicPackages/d' nuget.config
- else
- # Remove public feed for internal builds
- sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config
- fi
- echo "Updated nuget.config:"
- cat nuget.config
- displayName: 'Configure NuGet feed for current organization'
+ displayName: 'Authenticate NuGet to CFS'
- bash: |
chmod +x eng/scripts/install-dependencies.sh
eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }}
diff --git a/eng/templates/jobs/ci-unit-tests.yml b/eng/templates/jobs/ci-unit-tests.yml
index 6db16880..e035b1a7 100644
--- a/eng/templates/jobs/ci-unit-tests.yml
+++ b/eng/templates/jobs/ci-unit-tests.yml
@@ -1,7 +1,5 @@
parameters:
PROJECT_DIRECTORY: 'workers'
- ArtifactFeed: ''
- NuGetServiceConnection: ''
jobs:
- job: "TestPython"
@@ -28,9 +26,10 @@ jobs:
PYTHON_VERSION: '3.14'
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: ${{ parameters.ArtifactFeed }}
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- bash: |
echo "Disk space before cleanup:"
df -h
@@ -80,19 +79,7 @@ jobs:
inputs:
version: 10.0.x
- task: NuGetAuthenticate@1
- displayName: 'NuGet Authenticate'
- - bash: |
- # Remove the feed that doesn't match the current service connection
- if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then
- # Remove internal feed for public builds
- sed -i '/_Internal_PublicPackages/d' nuget.config
- else
- # Remove public feed for internal builds
- sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config
- fi
- echo "Updated nuget.config:"
- cat nuget.config
- displayName: 'Configure NuGet feed for current organization'
+ displayName: 'Authenticate NuGet to CFS'
- bash: |
chmod +x eng/scripts/install-dependencies.sh
eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }}
diff --git a/eng/templates/official/jobs/build-library.yml b/eng/templates/official/jobs/build-library.yml
index 7d140083..4ce158b7 100644
--- a/eng/templates/official/jobs/build-library.yml
+++ b/eng/templates/official/jobs/build-library.yml
@@ -21,9 +21,10 @@ jobs:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'public/PythonWorker_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: "3.13"
@@ -35,10 +36,4 @@ jobs:
python -m pip install build
cd ${{ parameters.PROJECT_DIRECTORY }}
python -m build
- displayName: 'Build ${{ parameters.PROJECT_NAME }}'
- - bash: |
- pip install pip-audit
- cd ${{ parameters.PROJECT_DIRECTORY }}
- pip-audit .
- displayName: 'Run vulnerability scan'
- continueOnError: true
\ No newline at end of file
+ displayName: 'Build ${{ parameters.PROJECT_NAME }}'
\ No newline at end of file
diff --git a/eng/templates/official/jobs/ci-core-tools-tests.yml b/eng/templates/official/jobs/ci-core-tools-tests.yml
index 61a723aa..32b8181a 100644
--- a/eng/templates/official/jobs/ci-core-tools-tests.yml
+++ b/eng/templates/official/jobs/ci-core-tools-tests.yml
@@ -9,9 +9,12 @@ jobs:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
+ - task: NuGetAuthenticate@1
+ displayName: 'Authenticate NuGet to CFS'
- task: UsePythonVersion@0
displayName: 'Install Python'
inputs:
diff --git a/eng/templates/official/jobs/ci-custom-image-tests.yml b/eng/templates/official/jobs/ci-custom-image-tests.yml
index 9592d9b1..481f4d10 100644
--- a/eng/templates/official/jobs/ci-custom-image-tests.yml
+++ b/eng/templates/official/jobs/ci-custom-image-tests.yml
@@ -12,9 +12,10 @@ jobs:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: $(CUSTOM_PYTHON_VERSION)
diff --git a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml
index 8e875ce4..d1376275 100644
--- a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml
+++ b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml
@@ -39,9 +39,10 @@ jobs:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
diff --git a/eng/templates/official/jobs/ci-e2e-tests.yml b/eng/templates/official/jobs/ci-e2e-tests.yml
index 0ab7381c..bf4b8f1e 100644
--- a/eng/templates/official/jobs/ci-e2e-tests.yml
+++ b/eng/templates/official/jobs/ci-e2e-tests.yml
@@ -1,6 +1,6 @@
parameters:
PROJECT_DIRECTORY: 'workers'
- NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages'
+
jobs:
- job: "TestPython"
@@ -51,9 +51,10 @@ jobs:
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString38)
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- bash: |
echo "Disk space before cleanup:"
df -h
@@ -89,19 +90,7 @@ jobs:
inputs:
version: 10.0.x
- task: NuGetAuthenticate@1
- displayName: 'NuGet Authenticate'
- - bash: |
- # Remove the feed that doesn't match the current service connection
- if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then
- # Remove internal feed for public builds
- sed -i '/_Internal_PublicPackages/d' nuget.config
- else
- # Remove public feed for internal builds
- sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config
- fi
- echo "Updated nuget.config:"
- cat nuget.config
- displayName: 'Configure NuGet feed for current organization'
+ displayName: 'Authenticate NuGet to CFS'
- bash: |
chmod +x eng/scripts/install-dependencies.sh
eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }}
diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml
index f85c389e..af3b2d72 100644
--- a/eng/templates/official/jobs/ci-fc-tests.yml
+++ b/eng/templates/official/jobs/ci-fc-tests.yml
@@ -24,9 +24,10 @@ jobs:
PYTHON_VERSION: '3.14'
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- bash: |
echo "Disk space before cleanup:"
df -h
@@ -65,6 +66,9 @@ jobs:
condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false))
- bash: |
+ if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then
+ export UV_DEFAULT_INDEX="$PIP_INDEX_URL"
+ fi
python -m pip install --upgrade pip
python -m pip install uv
UV_PIP="python -m uv pip install --system"
diff --git a/eng/templates/official/release/build-artifacts.yml b/eng/templates/official/release/build-artifacts.yml
index 647f74a9..b0666265 100644
--- a/eng/templates/official/release/build-artifacts.yml
+++ b/eng/templates/official/release/build-artifacts.yml
@@ -46,9 +46,10 @@ jobs:
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages'
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- ${{ if ne(parameters.libraryVersion, '') }}:
- checkout: none
- bash: |
diff --git a/eng/templates/shared/build-steps.yml b/eng/templates/shared/build-steps.yml
index 5fcb66b7..3fa9c833 100644
--- a/eng/templates/shared/build-steps.yml
+++ b/eng/templates/shared/build-steps.yml
@@ -2,13 +2,13 @@ parameters:
PYTHON_VERSION: ''
PROJECT_NAME: ''
PROJECT_DIRECTORY: ''
- ArtifactFeed: ''
steps:
- task: PipAuthenticate@1
- displayName: 'Pip Authenticate'
+ displayName: 'Authenticate pip to CFS'
inputs:
- artifactFeeds: ${{ parameters.ArtifactFeed }}
+ artifactFeeds: 'public/upstream-public'
+ onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.PYTHON_VERSION }}
@@ -20,9 +20,4 @@ steps:
python -m pip install build
cd ${{ parameters.PROJECT_DIRECTORY }}
python -m build
- displayName: 'Build Python ${{ parameters.PROJECT_NAME }}'
- - bash: |
- pip install pip-audit
- cd ${{ parameters.PROJECT_DIRECTORY }}
- pip-audit -r requirements.txt
- displayName: 'Run vulnerability scan'
\ No newline at end of file
+ displayName: 'Build Python ${{ parameters.PROJECT_NAME }}'
\ No newline at end of file
diff --git a/nuget.config b/nuget.config
index 08b34c2a..e8f5b8c6 100644
--- a/nuget.config
+++ b/nuget.config
@@ -2,6 +2,6 @@
-
+
\ No newline at end of file
diff --git a/workers/tests/test_setup.py b/workers/tests/test_setup.py
index 2f785dcb..13ac3dcc 100644
--- a/workers/tests/test_setup.py
+++ b/workers/tests/test_setup.py
@@ -30,10 +30,11 @@
from invoke import task
-from utils.constants import EXTENSIONS_CSPROJ_TEMPLATE, NUGET_CONFIG
+from utils.constants import EXTENSIONS_CSPROJ_TEMPLATE
ROOT_DIR = pathlib.Path(__file__).parent.parent
BUILD_DIR = ROOT_DIR / 'build'
+NUGET_CONFIG_PATH = ROOT_DIR.parent / 'nuget.config'
WEBHOST_GITHUB_API = "https://api.github.com/repos/Azure/azure-functions-host"
WEBHOST_GIT_REPO = "https://github.com/Azure/azure-functions-host/archive"
WEBHOST_TAG_PREFIX = "v4."
@@ -289,14 +290,17 @@ def install_extensions(extensions_dir):
with open(extensions_dir / "extensions.csproj", "w") as f:
f.write(EXTENSIONS_CSPROJ_TEMPLATE)
- with open(extensions_dir / "NuGet.config", "w") as f:
- f.write(NUGET_CONFIG)
+ nuget_config_path = extensions_dir / "NuGet.config"
+ shutil.copy2(NUGET_CONFIG_PATH, nuget_config_path)
env = os.environ.copy()
env["TERM"] = "xterm" # ncurses 6.1 workaround
try:
subprocess.run(
- args=["dotnet", "build", "-o", "."],
+ args=[
+ "dotnet", "build", "-o", ".",
+ f"--property:RestoreConfigFile={nuget_config_path}",
+ ],
check=True,
cwd=str(extensions_dir),
stdout=sys.stdout,
diff --git a/workers/tests/utils/constants.py b/workers/tests/utils/constants.py
index f78f133d..8911e356 100644
--- a/workers/tests/utils/constants.py
+++ b/workers/tests/utils/constants.py
@@ -45,23 +45,6 @@
"""
-NUGET_CONFIG = """\
-
-
-
-
-
-
-
-
-
-
-"""
# PROJECT_ROOT refers to the path to azure-functions-python-worker
# TODO: Find root folder without .parent