Skip to content

Commit 2dd89f5

Browse files
committed
Switch ESRP Production publish stage to EsrpRelease@9 on windows-latest
1 parent 3bfad4f commit 2dd89f5

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

.Pipelines/pipeline-publish.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ stages:
126126
127127
# ══════════════════════════════════════════════════════════════════════════════
128128
# Stage 4b · Publish to PyPI (ESRP Production)
129+
# Uses EsrpRelease@9 via the MSAL-ESRP-AME service connection.
129130
# IMPORTANT: configure a required manual approval on this environment in
130131
# ADO → Pipelines → Environments → MSAL-Python-Release → Approvals and checks.
132+
# IMPORTANT: EsrpRelease@9 requires a Windows agent.
131133
# ══════════════════════════════════════════════════════════════════════════════
132134
- stage: PublishPyPI
133135
displayName: 'Publish to PyPI (ESRP Production)'
@@ -139,9 +141,9 @@ stages:
139141
)
140142
jobs:
141143
- deployment: DeployPyPI
142-
displayName: 'Upload to pypi.org'
144+
displayName: 'Upload to PyPI via ESRP'
143145
pool:
144-
vmImage: ubuntu-latest
146+
vmImage: windows-latest
145147
environment: MSAL-Python-Release
146148
strategy:
147149
runOnce:
@@ -153,23 +155,21 @@ stages:
153155
artifactName: python-dist
154156
targetPath: $(Pipeline.Workspace)/python-dist
155157

156-
- task: UsePythonVersion@0
157-
inputs:
158-
versionSpec: '3.12'
159-
displayName: 'Use Python 3.12'
160-
161-
- script: |
162-
python -m pip install --upgrade pip twine
163-
displayName: 'Install twine'
164-
165-
- task: TwineAuthenticate@1
166-
displayName: 'Authenticate with MSAL-Prod-Python-Upload'
158+
- task: EsrpRelease@9
159+
displayName: 'Publish to PyPI via ESRP'
167160
inputs:
168-
pythonUploadServiceConnection: MSAL-Prod-Python-Upload
169-
170-
- script: |
171-
python -m twine upload \
172-
-r "MSAL-Prod-Python-Upload" \
173-
--config-file $(PYPIRC_PATH) \
174-
$(Pipeline.Workspace)/python-dist/*
175-
displayName: 'Upload to PyPI (ESRP Production)'
161+
connectedservicename: 'MSAL-ESRP-AME'
162+
usemanagedidentity: true
163+
keyvaultname: 'MSALVault'
164+
signcertname: 'MSAL-ESRP-Release-Signing'
165+
clientid: '8650ce2b-38d4-466a-9144-bc5c19c88112'
166+
intent: 'PackageDistribution'
167+
contenttype: 'PyPi'
168+
contentsource: 'Folder'
169+
folderlocation: '$(Pipeline.Workspace)/python-dist'
170+
waitforreleasecompletion: true
171+
owners: 'ryauld@microsoft.com;avdunn@microsoft.com'
172+
approvers: 'avdunn@microsoft.com;bogavril@microsoft.com'
173+
serviceendpointurl: 'https://api.esrp.microsoft.com'
174+
mainpublisher: 'ESRPRELPACMAN'
175+
domaintenantid: '33e01921-4d64-4f8c-a055-5bdaffd5e33d'

0 commit comments

Comments
 (0)