Skip to content

Conversation

Comment on lines 36 to 37
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
Copy link

Choose a reason for hiding this comment

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

You must use the MicroBuild 1ES templated

Copy link
Member Author

Choose a reason for hiding this comment

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

Somehow still getting the same error:

Encountered error(s) while parsing pipeline YAML:
/azure-pipelines.yml (Line: 42, Col: 7): Unexpected parameter 'mb'
/azure-pipelines.yml: Expected error count to be 0 when attempting to load a new file

But I even named everything exactly the same as here:

parameters:
mb:
Copy link

@emaf emaf Aug 22, 2025

Choose a reason for hiding this comment

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

mb must be set at job level. I don't think you even need it because you are using the sign-artifacts template, which is already setting this.

- repository: yaml-templates
type: git
name: DevDiv/Xamarin.yaml-templates
ref: refs/heads/main

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}:
Copy link

Choose a reason for hiding this comment

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

The recommendation is to use Build.Reason to choose between official and unofficial. I'm not sure how builds are configured on this pipeline, but only release branches should trigger CI builds and use the official template on the production pipeline.

Copy link
Member Author

Choose a reason for hiding this comment

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

This repo doesn't have release branches; it goes based on if a commit is tagged or not.

I think it was done this way, because any random branch could build a preview package. So, you might have this branch for shipping a preview AndroidX.Security package:

Does this just need to be re-thought and we prefix any of these special branches with release/? And we can stop tagging?

Copy link

@emaf emaf Aug 22, 2025

Choose a reason for hiding this comment

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

yes, I think so. Also 1ES will start blocking builds on production pipelines that don't come from a release branch. If you consider a release branch something else than release/, you must declare that in a config file (I can look for it if needed).

Fixes:

    ##[error]yaml-templates\sign-artifacts\steps\v2-SignFiles.proj(73,5): Error : Please update your SignList.xml to include the following unknown files which should be signed:
    D:\a\_work\_temp\artifact-signing\extracted\Xamarin.AndroidX.Compose.Runtime.Annotation.1.9.0\jar\runtime-annotation.jar;
    D:\a\_work\_temp\artifact-signing\extracted\Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm.1.9.0\jar\runtime-annotation-jvm.jar
This prevents flaky CI on test failures such as:

    Unexpected error: Download failed. Please download https://search.maven.org/remotecontent?filepath=com/facebook/android/facebook-android-sdk/4.17.0/facebook-android-sdk-4.17.0.aar to a file called C:\Users\cloudtest\AppData\Local\Temp\tmpaazgjb.tmp\unpacked\FacebookAndroid-4.17.0.aar.
    Stack trace
        at Xamarin.ContentPipeline.Tests.TestsBase.AssertNoMessagesOrWarnings(MSBuildTestLogger logger, String[] ignorePatterns) in C:\a\_work\1\s\util\Xamarin.Build.Download\source\Xamarin.Build.Download.Tests\Helpers\TestsBase.cs:line 71
        at NativeLibraryDownloaderTests.Test.TestUncompressedNamedDownload() in C:\a\_work\1\s\util\Xamarin.Build.Download\source\Xamarin.Build.Download.Tests\Test.cs:line 181
        at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
@jonathanpeppers
Copy link
Member Author

I believe test signing worked:

image

So, going to backport to a release branch and try it.

@jonathanpeppers jonathanpeppers marked this pull request as ready for review August 27, 2025 13:41
@jonathanpeppers jonathanpeppers merged commit c12c66a into main Aug 27, 2025
1 of 2 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/sign-artifacts-v4 branch August 27, 2025 13:42
jonathanpeppers added a commit that referenced this pull request Aug 27, 2025
Context: https://devdiv.visualstudio.com/DevDiv/_git/Xamarin.yaml-templates/commit/3aa7341d11ab4cc9d4bf63965806e35c015c5956?refName=refs%2Fheads%2Fmain&path=%2Fsign-artifacts%2Fsteps%2Fv4.yml&_a=contents
Context: https://devdiv.visualstudio.com/DevDiv/_git/ClientTools.Platform/commit/81a98cf67ae869635ebd082f37e2ddbf624e0267?refName=refs/heads/main&path=/build/automation/stages/sign.yml

* Moves to `sign-artifacts/jobs/v4.yml` template

* Set `$(TeamName)` to `.NET MAUI`.

* Update `SignList.xml` for new libraries:

Fixes:

    ##[error]yaml-templates\sign-artifacts\steps\v2-SignFiles.proj(73,5): Error : Please update your SignList.xml to include the following unknown files which should be signed:
    D:\a\_work\_temp\artifact-signing\extracted\Xamarin.AndroidX.Compose.Runtime.Annotation.1.9.0\jar\runtime-annotation.jar;
    D:\a\_work\_temp\artifact-signing\extracted\Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm.1.9.0\jar\runtime-annotation-jvm.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants