Skip to content

Commit

Permalink
enable experimentally inserting to release branches from UI (#11205)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanProvaznik authored Jan 3, 2025
1 parent 5357f31 commit 96450a9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
23 changes: 20 additions & 3 deletions azure-pipelines/vs-insertion-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ resources:
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

parameters:
- name: TargetBranch
type: string
default: main
displayName: 'Insertion Target Branch (select for manual insertion)'
values:
- main
- rel/d17.14
- rel/d17.13
- rel/d17.12
- rel/d17.11
- rel/d17.10
- rel/d17.8
- rel/d17.6
- rel/d17.3
- rel/d17.0

variables:
- name: TeamName
value: msbuild
Expand All @@ -29,7 +46,7 @@ variables:
- name: ArtifactPackagesPath
value: $(Build.ArtifactStagingDirectory)/PackageArtifacts

- name: MSBuildPackagePattern
- name: MSBuildPackagePattern
value: '$(ArtifactPackagesPath)/Microsoft.Build.*.nupkg'
- name: StringToolsPackagePattern
value: '$(ArtifactPackagesPath)/Microsoft.NET.StringTools*.nupkg'
Expand Down Expand Up @@ -118,12 +135,12 @@ extends:
LinkWorkItemsToPR: true
TeamName: $(TeamName)
TeamEmail: $(TeamEmail)
TargetBranch: main
TargetBranch: ${{ parameters.TargetBranch }}
InsertionPayloadName: $(InsertPayloadName)
PackagePropsValues: VS.ExternalAPIs.MSBuild=$(MSBuild_ExtApisPackageVersion);Microsoft.Build=$(MicrosoftNETStringToolsPackageVersion);Microsoft.Build.Framework=$(MicrosoftNETStringToolsPackageVersion);Microsoft.Build.Tasks.Core=$(MicrosoftNETStringToolsPackageVersion);Microsoft.Build.Utilities.Core=$(MicrosoftNETStringToolsPackageVersion);Microsoft.NET.StringTools=$(MicrosoftNETStringToolsPackageVersion)
InsertionDescription: $(InsertDescription)
ComponentJsonValues: $(InsertJsonValues)
DefaultConfigValues: $(InsertConfigValues)
InsertionReviewers: MSBuild
CustomScriptExecutionCommand: $(InsertCustomScriptExecutionCommand)
InsertionBuildPolicy: Request Perf DDRITs
InsertionBuildPolicy: Request Perf DDRITs
13 changes: 7 additions & 6 deletions documentation/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## At release time
Before starting the process:
- [ ] If the release is being cut more than a few days before the VS-side snap, run insertions manually OR redirect MSBuild release branch
- [ ] If the release is being cut more than a few days before the VS-side snap, run insertions manually OR redirect MSBuild release branch
- [ ] Disable scheduled run of [MSBuild VS Insertion pipeline](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=24295) (our {{NEXT_VERSION}} builds don't have a place to go in VS yet) by: Edit -> ... -> Triggers -> add a schedule on a dead branch (this overrides the YAML defined once-per-day schedule for main). Manual pipeline run: select as input resource the to-be-inserted "MSBuild" pipeline run on branch `vs{{THIS_RELEASE_VERSION}}` and VS TargetBranch `main`.
OR
- [ ] If the release is being cut more than couple of weeks modify [YAML](https://github.com/dotnet/msbuild/tree/main/azure-pipelines/vs-insertion.yml) (and merge to affected MSBuild branches) of the [VS insertion pipeline](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=24295) so that it schedules insertions from MSBuild `vs{{THIS_RELEASE_VERSION}}` to VS `main`. Keep scheduled daily insertions to simplify your workflow and exclude `vs{{THIS_RELEASE_VERSION}}` from triggering insertion on each commit.
Expand All @@ -23,11 +23,12 @@ OR
e.g.: `git push upstream 2e6f2ff7ea311214255b6b2ca5cc0554fba1b345:refs/heads/vs17.10` \
_(This is for the case where we create the branch too early and want it to be based actually on a different commit. If you waited until a good point in time with `main` in a clean state, just branch off and you are done. The branch should point to a good, recent spot, so the final-branding PR goes in on top of the right set of commits.)_
- [ ] Update the branch merge flow in `.config/git-merge-flow-config.jsonc` file to have the currently-in-servicing branches.
- [ ] Create {{NEXT_VERSION}} branding PR (in main) including public API baseline package version change: {{URL_OF_NEXT_VERSION_BRANDING_PR}}.
- [ ] Create {{NEXT_VERSION}} branding PR (in main) including public API baseline package version change: {{URL_OF_NEXT_VERSION_BRANDING_PR}}.
- In the file `eng/Versions.props` Update the `VersionPrefix` to `{{NEXT_VERSION}}` and `PackageValidationBaselineVersion` set to a latest internally available {{THIS_RELEASE_VERSION}} preview version in the [internal dnceng dotnet-tools feed](https://dev.azure.com/dnceng/internal/_artifacts/feed/dotnet-tools-internal). It might be needed to update `CompatibilitySuppressions.xml` files. See [this documentation](https://learn.microsoft.com/en-us/dotnet/fundamentals/apicompat/overview) for more details. You can update `CompatibilitySuppressions.xml` files by running
`dotnet pack MSBuild.Dev.slnf /p:ApiCompatGenerateSuppressionFile=true`.
`dotnet pack MSBuild.Dev.slnf /p:ApiCompatGenerateSuppressionFile=true`.
- [ ] When VS main snaps to {{THIS_RELEASE_VERSION}} and updates its version to {{NEXT_VERSION}}, modify the [MSBuild VS Insertion pipeline](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=24295) YAML so that it flows from MSBuild main to VS main.
- [ ] Update AutoTargetBranch selection in the [YAML](https://github.com/dotnet/msbuild/tree/main/azure-pipelines/vs-insertion.yml) (add to parameters and make new AutoTargetBranch rule by copying it from existing ones) of the [MSBuild VS Insertion pipeline](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=24295) to insert MSBuild `vs{{THIS_RELEASE_VERSION}}` to the corresponding VS branch `rel/d{{THIS_RELEASE_VERSION}}`.
- [ ] Update AutoTargetBranch selection in the [YAML](../azure-pipelines/vs-insertion.yml) (add to parameters and make new AutoTargetBranch rule by copying it from existing ones) of the [MSBuild VS Insertion pipeline](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=24295) to insert MSBuild `vs{{THIS_RELEASE_VERSION}}` to the corresponding VS branch `rel/d{{THIS_RELEASE_VERSION}}`.
- [ ] Add `rel/d{{THIS_RELEASE_VERSION}}` case to TargetBranch parameter in [Experimental insertion](../azure-pipelines/vs-insertion-experimental.yml)
- [ ] Set scheduled insertion for main and remove exclusion of `vs{{THIS_RELEASE_VERSION}}` triggering on each commit if added earlier.
- [ ] Merge {{NEXT_VERSION}} branding PR

Expand Down Expand Up @@ -59,7 +60,7 @@ if it is not, `darc add-default-channel --channel "VS {{THIS_RELEASE_VERSION}}"

### Adjust pipelines / releases
- [ ] Fix OptProf data flow for the new vs{{THIS_RELEASE_VERSION}} branch
- [ ] Run the [official build](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=9434) for vs{{THIS_RELEASE_VERSION}} without OptProf (set `SkipApplyOptimizationData` variable in 'Advanced options' section of the 'Run pipeline' menu to `true`) or alternatively with the latest Opt-Prof collected for the main branch (set `Optional OptProfDrop Override` to the drop path of the collected data, which could be found in the logs of the pipeline: Windows_NT -> Build -> search for `OptimizationData`).
- [ ] Run the [official build](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=9434) for vs{{THIS_RELEASE_VERSION}} without OptProf (set `SkipApplyOptimizationData` variable in 'Advanced options' section of the 'Run pipeline' menu to `true`) or alternatively with the latest Opt-Prof collected for the main branch (set `Optional OptProfDrop Override` to the drop path of the collected data, which could be found in the logs of the pipeline: Windows_NT -> Build -> search for `OptimizationData`).
- [ ] Check that the [OptProf data collection](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=17389) pipeline run is triggered for vs{{THIS_RELEASE_VERSION}}. If not, run manually ('Run pipeline' in upper right)
- [ ] Run the [official build](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=9434) for vs{{THIS_RELEASE_VERSION}} with no extra customization - OptProf should succeed now
- [ ] Restore [MSBuild VS Insertion pipeline](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=24295) to the default [YAML](https://github.com/dotnet/msbuild/tree/main/azure-pipelines/vs-insertion.yml) defined schedule, by removing all triggers from Edit -> ... -> Triggers.
Expand Down Expand Up @@ -94,7 +95,7 @@ Timing based on the [(Microsoft-internal) release schedule](https://dev.azure.co
- Microsoft.Build.Tasks.Core.{{THIS_RELEASE_EXACT_VERSION}}.nupkg
- Microsoft.NET.StringTools.{{THIS_RELEASE_EXACT_VERSION}}.nupkg
- Microsoft.Build.Templates.{{THIS_RELEASE_EXACT_VERSION}}.nupkg

**Note:** Microsoft.Build.Conversion.Core and Microsoft.Build.Engine are **not** part of the list. Microsoft.Build.Templates **is** part of the list. Those 3 packages are a difference to the historic publishing list.

- [ ] Publish docs: submit reference request at https://aka.ms/publishondocs
Expand Down

0 comments on commit 96450a9

Please sign in to comment.