@@ -90,8 +90,9 @@ extends:
9090 displayName : ' [TEST] Dummy Release - Testing ESRP Workflow'
9191
9292 jobs :
93- - job : DownloadAndTestRelease
94- displayName : ' [TEST] Download Artifacts and Perform Dummy Release'
93+ # Job 1: Download, validate, and stage artifacts (custom pool)
94+ - job : PrepAndValidate
95+ displayName : ' [TEST] Download and Validate Artifacts'
9596
9697 pool :
9798 type : windows
@@ -116,7 +117,7 @@ extends:
116117 artifactName : ' drop_Consolidate_ConsolidateArtifacts' # Consolidated artifact with dist/ and symbols/
117118 targetPath : ' $(Build.SourcesDirectory)/artifacts'
118119
119- # Step 3 : List downloaded artifacts for verification
120+ # Step 2 : List downloaded artifacts for verification
120121 - task : PowerShell@2
121122 displayName : ' [TEST] List Downloaded Wheel and Symbol Files'
122123 inputs :
@@ -174,7 +175,7 @@ extends:
174175 Write-Host "Symbols: $(if ($symbols) { $symbols.Count } else { 0 }) files"
175176 Write-Host "====================================="
176177
177- # Step 3.5 : Validate mssql-py-core is a stable version (no dev/alpha/beta/rc)
178+ # Step 3: Validate mssql-py-core is a stable version (no dev/alpha/beta/rc)
178179 - task : PowerShell@2
179180 displayName : ' [TEST] Validate mssql-py-core is a stable version'
180181 inputs :
@@ -222,74 +223,7 @@ extends:
222223 parameters :
223224 SymbolsFolder : ' $(Build.SourcesDirectory)/symbols'
224225
225- # Step 6: Copy wheels to ob_outputDirectory for OneBranch artifact publishing
226- - task : CopyFiles@2
227- displayName : ' [TEST] Stage Wheels for Dummy Release'
228- inputs :
229- SourceFolder : ' $(Build.SourcesDirectory)/dist'
230- Contents : ' *.whl'
231- TargetFolder : ' $(ob_outputDirectory)/release'
232- flattenFolders : true
233-
234- # Step 7: ESRP Dummy Release Task (only if performDummyRelease is true)
235- # ⚠️ IMPORTANT: Uses Maven ContentType for testing - NOT PyPI!
236- - ${{ if eq(parameters.performDummyRelease, true) }} :
237- - task : EsrpRelease@9
238- displayName : ' [TEST] ESRP Dummy Release (Maven - NOT PyPI)'
239- inputs :
240- connectedservicename : ' $(ESRPConnectedServiceName)'
241- usemanagedidentity : true
242- keyvaultname : ' $(AuthAKVName)'
243- signcertname : ' $(AuthSignCertName)'
244- clientid : ' $(EsrpClientId)'
245- Intent : ' PackageDistribution'
246- # ⚠️ CRITICAL: ContentType is Maven (NOT PyPI) for safe testing
247- # This ensures no accidental production releases to PyPI
248- ContentType : ' Maven'
249- ContentSource : ' Folder'
250- FolderLocation : ' $(Build.SourcesDirectory)/dist'
251- WaitForReleaseCompletion : true
252- Owners : ' $(owner)'
253- Approvers : ' $(approver)'
254- ServiceEndpointUrl : ' https://api.esrp.microsoft.com'
255- MainPublisher : ' ESRPRELPACMAN'
256- DomainTenantId : ' $(DomainTenantId)'
257-
258- # Step 8: Show test release status
259- - ${{ if eq(parameters.performDummyRelease, true) }} :
260- - task : PowerShell@2
261- displayName : ' [TEST] Dummy Release Summary'
262- inputs :
263- targetType : ' inline'
264- script : |
265- Write-Host "===================================="
266- Write-Host "⚠️ TEST PIPELINE - DUMMY RELEASE COMPLETED ⚠️"
267- Write-Host "===================================="
268- Write-Host "Package: mssql-python (TEST)"
269- Write-Host "ContentType: Maven (NOT PyPI - Safe for Testing)"
270- Write-Host "Owners: $(owner)"
271- Write-Host "Approvers: $(approver)"
272- Write-Host "Symbols Published: ${{ parameters.publishSymbols }}"
273- Write-Host "====================================="
274- Write-Host ""
275- Write-Host "⚠️ IMPORTANT: This was a DUMMY release using Maven ContentType"
276- Write-Host " NO packages were released to PyPI"
277- Write-Host ""
278- Write-Host "What was tested:"
279- Write-Host "✓ Artifact download from build pipeline"
280- Write-Host "✓ Wheel integrity verification"
281- if ("${{ parameters.publishSymbols }}" -eq "True") {
282- Write-Host "✓ Symbol publishing to SqlClientDrivers org"
283- }
284- Write-Host "✓ ESRP release workflow (Maven ContentType)"
285- Write-Host ""
286- Write-Host "Next steps:"
287- Write-Host "1. Verify dummy release in ESRP portal"
288- Write-Host "2. Check ESRP approval workflow completion"
289- Write-Host "3. Verify symbols in SqlClientDrivers org (if published)"
290- Write-Host "4. For PRODUCTION release, use official-release-pipeline.yml"
291- Write-Host "====================================="
292-
226+ # Dry run summary (when release is disabled)
293227 - ${{ if eq(parameters.performDummyRelease, false) }} :
294228 - task : PowerShell@2
295229 displayName : ' [TEST] Dry Run - Dummy Release Skipped'
@@ -318,3 +252,88 @@ extends:
318252 Write-Host "1. Use official-release-pipeline.yml instead"
319253 Write-Host "2. Official pipeline uses PyPI ContentType"
320254 Write-Host "====================================="
255+
256+ # Job 2: ESRP Release (releaseJob on 1ES hosted pool — required by OneBranch policy)
257+ # EsrpRelease is not allowed in custom pools; must use templateContext.type: releaseJob
258+ - ${{ if eq(parameters.performDummyRelease, true) }} :
259+ - job : DummyRelease
260+ displayName : ' [TEST] ESRP Dummy Release (Maven - NOT PyPI)'
261+ dependsOn : PrepAndValidate
262+
263+ templateContext :
264+ type : releaseJob
265+
266+ pool :
267+ type : windows
268+
269+ variables :
270+ ob_outputDirectory : ' $(Build.ArtifactStagingDirectory)'
271+ WindowsContainerImage : ' onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'
272+
273+ steps :
274+ # Download artifacts directly from build pipeline
275+ - task : DownloadPipelineArtifact@2
276+ displayName : ' [TEST] Download Artifacts from Build Pipeline'
277+ inputs :
278+ buildType : ' specific'
279+ project : ' $(System.TeamProject)'
280+ definition : 2199
281+ buildVersionToDownload : ' specific'
282+ buildId : $(resources.pipeline.buildPipeline.runID)
283+ artifactName : ' drop_Consolidate_ConsolidateArtifacts'
284+ targetPath : ' $(Build.SourcesDirectory)/artifacts'
285+
286+ # ⚠️ IMPORTANT: Uses Maven ContentType for testing - NOT PyPI!
287+ - task : EsrpRelease@9
288+ displayName : ' [TEST] ESRP Dummy Release (Maven - NOT PyPI)'
289+ inputs :
290+ connectedservicename : ' $(ESRPConnectedServiceName)'
291+ usemanagedidentity : true
292+ keyvaultname : ' $(AuthAKVName)'
293+ signcertname : ' $(AuthSignCertName)'
294+ clientid : ' $(EsrpClientId)'
295+ Intent : ' PackageDistribution'
296+ # ⚠️ CRITICAL: ContentType is Maven (NOT PyPI) for safe testing
297+ # This ensures no accidental production releases to PyPI
298+ ContentType : ' Maven'
299+ ContentSource : ' Folder'
300+ FolderLocation : ' $(Build.SourcesDirectory)/artifacts/dist'
301+ WaitForReleaseCompletion : true
302+ Owners : ' $(owner)'
303+ Approvers : ' $(approver)'
304+ ServiceEndpointUrl : ' https://api.esrp.microsoft.com'
305+ MainPublisher : ' ESRPRELPACMAN'
306+ DomainTenantId : ' $(DomainTenantId)'
307+
308+ - task : PowerShell@2
309+ displayName : ' [TEST] Dummy Release Summary'
310+ inputs :
311+ targetType : ' inline'
312+ script : |
313+ Write-Host "===================================="
314+ Write-Host "⚠️ TEST PIPELINE - DUMMY RELEASE COMPLETED ⚠️"
315+ Write-Host "===================================="
316+ Write-Host "Package: mssql-python (TEST)"
317+ Write-Host "ContentType: Maven (NOT PyPI - Safe for Testing)"
318+ Write-Host "Owners: $(owner)"
319+ Write-Host "Approvers: $(approver)"
320+ Write-Host "Symbols Published: ${{ parameters.publishSymbols }}"
321+ Write-Host "====================================="
322+ Write-Host ""
323+ Write-Host "⚠️ IMPORTANT: This was a DUMMY release using Maven ContentType"
324+ Write-Host " NO packages were released to PyPI"
325+ Write-Host ""
326+ Write-Host "What was tested:"
327+ Write-Host "✓ Artifact download from build pipeline"
328+ Write-Host "✓ Wheel integrity verification"
329+ if ("${{ parameters.publishSymbols }}" -eq "True") {
330+ Write-Host "✓ Symbol publishing to SqlClientDrivers org"
331+ }
332+ Write-Host "✓ ESRP release workflow (Maven ContentType)"
333+ Write-Host ""
334+ Write-Host "Next steps:"
335+ Write-Host "1. Verify dummy release in ESRP portal"
336+ Write-Host "2. Check ESRP approval workflow completion"
337+ Write-Host "3. Verify symbols in SqlClientDrivers org (if published)"
338+ Write-Host "4. For PRODUCTION release, use official-release-pipeline.yml"
339+ Write-Host "====================================="
0 commit comments