Skip to content
Merged
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
26 changes: 24 additions & 2 deletions .azure-pipelines/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,40 @@ extends:
path: $(Build.ArtifactStagingDirectory)/esrp-build
artifact: esrp-build
steps:
- bash: |
if [[ ! "$CURRENT_BRANCH" =~ ^v[0-9]+\..* ]]; then
echo "Can only publish from a release tag (v*)."
echo "Unexpected ref name: $CURRENT_BRANCH"
exit 1
fi
env:
CURRENT_BRANCH: ${{ variables['Build.SourceBranchName'] }}
displayName: 'Check the ref is a release tag'
# Allow manual runs on any branch to exercise the build without publishing.
condition: ne(variables['Build.Reason'], 'Manual')
- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
displayName: 'Use Python'
# Resolve every pip install (including the isolated build environments
# that `python -m build` creates) through the DevDiv_PublicPackages Azure
# Artifacts feed instead of pypi.org, as required by SFI-ES4.2.4. The
# task exports an authenticated PIP_INDEX_URL.
- task: PipAuthenticate@1
inputs:
artifactFeeds: DevDiv/DevDiv_PublicPackages
displayName: 'Authenticate pip to DevDiv_PublicPackages feed'
- script: |
python -m pip install --upgrade pip
pip install -r local-requirements.txt
python -m pip install --upgrade pip --disable-pip-version-check
pip install -r local-requirements.txt --disable-pip-version-check
python -m build --outdir $(Build.ArtifactStagingDirectory)/esrp-build pytest-playwright
python -m build --outdir $(Build.ArtifactStagingDirectory)/esrp-build pytest-playwright-asyncio
displayName: 'Install & Build'
- job: Publish
dependsOn: Build
# Only publish from release tags; manual runs on a branch stop after Build,
# which lets the build be exercised without publishing.
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
templateContext:
type: releaseJob
isProduction: true
Expand Down
Loading