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] Migrate to the 1ES template #8747

Merged
merged 39 commits into from
Mar 4, 2024
Merged

[ci] Migrate to the 1ES template #8747

merged 39 commits into from
Mar 4, 2024

Conversation

pjcollins
Copy link
Member

@pjcollins pjcollins commented Feb 21, 2024

Context: https://aka.ms/1espt

The build pipeline has been updated to extend the 1ES pipeline template,
which will keep the pipeline up to date with the latest compliance and
security requirements. Compliance tasks and scans will run automatically
as part of artifact upload steps.

@pjcollins
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pjcollins pjcollins marked this pull request as ready for review March 1, 2024 21:28
@pjcollins pjcollins requested a review from jpobst March 1, 2024 21:29
@pjcollins
Copy link
Member Author

I think I've finally resolved all of the issues here and have fully working runs across all three of the affected pipelines - Xamarin.Android PR, Xamarin.Android (official), and Xamarin.Android Nightly. This should be ready for review (and merge assuming the latest PR build is green), but we can wait to land it until next week in case there is any unintended fallout.

@@ -28,7 +28,7 @@ steps:

- ${{ if eq(parameters.retryFailedTests, 'false') }}:
# If we aren't using auto-retry logic, then this is just a simple template call
- template: run-nunit-tests.yaml
- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know why this was required? I didn't have to do this in AndroidX to find templates.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure what caused it, but I hit a dozen or so trigger failures early on in the migration process due to incomplete template paths or that missing self declaration.

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.

So far everything here looks good to me. Do we need to test the "mega pipeline" for this? Or do we have to merge first?

Comment on lines +363 to +364
- script: echo "##vso[task.prependpath]C:\Windows\System32\WindowsPowerShell\v1.0\"
displayName: add powershell to path
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it is in my %PATH% by default already. Does one of the 1ES build agents not have this?

Copy link
Member Author

Choose a reason for hiding this comment

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

For some reason the MAUI integration test job was failing on the new pool until I added this:

Restored D:\a_work\1\s\maui\src\DotNet\DotNet.csproj (in 7.3 sec).
Downloading from "https://dot.net/v1/dotnet-install.ps1" to "D:\a_work\1\s\maui\bin\dotnet-install.ps1" (70,702 bytes).
'powershell' is not recognized as an internal or external command, operable program or batch file.

@pjcollins
Copy link
Member Author

So far everything here looks good to me. Do we need to test the "mega pipeline" for this? Or do we have to merge first?

I think it'll be best to merge first and we can sort out any issues with the megapipeline build separately.

@pjcollins pjcollins merged commit a1c5111 into main Mar 4, 2024
50 checks passed
@pjcollins pjcollins deleted the dev/pjc/1estemp branch March 4, 2024 18:22
grendello added a commit that referenced this pull request Mar 6, 2024
* main:
  [Mono.Android] Fix race condition in AndroidMessageHandler (#8753)
  [ci] Fix SDL Sources Analysis for PRs from forks (#8785)
  [ci] Add 1ESPT override to MSBuild test stages (#8784)
  [ci] Do not use @self annotation for templates (#8783)
  [ci] Migrate to the 1ES template (#8747)
  [Mono.Android] fix trimming warnings, part 2 (#8758)
  [Xamarin.Android.Build.Tasks] set `%(DefineConstantsOnly)` for older API levels (#8777)
  [tests] fix duplicate sources in `NuGet.config` (#8772)
  Bump to xamarin/monodroid@e13723e701 (#8771)
grendello added a commit that referenced this pull request Mar 7, 2024
* main:
  [Mono.Android] Fix race condition in AndroidMessageHandler (#8753)
  [ci] Fix SDL Sources Analysis for PRs from forks (#8785)
  [ci] Add 1ESPT override to MSBuild test stages (#8784)
  [ci] Do not use @self annotation for templates (#8783)
  [ci] Migrate to the 1ES template (#8747)
  [Mono.Android] fix trimming warnings, part 2 (#8758)
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 8, 2024
* main: (306 commits)
  [templates] Remove redundant "template" from display name. (dotnet#8773)
  Bump to xamarin/Java.Interop/main@a7e09b7 (dotnet#8793)
  [build] Include MIT license in most NuGet packages (dotnet#8787)
  Bump to dotnet/installer@893b762b6e 9.0.100-preview.3.24153.2 (dotnet#8782)
  [docs] update notes about `dotnet-trace` and `dotnet-gcdump` (dotnet#8713)
  [Mono.Android] Fix race condition in AndroidMessageHandler (dotnet#8753)
  [ci] Fix SDL Sources Analysis for PRs from forks (dotnet#8785)
  [ci] Add 1ESPT override to MSBuild test stages (dotnet#8784)
  [ci] Do not use @self annotation for templates (dotnet#8783)
  [ci] Migrate to the 1ES template (dotnet#8747)
  [Mono.Android] fix trimming warnings, part 2 (dotnet#8758)
  [Xamarin.Android.Build.Tasks] set `%(DefineConstantsOnly)` for older API levels (dotnet#8777)
  [tests] fix duplicate sources in `NuGet.config` (dotnet#8772)
  Bump to xamarin/monodroid@e13723e701 (dotnet#8771)
  Bump to xamarin/xamarin-android-tools/main@37d79c9 (dotnet#8752)
  Bump to dotnet/installer@d070660282 9.0.100-preview.3.24126.2 (dotnet#8763)
  Bump to xamarin/java.interop/main@14a9470 (dotnet#8766)
  $(AndroidPackVersionSuffix)=preview.3; net9 is 34.99.0.preview.3 (dotnet#8765)
  [Mono.Android] Do not dispose request content stream in AndroidMessageHandler (dotnet#8764)
  Bump com.android.tools:r8 from 8.2.42 to 8.2.47 (dotnet#8761)
  ...
grendello added a commit that referenced this pull request Mar 11, 2024
* main:
  [templates] Remove redundant "template" from display name. (#8773)
  Bump to xamarin/Java.Interop/main@a7e09b7 (#8793)
  [build] Include MIT license in most NuGet packages (#8787)
  Bump to dotnet/installer@893b762b6e 9.0.100-preview.3.24153.2 (#8782)
  [docs] update notes about `dotnet-trace` and `dotnet-gcdump` (#8713)
  [Mono.Android] Fix race condition in AndroidMessageHandler (#8753)
  [ci] Fix SDL Sources Analysis for PRs from forks (#8785)
  [ci] Add 1ESPT override to MSBuild test stages (#8784)
  [ci] Do not use @self annotation for templates (#8783)
  [ci] Migrate to the 1ES template (#8747)
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 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.

4 participants