diff --git a/eng/templates/jobs/build.yml b/eng/templates/jobs/build.yml index 9a43ea4a..de6845d9 100644 --- a/eng/templates/jobs/build.yml +++ b/eng/templates/jobs/build.yml @@ -16,23 +16,19 @@ jobs: PYTHON_VERSION: '3.14' steps: + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'public/PythonSDK_PublicPackages' + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) - 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 python -m build displayName: 'Build Python SDK for $(PYTHON_VERSION)' - - bash: | - pip install pip-audit - pip-audit . - displayName: 'Run vulnerability scan' - condition: ne(variables['PYTHON_VERSION'], '3.7') diff --git a/eng/templates/jobs/ci-tests.yml b/eng/templates/jobs/ci-tests.yml index c312c005..5617f4ae 100644 --- a/eng/templates/jobs/ci-tests.yml +++ b/eng/templates/jobs/ci-tests.yml @@ -20,6 +20,11 @@ jobs: PYTHON_VERSION: '3.14' steps: + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: ${{ parameters.artifactFeed }} + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) @@ -27,10 +32,6 @@ 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: ${{ 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 12426c57..287fbd2b 100644 --- a/eng/templates/official/jobs/build-artifacts.yml +++ b/eng/templates/official/jobs/build-artifacts.yml @@ -15,22 +15,19 @@ jobs: artifactName: "azure-functions" steps: + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonSDK_Internal_PublicPackages' + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: "3.11" - bash: | python --version displayName: 'Check python version' - - task: PipAuthenticate@1 - displayName: 'Pip Authenticate' - inputs: - artifactFeeds: 'internal/PythonSDK_Internal_PublicPackages' - bash: | python -m pip install -U pip python -m pip install build python -m build displayName: 'Build Python SDK' - - bash: | - pip install pip-audit - pip-audit . - displayName: 'Run vulnerability scan' diff --git a/eng/templates/official/release/build-artifacts.yml b/eng/templates/official/release/build-artifacts.yml index 67b5c47c..aee1a2ca 100644 --- a/eng/templates/official/release/build-artifacts.yml +++ b/eng/templates/official/release/build-artifacts.yml @@ -49,6 +49,11 @@ jobs: artifactName: ${{ parameters.artifactName }} steps: + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'internal/PythonSDK_Internal_PublicPackages' + onlyAddExtraIndex: false - ${{ if ne(parameters.libraryVersion, '') }}: - checkout: none - bash: | @@ -62,10 +67,6 @@ jobs: - bash: | python --version displayName: 'Check python version' - - task: PipAuthenticate@1 - displayName: 'Pip Authenticate' - inputs: - artifactFeeds: 'internal/PythonSDK_Internal_PublicPackages' - bash: | python -m pip install -U pip python -m pip install build