Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Add nuget to msi conversion and VS insert stage #6030

Merged
merged 31 commits into from
Jul 20, 2021

Conversation

pjcollins
Copy link
Member

@pjcollins pjcollins commented Jun 17, 2021

Context: https://github.com/xamarin/yaml-templates/pull/117

A new CI job and stage have been added to facilitate the Visual Studio
installer insertion process.

The first job named "Convert NuGet to MSI" will convert signed packages
to .msi installers, and generate Visual Studio manifests for the .msi
installers. The .msi files are signed and converted back to .nupkg
files for the Windows command line install scenario. These packages are
uploaded as pipeline artifacts named vsdrop-signed, and
vs-msi-nugets.

The new vs-workload.props file contains version information and other
metadata used by the convert job to generate a Visual Studio manifest.

The ShortNames item in this file is used to avoid path length issues
that can arise due to the way VS caches some components when building.
The .msi conversion tooling uses this to replace strings in the VS
component file names and IDs generated for our workload packs. In
some cases the semver label generated for our packs can be long, so
we replace the full semver version with a more predictable four part
version (30.0.100.x).

The new "VS Insertion" stage starts with a manual validation task.
This task will pause execution and wait for someone to click a "Resume"
or "Reject" button that will appear on the pipeline UI. This task is
configured to be rejected after waiting for two days, but it can be
manually re-ran any time after being rejected to trigger a VS insertion
for an older build.

If the manual validation task is approved, a VS Drop will be created
containing all .NET 6 .msi files. This Drop URL can then be used to
update our component versions in Visual Studio. This last piece is
currently manual as we will initially be introducing new components,
however we should be able to automate VS PR creation in the future.

@pjcollins pjcollins changed the title [WIP] Convert NuGet to MSI and generate VS Drop [CI] Add nuget to msi conversion and VS insert stage Jul 18, 2021
This reverts commit cf6520d.

 Conflicts:
	src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json
@pjcollins pjcollins marked this pull request as ready for review July 18, 2021 20:50
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here look good, is there a full run somewhere we could look at?

Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be creating the arm64 .msi's? I don't think XA works on Windows arm64.

image

@pjcollins
Copy link
Member Author

Should we be creating the arm64 .msi's? I don't think XA works on Windows arm64.

VS doesn't support these either, and they aren't included in the vsdrop-signed artifact and .vsman manifest file. The new .nupkg artifact isn't being used anywhere yet, and any changes to provide an option to not generate the arm64 packs should probably land in arcade (and yaml-templates), and can be done in the future I think.

@jonpryor jonpryor merged commit 505b8e9 into main Jul 20, 2021
@jonpryor jonpryor deleted the pjc/nuget-convert-insert branch July 20, 2021 16:19
jonpryor pushed a commit that referenced this pull request Jul 20, 2021
Context: xamarin/yaml-templates#117

A new CI job and stage have been added to facilitate the
Visual Studio installer insertion process.

The first job named "Convert NuGet to MSI" will convert signed
packages to `.msi` installers, and generate Visual Studio manifests
for the `.msi` installers.  The `.msi` files are signed and converted
back to `.nupkg` files for the Windows command line install scenario.
These packages are uploaded as pipeline artifacts named
`vsdrop-signed`, and  `vs-msi-nugets`.

The new `vs-workload.props` file contains version information and other
metadata used by the convert job to generate a Visual Studio manifest.
The `@(ShortNames)` item group is used to avoid path length issues
that can arise due to the way VS caches some components when building.
The `.msi` conversion tooling uses this to replace strings in the VS
component file names and IDs generated for our workload packs.
In some cases the semver label generated for our packs can be long,
so we replace the full semver version with a more predictable four
part version (30.0.100.x).

The new "VS Insertion" stage starts with a [manual validation task][0].
This task will pause execution and wait for someone to click a "Resume"
or "Reject" button that will appear on the pipeline UI.  This task is
configured to be rejected after waiting for two days, but it can be
manually re-ran any time after being rejected to trigger a VS insertion
for an older build.

To access the Reume or Reject button, go to the Pipelines page for
the commit to be approved, e.g.:

 1. https://github.com/xamarin/xamarin-android/commits/main

 2. Click the ✅ or ❌ for the commit of interest.  This displays an
    "All checks have passed" or "Some checks were not successful"
    overlay.

 3. Click the **Details** link for **Xamarin.Android** within the
    overlay shown by (2).

 4. At the bottom of the "runs" page, click the
    **View more details on Azure Pipelines** link.

When the manual validation task is approved, a VS Drop will be
created containing all .NET 6 `.msi` files.  This Drop URL can then
be used to update our component versions in Visual Studio.  This last
piece is currently manual as we will initially be introducing new
components, however we should be able to automate VS PR creation in
the future.

[0]: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/manual-validation?view=azure-devops&tabs=yaml
thaystg added a commit to thaystg/xamarin-android that referenced this pull request Jul 23, 2021
…er_unhandled_exception

* origin/main:
  Bump to dotnet/installer@19943da 6.0.100-rc.1.21372.10 (dotnet#6110)
  [xaprepare] don't install microsoft-net-runtime-android workload (dotnet#6114)
  [Mono.Android] Use `mono_unhandled_exception` for NET6 (dotnet#6104)
  Bump to dotnet/installer@9c463710 6.0.100-rc.1.21369 (dotnet#6072)
  Bump to xamarin/xamarin-android-binutils/2.37-XA.1@77618674 v2.37 (dotnet#6096)
  [Mono.Android.Export] Fix DynamicDependency to JavaArray (dotnet#6105)
  [xaprepare] always delete ~/android-toolchain/dotnet (dotnet#6098)
  [CI] Add nuget to msi conversion and VS insert stage (dotnet#6030)
  [build] delete platform-31 folder on test jobs (dotnet#6103)
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants