Commit a4ab587
FEAT: Migrate Release (and dummy) Pipelines to use ReleaseJob (#511)
### Work Item / Issue Reference
<!--
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below
For external contributors: Insert Github Issue number below
Only one reference is required - either GitHub issue OR ADO Work Item.
-->
<!-- mssql-python maintainers: ADO Work Item -->
>
[AB#43946](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/43946)
<!-- External contributors: GitHub Issue -->
> GitHub Issue: #<ISSUE_NUMBER>
-------------------------------------------------------------------
### Summary
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->
This pull request restructures both the dummy and official release
pipelines to improve clarity, enforce OneBranch policy requirements, and
streamline artifact handling. The main changes include splitting the
pipelines into explicit preparation/validation and release jobs,
ensuring ESRP release steps run on the correct pool, updating artifact
paths, and enhancing dry run handling.
**Pipeline Restructuring and Policy Compliance:**
* Split the pipelines into two explicit jobs: `PrepAndValidate` (for
downloading, validating, and staging artifacts using a custom pool) and
a release job (`DummyRelease` or `PyPIRelease`) that runs on a 1ES
hosted pool as required by OneBranch policy. ESRP release steps are now
only in the release job, which depends on the preparation job.
(`OneBranchPipelines/dummy-release-pipeline.yml`,
`OneBranchPipelines/official-release-pipeline.yml`)
[[1]](diffhunk://#diff-f33e687de954b798773c221fa2242934d5ec593abda31b787cdb10d590c1cb76L93-R95)
[[2]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL96-R98)
[[3]](diffhunk://#diff-f33e687de954b798773c221fa2242934d5ec593abda31b787cdb10d590c1cb76L225-R286)
[[4]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL228-R278)
* ESRP release jobs now use `templateContext.type: releaseJob` and
ensure artifact download and publishing steps are run in the correct
environment, preventing accidental production releases from test
pipelines. (`OneBranchPipelines/dummy-release-pipeline.yml`,
`OneBranchPipelines/official-release-pipeline.yml`)
[[1]](diffhunk://#diff-f33e687de954b798773c221fa2242934d5ec593abda31b787cdb10d590c1cb76L225-R286)
[[2]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL228-R278)
**Artifact Path and Handling Updates:**
* Changed artifact and wheel file paths throughout the pipelines to use
the new consolidated artifact location
(`$(Build.SourcesDirectory)/artifacts/dist`) instead of the previous
`dist` folder. This affects validation, ESRP release, and summary steps.
(`OneBranchPipelines/dummy-release-pipeline.yml`,
`OneBranchPipelines/official-release-pipeline.yml`)
[[1]](diffhunk://#diff-f33e687de954b798773c221fa2242934d5ec593abda31b787cdb10d590c1cb76L250-L259)
[[2]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL196-R192)
[[3]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL250-L259)
* Removed unnecessary steps for copying wheels to a separate `dist`
folder, as the new artifact structure makes this redundant.
(`OneBranchPipelines/official-release-pipeline.yml`)
**Dry Run and Summary Improvements:**
* Enhanced dry run handling: when release parameters are disabled, a
clear summary is shown and release steps are skipped. This logic is now
more explicit and avoids accidental releases.
(`OneBranchPipelines/dummy-release-pipeline.yml`,
`OneBranchPipelines/official-release-pipeline.yml`)
[[1]](diffhunk://#diff-f33e687de954b798773c221fa2242934d5ec593abda31b787cdb10d590c1cb76L225-R286)
[[2]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL228-R278)
[[3]](diffhunk://#diff-f33e687de954b798773c221fa2242934d5ec593abda31b787cdb10d590c1cb76L292-L320)
[[4]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL281-L303)
**Step Renumbering and Minor Cleanups:**
* Updated step numbers and comments for clarity and consistency after
restructuring, and removed obsolete or duplicate summary steps.
(`OneBranchPipelines/dummy-release-pipeline.yml`,
`OneBranchPipelines/official-release-pipeline.yml`)
[[1]](diffhunk://#diff-f33e687de954b798773c221fa2242934d5ec593abda31b787cdb10d590c1cb76L119-R120)
[[2]](diffhunk://#diff-f33e687de954b798773c221fa2242934d5ec593abda31b787cdb10d590c1cb76L177-R178)
[[3]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL122-R123)
[[4]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL180-R176)
These changes make the pipelines more robust, easier to understand, and
compliant with internal release policies.
<!--
### PR Title Guide
> For feature requests
FEAT: (short-description)
> For non-feature requests like test case updates, config updates ,
dependency updates etc
CHORE: (short-description)
> For Fix requests
FIX: (short-description)
> For doc update requests
DOC: (short-description)
> For Formatting, indentation, or styling update
STYLE: (short-description)
> For Refactor, without any feature changes
REFACTOR: (short-description)
> For release related changes, without any feature changes
RELEASE: #<RELEASE_VERSION> (short-description)
### Contribution Guidelines
External contributors:
- Create a GitHub issue first:
https://github.com/microsoft/mssql-python/issues/new
- Link the GitHub issue in the "GitHub Issue" section above
- Follow the PR title format and provide a meaningful summary
mssql-python maintainers:
- Create an ADO Work Item following internal processes
- Link the ADO Work Item in the "ADO Work Item" section above
- Follow the PR title format and provide a meaningful summary
-->
Co-authored-by: Gaurav Sharma <sharmag@microsoft.com>1 parent 9688b10 commit a4ab587
File tree
2 files changed
+170
-136
lines changed- OneBranchPipelines
2 files changed
+170
-136
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 226 | + | |
293 | 227 | | |
294 | 228 | | |
295 | 229 | | |
| |||
318 | 252 | | |
319 | 253 | | |
320 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
0 commit comments