Skip to content

[ci] Add dnceng/internal pipeline#12101

Merged
jonathanpeppers merged 9 commits into
mainfrom
jonathanpeppers-azure-pipelines-internal
Jul 15, 2026
Merged

[ci] Add dnceng/internal pipeline#12101
jonathanpeppers merged 9 commits into
mainfrom
jonathanpeppers-azure-pipelines-internal

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Jul 14, 2026

Copy link
Copy Markdown
Member

Why

The dnceng/internal Azure DevOps project needs a pipeline definition for its dotnet-android repository mirror. The existing public pipeline cannot be used unchanged because internal builds use different Windows/Linux pools and hosted macOS images.

What changed

  • Add build-tools/automation/azure-pipelines-internal.yaml, based on the public pipeline and configured for dnceng/internal pools.
  • Use the hosted macOS-15-arm64 image so the Java.Interop NativeAOT JNI sample runs with matching arm64 Java/native binaries.
  • Isolate the Kotlin fixture's Gradle user home under each project's obj/ directory, preventing parallel test projects from racing over Gradle's daemon registry.
  • Run MavenCentralSuccess against the anonymously readable dotnet-public-maven mirror because internal agents cannot resolve repo1.maven.org directly.
  • Document that Azure Repos PR validation uses build-validation branch policies rather than YAML pr triggers. Pipeline 1644 is configured as a blocking validation for main, release/*, and feature/* in the internal mirror.

Validation

  • dnceng/internal build 3022342 — queued against commit a50944d68 after mirroring both auto-value-annotations:1.10.4 and its parent POM auto-value-parent:1.10.4.
  • Local fresh-cache resolver probe using the same CachedMavenRepository and ResolvedProject.FromArtifact flow as MavenDownload: resolved the JAR, child POM, and parent POM successfully from dotnet-public-maven.
  • Local Java.Interop.Tools.Maven-Tests: 106 passed, 0 failed.
  • dnceng/internal build 3022201 reached the mirror but exposed the uncached parent POM; this is now mirrored and anonymously readable.
  • dnceng/internal build 3022077 identified the original blocked DNS access to repo1.maven.org.
  • Earlier internal validation confirmed the Java.Interop Windows and macOS lanes pass with the Gradle isolation change.

  • Useful description of why the change is necessary.
  • Links to issues fixed: N/A; infrastructure enablement.
  • Unit tests: validated through the linked dnceng/internal pipeline runs and local Maven resolver tests.

jonathanpeppers and others added 7 commits July 14, 2026 08:56
Mirror of azure-pipelines-public.yaml retargeted to the dnceng internal
instance, using internal (non-open) 1ES pools and CI push triggers.
Signing is not enabled yet.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The AcesShared pool does not exist in dnceng/internal, which fails
pipeline validation. Switch the macOS build, MSBuild test, and
Java.Interop test jobs to the hosted "Azure Pipelines" pool with
$(HostedMacImage), matching the package-tests template and MAUI's
internal pipeline.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The internal pipeline overrode HostedMacImage to the x64 "macOS-15" image
while the public pipeline uses "macOS-15-arm64" (Apple Silicon). On the x64
image the default JDK is x64, but .NET NativeAOT builds an osx-arm64 native
library, so the Hello-NativeAOTFromJNI sample failed at runtime with:

  java.lang.UnsatisfiedLinkError: .../libHello-NativeAOTFromJNI.dylib:
  dlopen(...) (mach-o architecture mismatch)

This surfaced only after the kotlin-gradle Maven-mirror fix let the Mac
Java.Interop build progress past the earlier failure. Align HostedMacImage
with the public pipeline so the JDK and NativeAOT output share arm64.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6cdec623-94aa-4489-88b4-1356b68176fc
kotlin-gradle.targets is imported by both Xamarin.Android.Tools.Bytecode-Tests
and generator-Tests, which build in parallel during the solution build.
Gradle runs in no-daemon mode but still forks a single-use daemon to honour
the build JVM settings. When both invocations share the default ~/.gradle
user home they race over the same daemon registry and loopback ports,
which surfaces on slower CI agents as:

    Timeout waiting to connect to the Gradle daemon.

Give each importing project its own GRADLE_USER_HOME (keyed by project name,
in a stable location so the distribution and dependency caches stay warm)
so the two daemons are fully isolated and cannot contend.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6cdec623-94aa-4489-88b4-1356b68176fc
[System.Environment]::GetFolderPath('UserProfile') is not valid MSBuild
property-function syntax (MSB4186). Derive the per-project GRADLE_USER_HOME
base from $(USERPROFILE) on Windows and $(HOME) elsewhere instead.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6cdec623-94aa-4489-88b4-1356b68176fc
Simplify the per-project GRADLE_USER_HOME isolation by pointing it at each
project's obj/ directory instead of a stable \C:\Users\jopepper/.gradle-ji-<project>
folder. obj/ is already per-project (so the two parallel Gradle daemons stay
isolated) and self-cleaning, and this test project is small enough that
losing the warm Gradle/dependency cache on clean builds is negligible.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6cdec623-94aa-4489-88b4-1356b68176fc
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6cdec623-94aa-4489-88b4-1356b68176fc
Copilot AI review requested due to automatic review settings July 14, 2026 14:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an internal Azure DevOps pipeline definition for the dnceng/internal mirror of dotnet-android, and hardens Java.Interop Kotlin fixture builds against Gradle daemon registry races when test projects build in parallel.

Changes:

  • Add build-tools/automation/azure-pipelines-internal.yaml, mirroring the public pipeline but retargeted to internal pools and hosted macOS images.
  • Update the Java.Interop Kotlin/Gradle test fixture build to isolate GRADLE_USER_HOME per-project under obj/ to avoid parallel-build contention.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
external/Java.Interop/tests/Xamarin.Android.Tools.Bytecode-Tests/kotlin-gradle.targets Sets a per-project GRADLE_USER_HOME so parallel test projects don’t race on Gradle’s daemon registry/ports.
build-tools/automation/azure-pipelines-internal.yaml Introduces the internal (CI push-triggered) pipeline definition with internal pool/image configuration.

Comment thread build-tools/automation/azure-pipelines-internal.yaml
Azure Repos Git does not honor YAML PR triggers. Document that pull request validation for main, release/*, and feature/* is configured through build-validation branch policies while retaining CI push triggers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6cdec623-94aa-4489-88b4-1356b68176fc
Internal CI agents cannot resolve repo1.maven.org directly. Exercise MavenDownload against the anonymously readable dotnet-public-maven mirror instead, while retaining artifact and manifest validation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6cdec623-94aa-4489-88b4-1356b68176fc
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jul 15, 2026
@jonathanpeppers jonathanpeppers merged commit fb6875e into main Jul 15, 2026
44 checks passed
@jonathanpeppers jonathanpeppers deleted the jonathanpeppers-azure-pipelines-internal branch July 15, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants