From 82db1dd933217fbeb515397bdf047492ed3627d1 Mon Sep 17 00:00:00 2001 From: Shane Neuville <5375137+PureWeen@users.noreply.github.com> Date: Tue, 28 Apr 2026 05:24:04 -0500 Subject: [PATCH 1/5] [release/11.0.1xx-preview4] Use Azure Artifacts Maven feed for CFSClean network isolation compliance (#35170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Cherry-pick of #35089 from `release/10.0.1xx-sr6` to `release/11.0.1xx-preview4`. See #35089 for full details — routes Gradle/Maven dependency resolution through Azure Artifacts feed for CFSClean compliance. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Matt Mitchell (.NET) --- .github/copilot-instructions.md | 8 ++ .github/instructions/android.instructions.md | 8 ++ .../skills/azdo-build-investigator/SKILL.md | 20 +++ eng/ingest-maven-deps.sh | 132 ++++++++++++++++++ eng/init.gradle | 24 ++++ eng/pipelines/common/cache-gradle.yml | 11 ++ src/Core/AndroidNative/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 6 + src/Core/AndroidNative/settings.gradle | 35 ++++- 9 files changed, 243 insertions(+), 7 deletions(-) create mode 100755 eng/ingest-maven-deps.sh create mode 100644 eng/init.gradle diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 0e7463cd64e8..d24b3a8f7707 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -101,6 +101,14 @@ When referencing or triggering CI pipelines, use these current pipeline names: **⚠️ Old pipeline names** (e.g., `MAUI-UITests-public`, `MAUI-public`) are **outdated** and should NOT be used. Always use the names above. +### Gradle / Maven Dependency Failures (CFSClean) + +The official CI build uses CFSClean network isolation which blocks `repo.maven.apache.org`. All Gradle/Maven dependencies resolve through the `dotnet-public-maven` Azure Artifacts feed. + +**If CI fails with Gradle 401 errors** like `"No local versions of package"` or `"Please provide authentication to save package from upstream"`, it means a Maven package hasn't been ingested into the feed yet. **Fix:** run `./eng/ingest-maven-deps.sh` locally to pre-populate the feed. See `src/Core/AndroidNative/settings.gradle` for details. + +**Do NOT upgrade Gradle past 8.x** — the Android SDK's `net.android.init.gradle.kts` is incompatible with Gradle 9.x (`dotnet/android#10738`). + ### Code Formatting Always format code before committing: diff --git a/.github/instructions/android.instructions.md b/.github/instructions/android.instructions.md index ba013f3c27a0..93d94cd3a19f 100644 --- a/.github/instructions/android.instructions.md +++ b/.github/instructions/android.instructions.md @@ -4,6 +4,9 @@ applyTo: - "**/Android/**/*.cs" - "**/Platforms/Android/**/*.cs" - "**/Platform/Android/**/*.cs" + - "**/AndroidNative/**" + - "eng/init.gradle" + - "eng/ingest-maven-deps.sh" --- # Android Platform Development Guidelines @@ -123,3 +126,8 @@ protected override void DisconnectHandler(RecyclerView platformView) | Listener not working | Check lifecycle (register/unregister) | | Memory leak | Ensure Dispose() called on Java.Lang.Object | | Threading error | Use `platformView.Post()` for UI thread | +| Gradle 401 / Maven dependency failure | Run `./eng/ingest-maven-deps.sh` — see `copilot-instructions.md` | + +## Gradle / Maven Dependency Failures + +CI uses CFSClean which blocks Maven Central. All deps go through the `dotnet-public-maven` Azure Artifacts feed. If a new package hasn't been ingested, CI fails with `XAGRDL0000` / 401. Run `./eng/ingest-maven-deps.sh` locally to fix. Do NOT upgrade Gradle past 8.x (`dotnet/android#10738`). diff --git a/.github/skills/azdo-build-investigator/SKILL.md b/.github/skills/azdo-build-investigator/SKILL.md index bd3ddc905332..0588abbabcc5 100644 --- a/.github/skills/azdo-build-investigator/SKILL.md +++ b/.github/skills/azdo-build-investigator/SKILL.md @@ -66,6 +66,26 @@ If available, use the `mcp-binlog-tool` MCP server to analyze downloaded `.binlo | `error CS####` | `maui-pr` | C# compiler error — check file/line | | `error XA####` | `maui-pr` | Android build error | | `XamlC` | `maui-pr` | XAML compiler — usually missing type or bad binding | +| `error XAGRDL0000` / `401` / `No local versions` | `maui-pr` or official build | Gradle/Maven feed issue — see below | | `XHarness timeout` | `maui-pr-devicetests` Helix logs | Test killed by infrastructure; may be transient | | `No test result files found` | `maui-pr-devicetests` Helix logs | Tests never ran or app crashed on launch | | UI test screenshot diff | `maui-pr-uitests` | Visual regression; check baseline images | + +### Gradle / Maven / CFSClean Failures + +**Error signatures:** +``` +error XAGRDL0000: Could not resolve com.android.tools.build:gradle:8.11.1 + > Received status code 401: Unauthorized - No local versions of package +``` +``` +error XAGRDL0000: Could not GET '...pkgs.dev.azure.com/.../maven/v1/...' + > Unauthorized - Please provide authentication to save package from upstream +``` + +**Fix:** Tell the user to run `./eng/ingest-maven-deps.sh` locally to pre-ingest packages into the feed. + +**Do NOT:** +- Remove CFSClean from `ci-official.yml` — security compliance requirement +- Upgrade Gradle past 8.x — `dotnet/android#10738` +- Add `mavenCentral()` or `google()` back — use the Azure Artifacts feed diff --git a/eng/ingest-maven-deps.sh b/eng/ingest-maven-deps.sh new file mode 100755 index 000000000000..ee5229c8d430 --- /dev/null +++ b/eng/ingest-maven-deps.sh @@ -0,0 +1,132 @@ +#!/bin/bash +# Ingest Maven/Gradle dependencies into the dotnet-public-maven Azure Artifacts feed. +# +# WHY THIS IS NEEDED: +# CI builds run under CFSClean network isolation which blocks direct access to +# Maven Central (repo.maven.apache.org). All Maven dependencies are resolved +# through the dotnet-public-maven Azure Artifacts feed instead. However, this +# feed requires an authenticated request the FIRST time a package is pulled +# from upstream Maven Central — after that, anyone can read it anonymously. +# +# The CI pipeline's credential provider plugin (com.microsoft.azure.artifacts. +# credprovider) skips authentication in Azure Pipelines (TF_BUILD=True), so +# new packages MUST be pre-ingested locally before CI can use them. +# +# WHEN TO RUN: +# After adding or updating any Maven/Gradle dependency in +# src/Core/AndroidNative/build.gradle or settings.gradle. +# +# HOW IT WORKS: +# 1. Acquires an auth token via the .NET Azure Artifacts credential provider +# 2. Pre-ingests platform-specific artifacts (e.g. aapt2) for all OS variants +# (macOS/Linux/Windows) since Gradle only resolves the local OS classifier +# 3. Runs the Gradle build with --refresh-dependencies to bypass local cache +# and force actual downloads through the feed (which triggers ingestion) +# 4. For packages that Gradle's credential provider can't reach (e.g. AGP's +# internal detachedConfiguration scopes), falls back to curl with Bearer +# token to force-ingest the specific package URLs +# +# COMMON PITFALL: +# Running ./gradlew build without --refresh-dependencies may appear to succeed +# but actually resolves from ~/.gradle/caches/ (local cache from prior builds +# that used mavenCentral() directly). This does NOT ingest into the feed. +# +# Prerequisites: +# - JDK 17+ +# - python3 (for JSON parsing) +# - .NET Azure Artifacts credential provider installed +# (https://github.com/microsoft/artifacts-credprovider#installation) +# +# Usage: +# ./eng/ingest-maven-deps.sh + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +ANDROID_DIR="$REPO_ROOT/src/Core/AndroidNative" +FEED_URL="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-maven/maven/v1" +CRED_PROVIDER="$HOME/.nuget/plugins/netcore/CredentialProvider.Microsoft/CredentialProvider.Microsoft.dll" + +echo "=== Maven Dependency Ingestion for dotnet-public-maven ===" +echo "" + +# Step 1: Get auth token +echo "Acquiring auth token..." +if [ ! -f "$CRED_PROVIDER" ]; then + echo "ERROR: Azure Artifacts credential provider not found at $CRED_PROVIDER" + echo "Install it from: https://github.com/microsoft/artifacts-credprovider#installation" + exit 1 +fi + +TOKEN=$(dotnet "$CRED_PROVIDER" -U "$FEED_URL" -F Json -N true -I true 2>/dev/null \ + | python3 -c "import json,sys; print(json.load(sys.stdin).get('Password',''))" 2>/dev/null) + +if [ -z "$TOKEN" ]; then + echo "ERROR: Failed to acquire auth token. Make sure you're signed in to Azure DevOps." + exit 1 +fi +echo "Token acquired." + +# Step 2: Ingest platform-specific artifacts for all OS variants +# Gradle only resolves the classifier for the current OS (e.g. aapt2-osx.jar on macOS). +# CI builds on Windows/Linux need their variants pre-ingested too. +echo "" +echo "Step 1/3: Ingesting cross-platform artifacts..." +AAPT2_VERSION="8.11.1-12782657" +for classifier in osx linux windows; do + for ext in jar pom; do + url="$FEED_URL/com/android/tools/build/aapt2/$AAPT2_VERSION/aapt2-$AAPT2_VERSION-$classifier.$ext" + code=$(curl -s -o /dev/null -w "%{http_code}" --oauth2-bearer "$TOKEN" "$url" 2>/dev/null) + echo " aapt2-$AAPT2_VERSION-$classifier.$ext: $code" + done +done + +# Step 3: Run Gradle build with refresh to ingest via credential provider +echo "" +echo "Step 2/3: Running Gradle build with --refresh-dependencies..." +cd "$ANDROID_DIR" +if ! ./gradlew build --no-daemon --refresh-dependencies \ + -Dazure.artifacts.credprovider.nonInteractive=true \ + -Dazure.artifacts.credprovider.isRetry=true 2>&1 | tail -20; then + echo "WARNING: Initial Gradle build failed (expected if packages need ingestion). Continuing..." +fi + +# Step 4: Loop — build, find missing packages, curl-ingest them +echo "" +echo "Step 3/3: Ingesting any remaining packages via REST API..." +for i in $(seq 1 30); do + result=$(./gradlew build --no-daemon \ + -Dazure.artifacts.credprovider.nonInteractive=true 2>&1 || true) + + if echo "$result" | grep -q "BUILD SUCCESSFUL"; then + echo "All dependencies ingested successfully! ✅" + exit 0 + fi + + # Extract failed URLs and curl them with auth + urls=$(echo "$result" | grep "Could not GET\|Could not HEAD" \ + | sed "s/.*'\(https:[^']*\)'.*/\1/" | sort -u | grep "pkgs.dev.azure.com" || true) + count=$(echo "$urls" | grep -c "https" 2>/dev/null || echo "0") + + if [ "$count" = "0" ]; then + # No feed URLs failing — might be a different error + echo "Build failed but not due to feed issues. Check build output." + echo "$result" | grep -i "error" | grep -v "warning" | head -5 + exit 1 + fi + + echo " Run $i: ingesting $count packages..." + echo "$urls" | while read url; do + [ -z "$url" ] && continue + code=$(curl -s -o /dev/null -w "%{http_code}" --oauth2-bearer "$TOKEN" "$url" 2>/dev/null) + if [ "$code" = "200" ]; then + echo " ✅ $(basename "$url")" + else + echo " ❌ ($code) $(basename "$url")" + fi + done +done + +echo "WARNING: Reached max iterations. Some packages may still need ingestion." +exit 1 diff --git a/eng/init.gradle b/eng/init.gradle new file mode 100644 index 000000000000..51da79abaf3a --- /dev/null +++ b/eng/init.gradle @@ -0,0 +1,24 @@ +// Redirect Maven Central, Google Maven, and the Gradle Plugin Portal +// to Azure Artifacts feed for CFSClean network isolation compliance. +// See: https://aka.ms/1es/netiso/CFS +allprojects { + repositories { + def azureFeed = findByName("dotnet-public-maven") ?: maven { + url "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-maven/maven/v1" + name "dotnet-public-maven" + } + + all { ArtifactRepository repo -> + if (repo != azureFeed && + repo instanceof MavenArtifactRepository && + (repo.url.toString().contains(".maven.org") || + repo.url.toString().contains("maven.apache.org") || + repo.url.toString().contains("maven.google.com") || + repo.url.toString().contains("dl.google.com") || + repo.url.toString().contains("plugins.gradle.org"))) { + project.logger.warn "Replacing repository ${repo.url} with Azure Artifacts feed ${azureFeed.url}." + remove repo + } + } + } +} diff --git a/eng/pipelines/common/cache-gradle.yml b/eng/pipelines/common/cache-gradle.yml index 6231982930d8..e132f80b798d 100644 --- a/eng/pipelines/common/cache-gradle.yml +++ b/eng/pipelines/common/cache-gradle.yml @@ -39,3 +39,14 @@ steps: "gradle" | "v1" | "$(Agent.OS)" | ${{ parameters.checkoutDirectory }}/src/Core/AndroidNative/gradle/wrapper/gradle-wrapper.properties "gradle" | "v1" | "$(Agent.OS)" path: $(GRADLE_USER_HOME) + +# Copy init.gradle AFTER cache restore so it is not overwritten by a stale cached copy +- script: | + cp "${{ parameters.checkoutDirectory }}/eng/init.gradle" "$(GRADLE_USER_HOME)/init.gradle" + displayName: install Gradle init script (Linux/macOS) + condition: ne(variables['Agent.OS'], 'Windows_NT') + +- pwsh: | + Copy-Item "${{ parameters.checkoutDirectory }}/eng/init.gradle" (Join-Path "$(GRADLE_USER_HOME)" "init.gradle") + displayName: install Gradle init script (Windows) + condition: eq(variables['Agent.OS'], 'Windows_NT') diff --git a/src/Core/AndroidNative/build.gradle b/src/Core/AndroidNative/build.gradle index 990c6ab9fa1d..34f01d5b3388 100644 --- a/src/Core/AndroidNative/build.gradle +++ b/src/Core/AndroidNative/build.gradle @@ -1,8 +1,10 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { - google() - mavenCentral() + maven { + url = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-maven/maven/v1' + name = 'dotnet-public-maven' + } } dependencies { classpath "com.android.tools.build:gradle:8.11.1" diff --git a/src/Core/AndroidNative/gradle/wrapper/gradle-wrapper.properties b/src/Core/AndroidNative/gradle/wrapper/gradle-wrapper.properties index 7c04d8f009ab..cb43544a09ff 100644 --- a/src/Core/AndroidNative/gradle/wrapper/gradle-wrapper.properties +++ b/src/Core/AndroidNative/gradle/wrapper/gradle-wrapper.properties @@ -1,3 +1,9 @@ +# DO NOT upgrade Gradle beyond 8.x without verifying that the Microsoft.Android.Sdk +# version used by this branch supports it. The Android SDK generates a +# net.android.init.gradle.kts script that has a Kotlin type mismatch (String? vs Any) +# incompatible with Gradle 9.x's stricter type checking. The fix is merged upstream +# (dotnet/android#10738) but must ship in the Android SDK version referenced by this +# branch before Gradle can be upgraded. distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip diff --git a/src/Core/AndroidNative/settings.gradle b/src/Core/AndroidNative/settings.gradle index 16b665fd5128..a2a829bf42d9 100644 --- a/src/Core/AndroidNative/settings.gradle +++ b/src/Core/AndroidNative/settings.gradle @@ -1,16 +1,41 @@ +// Project Maven dependencies are resolved through the dnceng Azure Artifacts +// feed (dotnet-public-maven) for CFSClean network isolation compliance. The feed +// proxies Maven Central, Google Maven, and Gradle Plugin Portal. The credential +// provider plugin is fetched from a separate Azure Artifacts feed (artifacts-public). +// +// IMPORTANT: New packages must be ingested into the feed before CI can use them. +// The CI credential provider plugin skips auth in Azure Pipelines, so packages +// that aren't already in the feed will fail with 401. After adding or updating +// dependencies, run: +// +// ./eng/ingest-maven-deps.sh +// +// See: https://aka.ms/1es/netiso/CFS + pluginManagement { repositories { - google() - mavenCentral() - gradlePluginPortal() + maven { + url = 'https://pkgs.dev.azure.com/artifacts-public/PublicTools/_packaging/AzureArtifacts/maven/v1' + name = 'AzureArtifacts' + } + maven { + url = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-maven/maven/v1' + name = 'dotnet-public-maven' + } } } +plugins { + id 'com.microsoft.azure.artifacts.credprovider' version '1.1.1' +} + dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_PROJECT) repositories { - google() - mavenCentral() + maven { + url = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-maven/maven/v1' + name = 'dotnet-public-maven' + } } } From 26c19713f4a5e9339ace623782bbbd2c4617cd7d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 09:29:38 -0500 Subject: [PATCH 2/5] [release/11.0.1xx-preview4] Update dependencies from dotnet/android, dotnet/dotnet (#35171) This pull request updates the following dependencies [marker]: <> (Begin:Coherency Updates) ## Coherency Updates The following updates ensure that dependencies with a *CoherentParentDependency* attribute were produced in a build used as input to the parent dependency's build. See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview) [DependencyUpdate]: <> (Begin) - **Coherency Updates**: - **Microsoft.NET.Sdk.Android.Manifest-10.0.100**: from 36.1.53 to 36.1.53 (parent: Microsoft.Android.Sdk.Windows) [DependencyUpdate]: <> (End) [marker]: <> (End:Coherency Updates) [marker]: <> (Begin:74f9a062-0c3c-4244-97f5-1bdef5ec5486) ## From https://github.com/dotnet/dotnet - **Subscription**: [74f9a062-0c3c-4244-97f5-1bdef5ec5486](https://maestro.dot.net/subscriptions?search=74f9a062-0c3c-4244-97f5-1bdef5ec5486) - **Build**: [20260424.22](https://dev.azure.com/dnceng/internal/_build/results?buildId=2959731) ([311857](https://maestro.dot.net/channel/9588/github:dotnet:dotnet/build/311857)) - **Date Produced**: April 25, 2026 6:28:19 AM UTC - **Commit**: [48bd87d899e187fe0e4e2b81a7b4a65a37845213](https://github.com/dotnet/dotnet/commit/48bd87d899e187fe0e4e2b81a7b4a65a37845213) - **Branch**: [release/11.0.1xx-preview4](https://github.com/dotnet/dotnet/tree/release/11.0.1xx-preview4) [DependencyUpdate]: <> (Begin) - **Dependency Updates**: - From [11.0.0-preview.3.26203.107 to 11.0.0-preview.4.26224.122][1] - Microsoft.AspNetCore.Authentication.Facebook - Microsoft.AspNetCore.Authentication.Google - Microsoft.AspNetCore.Authentication.MicrosoftAccount - Microsoft.AspNetCore.Authorization - Microsoft.AspNetCore.Components - Microsoft.AspNetCore.Components.Analyzers - Microsoft.AspNetCore.Components.Forms - Microsoft.AspNetCore.Components.Web - Microsoft.AspNetCore.Components.WebAssembly - Microsoft.AspNetCore.Components.WebAssembly.Server - Microsoft.AspNetCore.Components.WebView - Microsoft.AspNetCore.Metadata - Microsoft.Extensions.Configuration - Microsoft.Extensions.Configuration.Abstractions - Microsoft.Extensions.Configuration.Json - Microsoft.Extensions.DependencyInjection - Microsoft.Extensions.DependencyInjection.Abstractions - Microsoft.Extensions.FileProviders.Abstractions - Microsoft.Extensions.Hosting.Abstractions - Microsoft.Extensions.Logging - Microsoft.Extensions.Logging.Abstractions - Microsoft.Extensions.Logging.Console - Microsoft.Extensions.Logging.Debug - Microsoft.Extensions.Primitives - Microsoft.JSInterop - Microsoft.NETCore.App.Ref - From [11.0.0-beta.26203.107 to 11.0.0-beta.26224.122][1] - Microsoft.DotNet.Arcade.Sdk - Microsoft.DotNet.Build.Tasks.Feed - Microsoft.DotNet.Build.Tasks.Installers - Microsoft.DotNet.Build.Tasks.Workloads - Microsoft.DotNet.Helix.Sdk - Microsoft.DotNet.RemoteExecutor - Microsoft.DotNet.SharedFramework.Sdk - Microsoft.DotNet.XUnitExtensions - From [11.0.100-preview.3.26203.107 to 11.0.100-preview.4.26224.122][1] - Microsoft.NET.Sdk [1]: https://github.com/dotnet/dotnet/compare/ca90a9c694...48bd87d899 [DependencyUpdate]: <> (End) [marker]: <> (End:74f9a062-0c3c-4244-97f5-1bdef5ec5486) [marker]: <> (Begin:902715f9-ebb0-449f-aca4-494dbb50849c) ## From https://github.com/dotnet/android - **Subscription**: [902715f9-ebb0-449f-aca4-494dbb50849c](https://maestro.dot.net/subscriptions?search=902715f9-ebb0-449f-aca4-494dbb50849c) - **Build**: [11.0.0-preview.4.26229.1+azdo.13969894](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13969894) ([312445](https://maestro.dot.net/channel/9588/github:dotnet:android/build/312445)) - **Date Produced**: April 29, 2026 5:35:21 PM UTC - **Commit**: [e8fb4bc8f779fd0d27c5c0ed04637a5dd25c083b](https://github.com/dotnet/android/commit/e8fb4bc8f779fd0d27c5c0ed04637a5dd25c083b) - **Branch**: [release/11.0.1xx-preview4](https://github.com/dotnet/android/tree/release/11.0.1xx-preview4) [DependencyUpdate]: <> (Begin) - **Dependency Updates**: - From [36.99.0-preview.3.10 to 36.99.0-preview.4.137][4] - Microsoft.Android.Sdk.Windows [4]: https://github.com/dotnet/android/compare/00489087db...e8fb4bc8f7 [DependencyUpdate]: <> (End) [marker]: <> (End:902715f9-ebb0-449f-aca4-494dbb50849c) --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: GitHub Actions Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Rolf Bjarne Kvinge --- Directory.Build.props | 16 +- NuGet.config | 4 +- eng/Tools.props | 3 +- eng/Version.Details.xml | 178 +++++----- eng/Versions.props | 92 ++--- eng/build.sh | 1 + eng/common/core-templates/job/job.yml | 5 +- eng/common/core-templates/job/onelocbuild.yml | 4 +- .../job/publish-build-assets.yml | 16 +- eng/common/core-templates/job/renovate.yml | 2 +- eng/common/core-templates/jobs/jobs.yml | 5 + .../post-build/common-variables.yml | 2 - .../core-templates/post-build/post-build.yml | 146 ++++---- .../post-build/setup-maestro-vars.yml | 5 +- eng/common/core-templates/stages/renovate.yml | 2 +- .../steps/component-governance.yml | 16 - .../core-templates/steps/generate-sbom.yml | 60 +--- .../core-templates/steps/publish-logs.yml | 10 +- .../core-templates/steps/source-build.yml | 2 +- eng/common/darc-init.ps1 | 8 +- eng/common/darc-init.sh | 4 +- eng/common/generate-sbom-prep.ps1 | 29 -- eng/common/generate-sbom-prep.sh | 39 --- eng/common/post-build/redact-logs.ps1 | 4 +- .../post-build/sourcelink-validation.ps1 | 327 ------------------ eng/common/sdk-task.ps1 | 17 +- eng/common/sdk-task.sh | 2 +- eng/common/template-guidance.md | 2 - eng/common/templates-official/job/job.yml | 64 ++-- .../steps/component-governance.yml | 7 - .../steps/publish-pipeline-artifacts.yml | 4 +- .../variables/pool-providers.yml | 2 +- eng/common/templates/job/job.yml | 57 +-- .../templates/steps/component-governance.yml | 7 - .../templates/variables/pool-providers.yml | 2 +- eng/common/tools.ps1 | 200 ++++++----- eng/common/tools.sh | 108 ++++-- eng/pipelines/arcade/stage-build.yml | 10 +- eng/pipelines/arcade/stage-device-tests.yml | 26 +- eng/pipelines/arcade/stage-helix-tests.yml | 10 +- eng/pipelines/arcade/stage-pack.yml | 22 +- eng/pipelines/arcade/stage-unit-tests.yml | 8 +- eng/pipelines/common/variables.yml | 4 +- global.json | 6 +- src/DotNet/DotNet.csproj | 18 +- 45 files changed, 603 insertions(+), 953 deletions(-) delete mode 100644 eng/common/core-templates/steps/component-governance.yml delete mode 100644 eng/common/generate-sbom-prep.ps1 delete mode 100755 eng/common/generate-sbom-prep.sh delete mode 100644 eng/common/post-build/sourcelink-validation.ps1 delete mode 100644 eng/common/templates-official/steps/component-governance.yml delete mode 100644 eng/common/templates/steps/component-governance.yml diff --git a/Directory.Build.props b/Directory.Build.props index 2b50adbb1767..a23786b7acf6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -158,16 +158,16 @@ - 26.2 - 26.2 - 26.2 - 26.2 + 26.4 + 26.4 + 26.4 + 26.4 36.1 - 26.2 - 26.2 - 26.2 - 26.2 + 26.4 + 26.4 + 26.4 + 26.4 36.1 10.0.19041.0 10.0.20348.0 diff --git a/NuGet.config b/NuGet.config index b2010e69e716..f5155d43ea6c 100644 --- a/NuGet.config +++ b/NuGet.config @@ -6,11 +6,9 @@ - - - + diff --git a/eng/Tools.props b/eng/Tools.props index 1fe938ff2cc6..bffdcf4aae7b 100644 --- a/eng/Tools.props +++ b/eng/Tools.props @@ -1,7 +1,8 @@ - + - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/android - 00489087dbe2e91cfd1b4302530c0c528d32efbb + e8fb4bc8f779fd0d27c5c0ed04637a5dd25c083b https://github.com/dotnet/android - 1aedd2b6964f4b238f72b19526ff2913997c14b4 + e1d3646df9cb50b2a0924f5b67fa78f9750ae489 - + https://github.com/dotnet/macios - 2be35b76389335803cf44f4a3bc771312566fee0 + 16dad2059bd25ff2227e06de186abc31dd0dfe73 - + https://github.com/dotnet/macios - 2be35b76389335803cf44f4a3bc771312566fee0 + 16dad2059bd25ff2227e06de186abc31dd0dfe73 - + https://github.com/dotnet/macios - 2be35b76389335803cf44f4a3bc771312566fee0 + 16dad2059bd25ff2227e06de186abc31dd0dfe73 - + https://github.com/dotnet/macios - 2be35b76389335803cf44f4a3bc771312566fee0 + 16dad2059bd25ff2227e06de186abc31dd0dfe73 - + https://github.com/dotnet/macios - 57976277a6498b347ab10e9fe79daf6d96d72aba + f1daf411a54b3c65b85ac245d0f24ea2ef315173 - + https://github.com/dotnet/macios - 57976277a6498b347ab10e9fe79daf6d96d72aba + f1daf411a54b3c65b85ac245d0f24ea2ef315173 - + https://github.com/dotnet/macios - 57976277a6498b347ab10e9fe79daf6d96d72aba + f1daf411a54b3c65b85ac245d0f24ea2ef315173 - + https://github.com/dotnet/macios - 57976277a6498b347ab10e9fe79daf6d96d72aba + f1daf411a54b3c65b85ac245d0f24ea2ef315173 https://dev.azure.com/microsoft/ProjectReunion/_git/ProjectReunionInternal - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 https://github.com/dotnet/templating 3f4da9ced34942d83054e647f3b1d9d7dde281e8 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 https://github.com/dotnet/xharness @@ -175,37 +175,37 @@ - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/dotnet - ca90a9c694e4f149f919285cc0d20454520f037c + 48bd87d899e187fe0e4e2b81a7b4a65a37845213 diff --git a/eng/Versions.props b/eng/Versions.props index 238ca611f2bf..f3b4da293e55 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -31,11 +31,11 @@ 10.0.20 - 11.0.100-preview.3.26203.107 + 11.0.100-preview.4.26224.122 $(MicrosoftNETSdkPackageVersion) 11.0.100-preview.3.26203.107 - 11.0.0-preview.3.26203.107 + 11.0.0-preview.4.26224.122 $(MicrosoftNETCoreAppRefPackageVersion) $(MicrosoftNETCoreAppRefPackageVersion) $(MicrosoftNETCoreAppRefPackageVersion) @@ -43,18 +43,18 @@ 1.0.0-prerelease.26153.1 $(MicrosoftNETCoreAppRefPackageVersion) - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 10.3.0 10.3.0 11.0.0-preview.2.26103.111 @@ -64,19 +64,19 @@ 1.0.0-rc2 1.0.0-preview.260225.1 - 36.99.0-preview.3.10 + 36.99.0-preview.4.137 36.1.53 $(MicrosoftNetSdkAndroidManifest100100PackageVersion) - 26.2.11588-net11-p3 - 26.2.11588-net11-p3 - 26.2.11588-net11-p3 - 26.2.11588-net11-p3 + 26.4.11511-net11-p4 + 26.4.11511-net11-p4 + 26.4.11511-net11-p4 + 26.4.11511-net11-p4 - 26.2.10223 - 26.2.10223 - 26.2.10223 - 26.2.10223 + 26.4.10255 + 26.4.10255 + 26.4.10255 + 26.4.10255 8.0.148 @@ -85,19 +85,19 @@ 1.3.2 1.0.3179.45 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 - 11.0.0-preview.3.26203.107 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26224.122 10.0.2 $(MicrosoftAspNetCorePackageVersion) @@ -147,13 +147,13 @@ 0.9.0 4.2.3 9.0.0 - 11.0.0-beta.26203.107 - 11.0.0-beta.26203.107 - 11.0.0-beta.26203.107 - 11.0.0-beta.26203.107 + 11.0.0-beta.26224.122 + 11.0.0-beta.26224.122 + 11.0.0-beta.26224.122 + 11.0.0-beta.26224.122 1.1.87-gba258badda - 11.0.0-beta.26203.107 - 11.0.0-beta.26203.107 + 11.0.0-beta.26224.122 + 11.0.0-beta.26224.122 17.6.0 @@ -225,9 +225,9 @@ $(DotNetVersionBand) $(DotNetVersionBand) 9.0.100 - $(MicrosoftMacCatalystSdknet110_262PackageVersion) - $(MicrosoftmacOSSdknet110_262PackageVersion) - $(MicrosoftiOSSdknet110_262PackageVersion) - $(MicrosofttvOSSdknet110_262PackageVersion) + $(MicrosoftMacCatalystSdknet110_264PackageVersion) + $(MicrosoftmacOSSdknet110_264PackageVersion) + $(MicrosoftiOSSdknet110_264PackageVersion) + $(MicrosofttvOSSdknet110_264PackageVersion) diff --git a/eng/build.sh b/eng/build.sh index e1883c70e83c..4c64c91731f9 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -158,6 +158,7 @@ if [[ "${TreatWarningsAsErrors:-}" == "false" ]]; then fi arguments="$arguments $extraargs" + "$scriptroot/common/build.sh" $arguments diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index 748c4f07a64d..66c7988f222a 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -26,12 +26,12 @@ parameters: enablePublishBuildArtifacts: false enablePublishBuildAssets: false enablePublishTestResults: false + enablePublishing: false enableBuildRetry: false mergeTestResults: false testRunTitle: '' testResultsFormat: '' name: '' - componentGovernanceSteps: [] preSteps: [] artifactPublishSteps: [] runAsPublic: false @@ -152,9 +152,6 @@ jobs: - ${{ each step in parameters.steps }}: - ${{ step }} - - ${{ each step in parameters.componentGovernanceSteps }}: - - ${{ step }} - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - template: /eng/common/core-templates/steps/cleanup-microbuild.yml parameters: diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index c5788829a872..eefed3b667a4 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -52,13 +52,13 @@ jobs: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: AzurePipelines-EO - image: 1ESPT-Windows2022 + image: 1ESPT-Windows2025 demands: Cmd os: windows # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: name: $(DncEngInternalBuildPool) - image: 1es-windows-2022 + image: windows.vs2026.amd64 os: windows steps: diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index c9ee8ffd8f1d..700f77114658 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -74,13 +74,13 @@ jobs: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: AzurePipelines-EO - image: 1ESPT-Windows2022 + image: 1ESPT-Windows2025 demands: Cmd os: windows # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: name: NetCore1ESPool-Publishing-Internal - image: windows.vs2022.amd64 + image: windows.vs2026.amd64 os: windows steps: - ${{ if eq(parameters.is1ESPipeline, '') }}: @@ -172,17 +172,18 @@ jobs: targetPath: '$(Build.ArtifactStagingDirectory)/MergedManifest.xml' artifactName: AssetManifests displayName: 'Publish Merged Manifest' - retryCountOnTaskFailure: 10 # for any logs being locked - sbomEnabled: false # we don't need SBOM for logs + retryCountOnTaskFailure: 10 # for any files being locked + isProduction: false # just metadata for publishing - - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} args: displayName: Publish ReleaseConfigs Artifact - pathToPublish: '$(Build.StagingDirectory)/ReleaseConfigs' - publishLocation: Container + targetPath: '$(Build.StagingDirectory)/ReleaseConfigs' artifactName: ReleaseConfigs + retryCountOnTaskFailure: 10 # for any files being locked + isProduction: false # just metadata for publishing - ${{ if or(eq(parameters.publishAssetsImmediately, 'true'), eq(parameters.isAssetlessBuild, 'true')) }}: - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml @@ -218,4 +219,5 @@ jobs: - template: /eng/common/core-templates/steps/publish-logs.yml parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} + StageLabel: 'BuildAssetRegistry' JobLabel: 'Publish_Artifacts_Logs' diff --git a/eng/common/core-templates/job/renovate.yml b/eng/common/core-templates/job/renovate.yml index ab233539b5dc..ff86c80b4689 100644 --- a/eng/common/core-templates/job/renovate.yml +++ b/eng/common/core-templates/job/renovate.yml @@ -135,7 +135,7 @@ jobs: condition: succeededOrFailed() targetPath: $(Build.ArtifactStagingDirectory) artifactName: $(Agent.JobName)_Logs_Attempt$(System.JobAttempt) - sbomEnabled: false + isProduction: false # logs are non-production artifacts steps: - checkout: self diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml index 01ada7476651..cc8cce452786 100644 --- a/eng/common/core-templates/jobs/jobs.yml +++ b/eng/common/core-templates/jobs/jobs.yml @@ -43,6 +43,10 @@ parameters: artifacts: {} is1ESPipeline: '' + + # Publishing version w/default. + publishingVersion: 3 + repositoryAlias: self officialBuildId: '' @@ -102,6 +106,7 @@ jobs: parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} continueOnError: ${{ parameters.continueOnError }} + publishingVersion: ${{ parameters.publishingVersion }} dependsOn: - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}: - ${{ each job in parameters.publishBuildAssetsDependsOn }}: diff --git a/eng/common/core-templates/post-build/common-variables.yml b/eng/common/core-templates/post-build/common-variables.yml index d5627a994ae5..db298ae16bae 100644 --- a/eng/common/core-templates/post-build/common-variables.yml +++ b/eng/common/core-templates/post-build/common-variables.yml @@ -11,8 +11,6 @@ variables: - name: MaestroApiVersion value: "2020-02-20" - - name: SourceLinkCLIVersion - value: 3.0.0 - name: SymbolToolVersion value: 1.0.1 - name: BinlogToolVersion diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index c5ece1850063..8aa86e304919 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -9,6 +9,7 @@ parameters: default: 3 values: - 3 + - 4 - name: BARBuildId displayName: BAR Build Id @@ -110,7 +111,7 @@ stages: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: AzurePipelines-EO - image: 1ESPT-Windows2022 + image: 1ESPT-Windows2025 demands: Cmd os: windows # If it's not devdiv, it's dnceng @@ -130,16 +131,30 @@ stages: PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} is1ESPipeline: ${{ parameters.is1ESPipeline }} - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts - checkDownloadedFiles: true + - ${{ if ne(parameters.publishingInfraVersion, 4) }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts + checkDownloadedFiles: true + - ${{ if eq(parameters.publishingInfraVersion, 4) }}: + - task: DownloadPipelineArtifact@2 + displayName: Download Pipeline Artifacts (V4) + inputs: + itemPattern: '*/packages/**/*.nupkg' + targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' + - task: CopyFiles@2 + displayName: Flatten packages to PackageArtifacts + inputs: + SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' + Contents: '**/*.nupkg' + TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts' + flattenFolders: true - task: PowerShell@2 displayName: Validate @@ -154,14 +169,14 @@ stages: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: AzurePipelines-EO - image: 1ESPT-Windows2022 + image: 1ESPT-Windows2025 demands: Cmd os: windows # If it's not devdiv, it's dnceng ${{ else }}: ${{ if eq(parameters.is1ESPipeline, true) }}: name: $(DncEngInternalBuildPool) - image: 1es-windows-2022 + image: windows.vs2026.amd64 os: windows ${{ else }}: name: $(DncEngInternalBuildPool) @@ -173,16 +188,30 @@ stages: PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} is1ESPipeline: ${{ parameters.is1ESPipeline }} - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts - checkDownloadedFiles: true + - ${{ if ne(parameters.publishingInfraVersion, 4) }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts + checkDownloadedFiles: true + - ${{ if eq(parameters.publishingInfraVersion, 4) }}: + - task: DownloadPipelineArtifact@2 + displayName: Download Pipeline Artifacts (V4) + inputs: + itemPattern: '*/packages/**/*.nupkg' + targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' + - task: CopyFiles@2 + displayName: Flatten packages to PackageArtifacts + inputs: + SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' + Contents: '**/*.nupkg' + TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts' + flattenFolders: true # This is necessary whenever we want to publish/restore to an AzDO private feed # Since sdk-task.ps1 tries to restore packages we need to do this authentication here @@ -196,7 +225,7 @@ stages: displayName: Validate inputs: filePath: eng\common\sdk-task.ps1 - arguments: -task SigningValidation -restore + arguments: -task SigningValidation -restore -msbuildEngine dotnet /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' ${{ parameters.signingValidationAdditionalParameters }} @@ -208,53 +237,20 @@ stages: JobLabel: 'Signing' BinlogToolVersion: $(BinlogToolVersion) - - job: - displayName: SourceLink Validation - condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true') - pool: - # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - name: AzurePipelines-EO - image: 1ESPT-Windows2022 - demands: Cmd - os: windows - # If it's not devdiv, it's dnceng - ${{ else }}: - ${{ if eq(parameters.is1ESPipeline, true) }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2022 - os: windows - ${{ else }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2026.amd64 - steps: - - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - is1ESPipeline: ${{ parameters.is1ESPipeline }} - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: BlobArtifacts - checkDownloadedFiles: true - - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/sourcelink-validation.ps1 - arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ - -ExtractPath $(Agent.BuildDirectory)/Extract/ - -GHRepoName $(Build.Repository.Name) - -GHCommit $(Build.SourceVersion) - -SourcelinkCliVersion $(SourceLinkCLIVersion) - continueOnError: true + # SourceLink validation has been removed — the underlying CLI tool + # (targeting netcoreapp2.1) has not functioned for years. + # The enableSourceLinkValidation parameter is kept but ignored so + # existing pipelines that pass it are not broken. + # See https://github.com/dotnet/arcade/issues/16647 + - ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}: + - job: + displayName: 'SourceLink Validation Removed - please remove enableSourceLinkValidation from your pipeline' + pool: server + steps: + - task: Delay@1 + displayName: 'Warning: SourceLink validation removed (see https://github.com/dotnet/arcade/issues/16647)' + inputs: + delayForMinutes: '0' - ${{ if ne(parameters.publishAssetsImmediately, 'true') }}: - stage: publish_using_darc @@ -276,18 +272,18 @@ stages: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: AzurePipelines-EO - image: 1ESPT-Windows2022 + image: 1ESPT-Windows2025 demands: Cmd os: windows # If it's not devdiv, it's dnceng ${{ else }}: ${{ if eq(parameters.is1ESPipeline, true) }}: name: NetCore1ESPool-Publishing-Internal - image: windows.vs2022.amd64 + image: windows.vs2026.amd64 os: windows ${{ else }}: name: NetCore1ESPool-Publishing-Internal - demands: ImageOverride -equals windows.vs2022.amd64 + demands: ImageOverride -equals windows.vs2026.amd64 steps: - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml parameters: @@ -317,7 +313,7 @@ stages: scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: > -BuildId $(BARBuildId) - -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} + -PublishingInfraVersion 3 -AzdoToken '$(System.AccessToken)' -WaitPublishingFinish true -RequireDefaultChannels ${{ parameters.requireDefaultChannels }} diff --git a/eng/common/core-templates/post-build/setup-maestro-vars.yml b/eng/common/core-templates/post-build/setup-maestro-vars.yml index a7abd58c4bb6..6dfa99ec5e37 100644 --- a/eng/common/core-templates/post-build/setup-maestro-vars.yml +++ b/eng/common/core-templates/post-build/setup-maestro-vars.yml @@ -8,12 +8,11 @@ steps: - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error - ${{ if eq(coalesce(parameters.PromoteToChannelIds, 0), 0) }}: - - task: DownloadBuildArtifacts@0 + - task: DownloadPipelineArtifact@2 displayName: Download Release Configs inputs: - buildType: current artifactName: ReleaseConfigs - checkDownloadedFiles: true + targetPath: '$(Build.StagingDirectory)/ReleaseConfigs' - task: AzureCLI@2 name: setReleaseVars diff --git a/eng/common/core-templates/stages/renovate.yml b/eng/common/core-templates/stages/renovate.yml index 41f3b6cc8570..edab28182585 100644 --- a/eng/common/core-templates/stages/renovate.yml +++ b/eng/common/core-templates/stages/renovate.yml @@ -68,7 +68,7 @@ parameters: type: object default: name: NetCore1ESPool-Internal - image: 1es-windows-2022 + image: windows.vs2026.amd64 os: windows resources: diff --git a/eng/common/core-templates/steps/component-governance.yml b/eng/common/core-templates/steps/component-governance.yml deleted file mode 100644 index cf0649aa9565..000000000000 --- a/eng/common/core-templates/steps/component-governance.yml +++ /dev/null @@ -1,16 +0,0 @@ -parameters: - disableComponentGovernance: false - componentGovernanceIgnoreDirectories: '' - is1ESPipeline: false - displayName: 'Component Detection' - -steps: -- ${{ if eq(parameters.disableComponentGovernance, 'true') }}: - - script: echo "##vso[task.setvariable variable=skipComponentGovernanceDetection]true" - displayName: Set skipComponentGovernanceDetection variable -- ${{ if ne(parameters.disableComponentGovernance, 'true') }}: - - task: ComponentGovernanceComponentDetection@0 - continueOnError: true - displayName: ${{ parameters.displayName }} - inputs: - ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml index 003f7eae0fa5..aad0a8aeda33 100644 --- a/eng/common/core-templates/steps/generate-sbom.yml +++ b/eng/common/core-templates/steps/generate-sbom.yml @@ -1,54 +1,14 @@ -# BuildDropPath - The root folder of the drop directory for which the manifest file will be generated. -# PackageName - The name of the package this SBOM represents. -# PackageVersion - The version of the package this SBOM represents. -# ManifestDirPath - The path of the directory where the generated manifest files will be placed -# IgnoreDirectories - Directories to ignore for SBOM generation. This will be passed through to the CG component detector. - parameters: - PackageVersion: 11.0.0 - BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' - PackageName: '.NET' - ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom - IgnoreDirectories: '' - sbomContinueOnError: true - is1ESPipeline: false - # disable publishArtifacts if some other step is publishing the artifacts (like job.yml). - publishArtifacts: true + PackageVersion: unused + BuildDropPath: unused + PackageName: unused + ManifestDirPath: unused + IgnoreDirectories: unused + sbomContinueOnError: unused + is1ESPipeline: unused + publishArtifacts: unused steps: -- task: PowerShell@2 - displayName: Prep for SBOM generation in (Non-linux) - condition: or(eq(variables['Agent.Os'], 'Windows_NT'), eq(variables['Agent.Os'], 'Darwin')) - inputs: - filePath: ./eng/common/generate-sbom-prep.ps1 - arguments: ${{parameters.manifestDirPath}} - -# Chmodding is a workaround for https://github.com/dotnet/arcade/issues/8461 - script: | - chmod +x ./eng/common/generate-sbom-prep.sh - ./eng/common/generate-sbom-prep.sh ${{parameters.manifestDirPath}} - displayName: Prep for SBOM generation in (Linux) - condition: eq(variables['Agent.Os'], 'Linux') - continueOnError: ${{ parameters.sbomContinueOnError }} - -- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 - displayName: 'Generate SBOM manifest' - continueOnError: ${{ parameters.sbomContinueOnError }} - inputs: - PackageName: ${{ parameters.packageName }} - BuildDropPath: ${{ parameters.buildDropPath }} - PackageVersion: ${{ parameters.packageVersion }} - ManifestDirPath: ${{ parameters.manifestDirPath }}/$(ARTIFACT_NAME) - ${{ if ne(parameters.IgnoreDirectories, '') }}: - AdditionalComponentDetectorArgs: '--IgnoreDirectories ${{ parameters.IgnoreDirectories }}' - -- ${{ if eq(parameters.publishArtifacts, 'true')}}: - - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - args: - displayName: Publish SBOM manifest - continueOnError: ${{parameters.sbomContinueOnError}} - targetPath: '${{ parameters.manifestDirPath }}' - artifactName: $(ARTIFACT_NAME) - + echo "##vso[task.logissue type=warning]Including generate-sbom.yml is deprecated, SBOM generation is handled 1ES PT now. Remove this include." + displayName: Issue generate-sbom.yml deprecation warning diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml index a9ea99ba6aaa..84a1922c73f3 100644 --- a/eng/common/core-templates/steps/publish-logs.yml +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -50,13 +50,15 @@ steps: TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs' condition: always() -- template: /eng/common/core-templates/steps/publish-build-artifacts.yml +- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} args: displayName: Publish Logs - pathToPublish: '$(Build.ArtifactStagingDirectory)/PostBuildLogs' - publishLocation: Container - artifactName: PostBuildLogs + targetPath: '$(Build.ArtifactStagingDirectory)/PostBuildLogs' + artifactName: PostBuildLogs_${{ parameters.StageLabel }}_${{ parameters.JobLabel }}_Attempt$(System.JobAttempt) continueOnError: true condition: always() + retryCountOnTaskFailure: 10 # for any files being locked + isProduction: false # logs are non-production artifacts + diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index acf16ed34963..b75f59c428d4 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -62,4 +62,4 @@ steps: artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt) continueOnError: true condition: succeededOrFailed() - sbomEnabled: false # we don't need SBOM for logs + isProduction: false # logs are non-production artifacts diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1 index e33743105635..a5be41db6906 100644 --- a/eng/common/darc-init.ps1 +++ b/eng/common/darc-init.ps1 @@ -29,11 +29,11 @@ function InstallDarcCli ($darcVersion, $toolpath) { Write-Host "Installing Darc CLI version $darcVersion..." Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' if (-not $toolpath) { - Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g" - & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g + Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --source '$arcadeServicesSource' -v $verbosity -g" + & "$dotnet" tool install $darcCliPackageName --version $darcVersion --source "$arcadeServicesSource" -v $verbosity -g }else { - Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity --tool-path '$toolpath'" - & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath" + Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --source '$arcadeServicesSource' -v $verbosity --tool-path '$toolpath'" + & "$dotnet" tool install $darcCliPackageName --version $darcVersion --source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath" } } diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index 9f5ad6b763b5..b56d40e5706c 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -73,9 +73,9 @@ function InstallDarcCli { echo "Installing Darc CLI version $darcVersion..." echo "You may need to restart your command shell if this is the first dotnet tool you have installed." if [ -z "$toolpath" ]; then - echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g) + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --source "$arcadeServicesSource" -v $verbosity -g) else - echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath") + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath") fi } diff --git a/eng/common/generate-sbom-prep.ps1 b/eng/common/generate-sbom-prep.ps1 deleted file mode 100644 index a0c7d792a76f..000000000000 --- a/eng/common/generate-sbom-prep.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -Param( - [Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed -) - -. $PSScriptRoot\pipeline-logging-functions.ps1 - -# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly -# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. -$ArtifactName = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -$SafeArtifactName = $ArtifactName -replace '["/:<>\\|?@*"() ]', '_' -$SbomGenerationDir = Join-Path $ManifestDirPath $SafeArtifactName - -Write-Host "Artifact name before : $ArtifactName" -Write-Host "Artifact name after : $SafeArtifactName" - -Write-Host "Creating dir $ManifestDirPath" - -# create directory for sbom manifest to be placed -if (!(Test-Path -path $SbomGenerationDir)) -{ - New-Item -ItemType Directory -path $SbomGenerationDir - Write-Host "Successfully created directory $SbomGenerationDir" -} -else{ - Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." -} - -Write-Host "Updating artifact name" -Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$SafeArtifactName" diff --git a/eng/common/generate-sbom-prep.sh b/eng/common/generate-sbom-prep.sh deleted file mode 100755 index b8ecca72bbf5..000000000000 --- a/eng/common/generate-sbom-prep.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -source="${BASH_SOURCE[0]}" - -# resolve $SOURCE until the file is no longer a symlink -while [[ -h $source ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" -. $scriptroot/pipeline-logging-functions.sh - - -# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. -artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" -safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" -manifest_dir=$1 - -# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly -# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. -sbom_generation_dir="$manifest_dir/$safe_artifact_name" - -if [ ! -d "$sbom_generation_dir" ] ; then - mkdir -p "$sbom_generation_dir" - echo "Sbom directory created." $sbom_generation_dir -else - Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." -fi - -echo "Artifact name before : "$artifact_name -echo "Artifact name after : "$safe_artifact_name -export ARTIFACT_NAME=$safe_artifact_name -echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name" - -exit 0 diff --git a/eng/common/post-build/redact-logs.ps1 b/eng/common/post-build/redact-logs.ps1 index fc0218a013d1..672f4e2652ed 100644 --- a/eng/common/post-build/redact-logs.ps1 +++ b/eng/common/post-build/redact-logs.ps1 @@ -49,8 +49,8 @@ try { Write-Host "Installing Binlog redactor CLI..." Write-Host "'$dotnet' new tool-manifest" & "$dotnet" new tool-manifest - Write-Host "'$dotnet' tool install $packageName --local --add-source '$PackageFeed' -v $verbosity --version $BinlogToolVersion" - & "$dotnet" tool install $packageName --local --add-source "$PackageFeed" -v $verbosity --version $BinlogToolVersion + Write-Host "'$dotnet' tool install $packageName --local --source '$PackageFeed' -v $verbosity --version $BinlogToolVersion" + & "$dotnet" tool install $packageName --local --source "$PackageFeed" -v $verbosity --version $BinlogToolVersion if (Test-Path $TokensFilePath) { Write-Host "Adding additional sensitive data for redaction from file: " $TokensFilePath diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1 deleted file mode 100644 index 1976ef70fb85..000000000000 --- a/eng/common/post-build/sourcelink-validation.ps1 +++ /dev/null @@ -1,327 +0,0 @@ -param( - [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored - [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation - [Parameter(Mandatory=$false)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade - [Parameter(Mandatory=$false)][string] $GHCommit, # GitHub commit SHA used to build the packages - [Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 - -# `tools.ps1` checks $ci to perform some actions. Since the post-build -# scripts don't necessarily execute in the same agent that run the -# build.ps1/sh script this variable isn't automatically set. -$ci = $true -$disableConfigureToolsetImport = $true -. $PSScriptRoot\..\tools.ps1 - -# Cache/HashMap (File -> Exist flag) used to consult whether a file exist -# in the repository at a specific commit point. This is populated by inserting -# all files present in the repo at a specific commit point. -$global:RepoFiles = @{} - -# Maximum number of jobs to run in parallel -$MaxParallelJobs = 16 - -$MaxRetries = 5 -$RetryWaitTimeInSeconds = 30 - -# Wait time between check for system load -$SecondsBetweenLoadChecks = 10 - -if (!$InputPath -or !(Test-Path $InputPath)){ - Write-Host "No files to validate." - ExitWithExitCode 0 -} - -$ValidatePackage = { - param( - [string] $PackagePath # Full path to a Symbols.NuGet package - ) - - . $using:PSScriptRoot\..\tools.ps1 - - # Ensure input file exist - if (!(Test-Path $PackagePath)) { - Write-Host "Input file does not exist: $PackagePath" - return [pscustomobject]@{ - result = 1 - packagePath = $PackagePath - } - } - - # Extensions for which we'll look for SourceLink information - # For now we'll only care about Portable & Embedded PDBs - $RelevantExtensions = @('.dll', '.exe', '.pdb') - - Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...' - - $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) - $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId - $FailedFiles = 0 - - Add-Type -AssemblyName System.IO.Compression.FileSystem - - [System.IO.Directory]::CreateDirectory($ExtractPath) | Out-Null - - try { - $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) - - $zip.Entries | - Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | - ForEach-Object { - $FileName = $_.FullName - $Extension = [System.IO.Path]::GetExtension($_.Name) - $FakeName = -Join((New-Guid), $Extension) - $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName - - # We ignore resource DLLs - if ($FileName.EndsWith('.resources.dll')) { - return [pscustomobject]@{ - result = 0 - packagePath = $PackagePath - } - } - - [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) - - $ValidateFile = { - param( - [string] $FullPath, # Full path to the module that has to be checked - [string] $RealPath, - [ref] $FailedFiles - ) - - $sourcelinkExe = "$env:USERPROFILE\.dotnet\tools" - $sourcelinkExe = Resolve-Path "$sourcelinkExe\sourcelink.exe" - $SourceLinkInfos = & $sourcelinkExe print-urls $FullPath | Out-String - - if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) { - $NumFailedLinks = 0 - - # We only care about Http addresses - $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches - - if ($Matches.Count -ne 0) { - $Matches.Value | - ForEach-Object { - $Link = $_ - $CommitUrl = "https://raw.githubusercontent.com/${using:GHRepoName}/${using:GHCommit}/" - - $FilePath = $Link.Replace($CommitUrl, "") - $Status = 200 - $Cache = $using:RepoFiles - - $attempts = 0 - - while ($attempts -lt $using:MaxRetries) { - if ( !($Cache.ContainsKey($FilePath)) ) { - try { - $Uri = $Link -as [System.URI] - - if ($Link -match "submodules") { - # Skip submodule links until sourcelink properly handles submodules - $Status = 200 - } - elseif ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) { - # Only GitHub links are valid - $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode - } - else { - # If it's not a github link, we want to break out of the loop and not retry. - $Status = 0 - $attempts = $using:MaxRetries - } - } - catch { - Write-Host $_ - $Status = 0 - } - } - - if ($Status -ne 200) { - $attempts++ - - if ($attempts -lt $using:MaxRetries) - { - $attemptsLeft = $using:MaxRetries - $attempts - Write-Warning "Download failed, $attemptsLeft attempts remaining, will retry in $using:RetryWaitTimeInSeconds seconds" - Start-Sleep -Seconds $using:RetryWaitTimeInSeconds - } - else { - if ($NumFailedLinks -eq 0) { - if ($FailedFiles.Value -eq 0) { - Write-Host - } - - Write-Host "`tFile $RealPath has broken links:" - } - - Write-Host "`t`tFailed to retrieve $Link" - - $NumFailedLinks++ - } - } - else { - break - } - } - } - } - - if ($NumFailedLinks -ne 0) { - $FailedFiles.value++ - $global:LASTEXITCODE = 1 - } - } - } - - &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles) - } - } - catch { - Write-Host $_ - } - finally { - $zip.Dispose() - } - - if ($FailedFiles -eq 0) { - Write-Host 'Passed.' - return [pscustomobject]@{ - result = 0 - packagePath = $PackagePath - } - } - else { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links." - return [pscustomobject]@{ - result = 1 - packagePath = $PackagePath - } - } -} - -function CheckJobResult( - $result, - $packagePath, - [ref]$ValidationFailures, - [switch]$logErrors) { - if ($result -ne '0') { - if ($logErrors) { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "$packagePath has broken SourceLink links." - } - $ValidationFailures.Value++ - } -} - -function ValidateSourceLinkLinks { - if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) { - if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format / or -. '$GHRepoName'" - ExitWithExitCode 1 - } - else { - $GHRepoName = $GHRepoName -replace '^([^\s-]+)-([^\s]+)$', '$1/$2'; - } - } - - if ($GHCommit -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'" - ExitWithExitCode 1 - } - - if ($GHRepoName -ne '' -and $GHCommit -ne '') { - $RepoTreeURL = -Join('http://api.github.com/repos/', $GHRepoName, '/git/trees/', $GHCommit, '?recursive=1') - $CodeExtensions = @('.cs', '.vb', '.fs', '.fsi', '.fsx', '.fsscript') - - try { - # Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash - $Data = Invoke-WebRequest $RepoTreeURL -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree - - foreach ($file in $Data) { - $Extension = [System.IO.Path]::GetExtension($file.path) - - if ($CodeExtensions.Contains($Extension)) { - $RepoFiles[$file.path] = 1 - } - } - } - catch { - Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching." - } - } - elseif ($GHRepoName -ne '' -or $GHCommit -ne '') { - Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.' - } - - if (Test-Path $ExtractPath) { - Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue - } - - $ValidationFailures = 0 - - # Process each NuGet package in parallel - Get-ChildItem "$InputPath\*.symbols.nupkg" | - ForEach-Object { - Write-Host "Starting $($_.FullName)" - Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName | Out-Null - $NumJobs = @(Get-Job -State 'Running').Count - - while ($NumJobs -ge $MaxParallelJobs) { - Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again." - sleep $SecondsBetweenLoadChecks - $NumJobs = @(Get-Job -State 'Running').Count - } - - foreach ($Job in @(Get-Job -State 'Completed')) { - $jobResult = Wait-Job -Id $Job.Id | Receive-Job - CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) -LogErrors - Remove-Job -Id $Job.Id - } - } - - foreach ($Job in @(Get-Job)) { - $jobResult = Wait-Job -Id $Job.Id | Receive-Job - CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) - Remove-Job -Id $Job.Id - } - if ($ValidationFailures -gt 0) { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation." - ExitWithExitCode 1 - } -} - -function InstallSourcelinkCli { - $sourcelinkCliPackageName = 'sourcelink' - - $dotnetRoot = InitializeDotNetCli -install:$true - $dotnet = "$dotnetRoot\dotnet.exe" - $toolList = & "$dotnet" tool list --global - - if (($toolList -like "*$sourcelinkCliPackageName*") -and ($toolList -like "*$sourcelinkCliVersion*")) { - Write-Host "SourceLink CLI version $sourcelinkCliVersion is already installed." - } - else { - Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..." - Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' - & "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global - } -} - -try { - InstallSourcelinkCli - - foreach ($Job in @(Get-Job)) { - Remove-Job -Id $Job.Id - } - - ValidateSourceLinkLinks -} -catch { - Write-Host $_.Exception - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'SourceLink' -Message $_ - ExitWithExitCode 1 -} diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index b64b66a6275b..68119de603ef 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -22,7 +22,7 @@ $warnAsError = if ($noWarnAsError) { $false } else { $true } function Print-Usage() { Write-Host "Common settings:" - Write-Host " -task Name of Arcade task (name of a project in SdkTasks directory of the Arcade SDK package)" + Write-Host " -task Name of Arcade task (name of a project in toolset directory of the Arcade SDK package)" Write-Host " -restore Restore dependencies" Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]" Write-Host " -help Print help and exit" @@ -66,20 +66,7 @@ try { if( $msbuildEngine -eq "vs") { # Ensure desktop MSBuild is available for sdk tasks. - if( -not ($GlobalJson.tools.PSObject.Properties.Name -contains "vs" )) { - $GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty - } - if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) { - $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "18.0.0" -MemberType NoteProperty - } - if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") { - $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true - } - if ($xcopyMSBuildToolsFolder -eq $null) { - throw 'Unable to get xcopy downloadable version of msbuild' - } - - $global:_MSBuildExe = "$($xcopyMSBuildToolsFolder)\MSBuild\Current\Bin\MSBuild.exe" + $global:_MSBuildExe = InitializeVisualStudioMSBuild } $taskProject = GetSdkTaskProject $task diff --git a/eng/common/sdk-task.sh b/eng/common/sdk-task.sh index 3270f83fa9a7..1cf71bb2aea4 100644 --- a/eng/common/sdk-task.sh +++ b/eng/common/sdk-task.sh @@ -2,7 +2,7 @@ show_usage() { echo "Common settings:" - echo " --task Name of Arcade task (name of a project in SdkTasks directory of the Arcade SDK package)" + echo " --task Name of Arcade task (name of a project in toolset directory of the Arcade SDK package)" echo " --restore Restore dependencies" echo " --verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]" echo " --help Print help and exit" diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index cdc62e72b077..f772aa3d78fa 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -81,7 +81,6 @@ eng\common\ publish-build-artifacts.yml (logic) publish-pipeline-artifacts.yml (logic) component-governance.yml (shim) - generate-sbom.yml (shim) publish-logs.yml (shim) retain-build.yml (shim) send-to-helix.yml (shim) @@ -104,7 +103,6 @@ eng\common\ setup-maestro-vars.yml (logic) steps\ component-governance.yml (logic) - generate-sbom.yml (logic) publish-build-artifacts.yml (redirect) publish-logs.yml (logic) publish-pipeline-artifacts.yml (redirect) diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index 92a0664f5647..d68e9fbc2656 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -1,24 +1,15 @@ parameters: -# Sbom related params - enableSbom: true runAsPublic: false - PackageVersion: 9.0.0 - BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' +# Sbom related params, unused now and can eventually be removed + enableSbom: unused + PackageVersion: unused + BuildDropPath: unused jobs: - template: /eng/common/core-templates/job/job.yml parameters: is1ESPipeline: true - componentGovernanceSteps: - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: - - template: /eng/common/templates/steps/generate-sbom.yml - parameters: - PackageVersion: ${{ parameters.packageVersion }} - BuildDropPath: ${{ parameters.buildDropPath }} - ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom - publishArtifacts: false - # publish artifacts # for 1ES managed templates, use the templateContext.output to handle multiple outputs. templateContext: @@ -26,12 +17,19 @@ jobs: outputs: - ${{ if ne(parameters.artifacts.publish, '') }}: - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: - - output: buildArtifacts + - output: pipelineArtifact displayName: Publish pipeline artifacts - PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts' - ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} - condition: always() - retryCountOnTaskFailure: 10 # for any logs being locked + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts' + artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} + condition: succeeded() + retryCountOnTaskFailure: 10 # for any files being locked + continueOnError: true + - output: pipelineArtifact + displayName: Publish pipeline artifacts + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts' + artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}_Attempt$(System.JobAttempt) + condition: not(succeeded()) + retryCountOnTaskFailure: 10 # for any files being locked continueOnError: true - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: - output: pipelineArtifact @@ -40,18 +38,18 @@ jobs: displayName: 'Publish logs' continueOnError: true condition: always() - retryCountOnTaskFailure: 10 # for any logs being locked - sbomEnabled: false # we don't need SBOM for logs + retryCountOnTaskFailure: 10 # for any files being locked + isProduction: false # logs are non-production artifacts - ${{ if eq(parameters.enablePublishBuildArtifacts, true) }}: - - output: buildArtifacts + - output: pipelineArtifact displayName: Publish Logs - PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' - publishLocation: Container - ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)_Attempt$(System.JobAttempt)' ) }} + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' + artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)_Attempt$(System.JobAttempt)' ) }} continueOnError: true condition: always() - sbomEnabled: false # we don't need SBOM for logs + retryCountOnTaskFailure: 10 # for any files being locked + isProduction: false # logs are non-production artifacts - ${{ if eq(parameters.enableBuildRetry, 'true') }}: - output: pipelineArtifact @@ -59,14 +57,20 @@ jobs: artifactName: 'BuildConfiguration' displayName: 'Publish build retry configuration' continueOnError: true - sbomEnabled: false # we don't need SBOM for BuildConfiguration + retryCountOnTaskFailure: 10 # for any files being locked + isProduction: false # BuildConfiguration is a non-production artifact - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: + # V4 publishing: automatically publish staged artifacts as a pipeline artifact. + # The artifact name matches the SDK's FutureArtifactName ($(System.PhaseName)_Artifacts), + # which is encoded in the asset manifest for downstream publishing to discover. + # Jobs can opt in by setting enablePublishing: true. + - ${{ if and(eq(parameters.publishingVersion, 4), eq(parameters.enablePublishing, 'true')) }}: - output: pipelineArtifact - displayName: Publish SBOM manifest + displayName: 'Publish V4 pipeline artifacts' + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts' + artifactName: '$(System.PhaseName)_Artifacts' continueOnError: true - targetPath: $(Build.ArtifactStagingDirectory)/sbom - artifactName: $(ARTIFACT_NAME) + retryCountOnTaskFailure: 10 # for any files being locked # add any outputs provided via root yaml - ${{ if ne(parameters.templateContext.outputs, '') }}: diff --git a/eng/common/templates-official/steps/component-governance.yml b/eng/common/templates-official/steps/component-governance.yml deleted file mode 100644 index 30bb3985ca2b..000000000000 --- a/eng/common/templates-official/steps/component-governance.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/component-governance.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/steps/publish-pipeline-artifacts.yml b/eng/common/templates-official/steps/publish-pipeline-artifacts.yml index 172f9f0fdc97..9e5981365e56 100644 --- a/eng/common/templates-official/steps/publish-pipeline-artifacts.yml +++ b/eng/common/templates-official/steps/publish-pipeline-artifacts.yml @@ -24,5 +24,7 @@ steps: artifactName: ${{ parameters.args.artifactName }} ${{ if parameters.args.properties }}: properties: ${{ parameters.args.properties }} - ${{ if parameters.args.sbomEnabled }}: + ${{ if ne(parameters.args.sbomEnabled, '') }}: sbomEnabled: ${{ parameters.args.sbomEnabled }} + ${{ if ne(parameters.args.isProduction, '') }}: + isProduction: ${{ parameters.args.isProduction }} diff --git a/eng/common/templates-official/variables/pool-providers.yml b/eng/common/templates-official/variables/pool-providers.yml index 1f308b24efc4..2cc3ae305d5a 100644 --- a/eng/common/templates-official/variables/pool-providers.yml +++ b/eng/common/templates-official/variables/pool-providers.yml @@ -23,7 +23,7 @@ # # pool: # name: $(DncEngInternalBuildPool) -# image: 1es-windows-2022 +# image: windows.vs2026.amd64 variables: # Coalesce the target and source branches so we know when a PR targets a release branch diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 238fa0818f7b..5e261f34db42 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -1,12 +1,12 @@ parameters: enablePublishBuildArtifacts: false - disableComponentGovernance: '' - componentGovernanceIgnoreDirectories: '' -# Sbom related params - enableSbom: true runAsPublic: false - PackageVersion: 9.0.0 - BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' +# CG related params, unused now and can eventually be removed + disableComponentGovernance: unused +# Sbom related params, unused now and can eventually be removed + enableSbom: unused + PackageVersion: unused + BuildDropPath: unused jobs: - template: /eng/common/core-templates/job/job.yml @@ -21,32 +21,34 @@ jobs: - ${{ each step in parameters.steps }}: - ${{ step }} - componentGovernanceSteps: - - template: /eng/common/templates/steps/component-governance.yml - parameters: - ${{ if eq(parameters.disableComponentGovernance, '') }}: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: - disableComponentGovernance: false - ${{ else }}: - disableComponentGovernance: true - ${{ else }}: - disableComponentGovernance: ${{ parameters.disableComponentGovernance }} - componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} + # we don't run CG in public + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - script: echo "##vso[task.setvariable variable=skipComponentGovernanceDetection]true" + displayName: Set skipComponentGovernanceDetection variable artifactPublishSteps: - ${{ if ne(parameters.artifacts.publish, '') }}: - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: - - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml parameters: is1ESPipeline: false args: displayName: Publish pipeline artifacts - pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts' - publishLocation: Container + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts' artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} continueOnError: true - condition: always() - retryCountOnTaskFailure: 10 # for any logs being locked + condition: succeeded() + retryCountOnTaskFailure: 10 # for any files being locked + - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml + parameters: + is1ESPipeline: false + args: + displayName: Publish pipeline artifacts + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts' + artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}_Attempt$(System.JobAttempt) + continueOnError: true + condition: not(succeeded()) + retryCountOnTaskFailure: 10 # for any files being locked - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml parameters: @@ -57,20 +59,19 @@ jobs: displayName: 'Publish logs' continueOnError: true condition: always() - retryCountOnTaskFailure: 10 # for any logs being locked - sbomEnabled: false # we don't need SBOM for logs + retryCountOnTaskFailure: 10 # for any files being locked - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: - - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml parameters: is1ESPipeline: false args: displayName: Publish Logs - pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' - publishLocation: Container + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)_Attempt$(System.JobAttempt)' ) }} continueOnError: true condition: always() + retryCountOnTaskFailure: 10 # for any files being locked - ${{ if eq(parameters.enableBuildRetry, 'true') }}: - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml @@ -81,4 +82,4 @@ jobs: artifactName: 'BuildConfiguration' displayName: 'Publish build retry configuration' continueOnError: true - sbomEnabled: false # we don't need SBOM for BuildConfiguration + retryCountOnTaskFailure: 10 # for any files being locked diff --git a/eng/common/templates/steps/component-governance.yml b/eng/common/templates/steps/component-governance.yml deleted file mode 100644 index c12a5f8d21d7..000000000000 --- a/eng/common/templates/steps/component-governance.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/component-governance.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/variables/pool-providers.yml b/eng/common/templates/variables/pool-providers.yml index 18693ea120d5..587770f0add4 100644 --- a/eng/common/templates/variables/pool-providers.yml +++ b/eng/common/templates/variables/pool-providers.yml @@ -23,7 +23,7 @@ # # pool: # name: $(DncEngInternalBuildPool) -# demands: ImageOverride -equals windows.vs2022.amd64 +# demands: ImageOverride -equals windows.vs2026.amd64 variables: - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - template: /eng/common/templates-official/variables/pool-providers.yml diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index c96f5018fe43..65adefc7f268 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -185,7 +185,11 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { if ((-not $globalJsonHasRuntimes) -and (-not [string]::IsNullOrEmpty($env:DOTNET_INSTALL_DIR)) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) { $dotnetRoot = $env:DOTNET_INSTALL_DIR } else { - $dotnetRoot = Join-Path $RepoRoot '.dotnet' + if (-not [string]::IsNullOrEmpty($env:DOTNET_GLOBAL_INSTALL_DIR)) { + $dotnetRoot = $env:DOTNET_GLOBAL_INSTALL_DIR + } else { + $dotnetRoot = Join-Path $RepoRoot '.dotnet' + } if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) { if ($install) { @@ -375,12 +379,11 @@ function InstallDotNet([string] $dotnetRoot, # # 1. MSBuild from an active VS command prompt # 2. MSBuild from a compatible VS installation -# 3. MSBuild from the xcopy tool package # # Returns full path to msbuild.exe. # Throws on failure. # -function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = $null) { +function InitializeVisualStudioMSBuild([object]$vsRequirements = $null) { if (-not (IsWindowsPlatform)) { throw "Cannot initialize Visual Studio on non-Windows" } @@ -390,13 +393,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = } # Minimum VS version to require. - $vsMinVersionReqdStr = '17.7' - $vsMinVersionReqd = [Version]::new($vsMinVersionReqdStr) - - # If the version of msbuild is going to be xcopied, - # use this version. Version matches a package here: - # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/18.0.0 - $defaultXCopyMSBuildVersion = '18.0.0' + $vsMinVersionReqdStr = '18.0' if (!$vsRequirements) { if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') { @@ -426,46 +423,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = } } - # Locate Visual Studio installation or download x-copy msbuild. + # Locate Visual Studio installation. $vsInfo = LocateVisualStudio $vsRequirements - if ($vsInfo -ne $null -and $env:ForceUseXCopyMSBuild -eq $null) { + if ($vsInfo -ne $null) { # Ensure vsInstallDir has a trailing slash $vsInstallDir = Join-Path $vsInfo.installationPath "\" $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion } else { - if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') { - $xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild' - $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0] - } else { - #if vs version provided in global.json is incompatible (too low) then use the default version for xcopy msbuild download - if($vsMinVersion -lt $vsMinVersionReqd){ - Write-Host "Using xcopy-msbuild version of $defaultXCopyMSBuildVersion since VS version $vsMinVersionStr provided in global.json is not compatible" - $xcopyMSBuildVersion = $defaultXCopyMSBuildVersion - $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0] - } - else{ - # If the VS version IS compatible, look for an xcopy msbuild package - # with a version matching VS. - # Note: If this version does not exist, then an explicit version of xcopy msbuild - # can be specified in global.json. This will be required for pre-release versions of msbuild. - $vsMajorVersion = $vsMinVersion.Major - $vsMinorVersion = $vsMinVersion.Minor - $xcopyMSBuildVersion = "$vsMajorVersion.$vsMinorVersion.0" - } - } - - $vsInstallDir = $null - if ($xcopyMSBuildVersion.Trim() -ine "none") { - $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install - if ($vsInstallDir -eq $null) { - throw "Could not xcopy msbuild. Please check that package 'Microsoft.DotNet.Arcade.MSBuild.Xcopy @ $xcopyMSBuildVersion' exists on feed 'dotnet-eng'." - } - } - if ($vsInstallDir -eq $null) { - throw 'Unable to find Visual Studio that has required version and components installed' - } + throw 'Unable to find Visual Studio that has required version and components installed' } $msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" } @@ -492,38 +459,6 @@ function InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [str } } -function InstallXCopyMSBuild([string]$packageVersion) { - return InitializeXCopyMSBuild $packageVersion -install $true -} - -function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { - $packageName = 'Microsoft.DotNet.Arcade.MSBuild.Xcopy' - $packageDir = Join-Path $ToolsDir "msbuild\$packageVersion" - $packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg" - - if (!(Test-Path $packageDir)) { - if (!$install) { - return $null - } - - Create-Directory $packageDir - - Write-Host "Downloading $packageName $packageVersion" - $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit - Retry({ - Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -UseBasicParsing -OutFile $packagePath - }) - - if (!(Test-Path $packagePath)) { - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "See https://dev.azure.com/dnceng/internal/_wiki/wikis/DNCEng%20Services%20Wiki/1074/Updating-Microsoft.DotNet.Arcade.MSBuild.Xcopy-WAS-RoslynTools.MSBuild-(xcopy-msbuild)-generation?anchor=troubleshooting for help troubleshooting issues with XCopy MSBuild" - throw - } - Unzip $packagePath $packageDir - } - - return Join-Path $packageDir 'tools' -} - # # Locates Visual Studio instance that meets the minimal requirements specified by tools.vs object in global.json. # @@ -545,7 +480,6 @@ function LocateVisualStudio([object]$vsRequirements = $null){ if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') { $vswhereVersion = $GlobalJson.tools.vswhere } else { - # keep this in sync with the VSWhereVersion in DefaultVersions.props $vswhereVersion = '3.1.7' } @@ -633,7 +567,7 @@ function InitializeBuildTool() { $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net' } } elseif ($msbuildEngine -eq "vs") { try { - $msbuildPath = InitializeVisualStudioMSBuild -install:$restore + $msbuildPath = InitializeVisualStudioMSBuild } catch { Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ ExitWithExitCode 1 @@ -680,7 +614,17 @@ function GetNuGetPackageCachePath() { # Returns a full path to an Arcade SDK task project file. function GetSdkTaskProject([string]$taskName) { - return Join-Path (Split-Path (InitializeToolset) -Parent) "SdkTasks\$taskName.proj" + $toolsetDir = Split-Path (InitializeToolset) -Parent + $proj = Join-Path $toolsetDir "$taskName.proj" + if (Test-Path $proj) { + return $proj + } + # TODO: Remove this fallback once all supported versions use the new layout. + $legacyProj = Join-Path $toolsetDir "SdkTasks\$taskName.proj" + if (Test-Path $legacyProj) { + return $legacyProj + } + throw "Unable to find $taskName.proj in toolset at: $toolsetDir" } function InitializeNativeTools() { @@ -717,13 +661,18 @@ function InitializeToolset() { $nugetCache = GetNuGetPackageCachePath $toolsetVersion = Read-ArcadeSdkVersion - $toolsetLocationFile = Join-Path $ToolsetDir "$toolsetVersion.txt" + $toolsetToolsDir = Join-Path $ToolsetDir $toolsetVersion - if (Test-Path $toolsetLocationFile) { - $path = Get-Content $toolsetLocationFile -TotalCount 1 - if (Test-Path $path) { - return $global:_InitializeToolset = $path - } + # Check if the toolset has already been extracted + $toolsetBuildProj = $null + $buildProjPath = Join-Path $toolsetToolsDir 'Build.proj' + + if (Test-Path $buildProjPath) { + $toolsetBuildProj = $buildProjPath + } + + if ($toolsetBuildProj -ne $null) { + return $global:_InitializeToolset = $toolsetBuildProj } if (-not $restore) { @@ -731,21 +680,50 @@ function InitializeToolset() { ExitWithExitCode 1 } - $buildTool = InitializeBuildTool + $downloadArgs = @("package", "download", "Microsoft.DotNet.Arcade.Sdk@$toolsetVersion", "--verbosity", "minimal", "--prerelease", "--output", "$nugetCache") + $nugetConfig = $env:NUGET_CONFIG + if (-not $nugetConfig) { + # Search for any variation of nuget.config in the RepoRoot + $configFile = Get-ChildItem -Path $RepoRoot -File | Where-Object { $_.Name -ieq "nuget.config" } | Select-Object -First 1 + + if ($configFile) { + $nugetConfig = $configFile.FullName + } + } - $proj = Join-Path $ToolsetDir 'restore.proj' - $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'ToolsetRestore.binlog') } else { '' } + if ($nugetConfig) { + $downloadArgs += "--configfile" + $downloadArgs += $nugetConfig + } + DotNet @downloadArgs - '' | Set-Content $proj + $packageDir = Join-Path $nugetCache (Join-Path 'microsoft.dotnet.arcade.sdk' $toolsetVersion) + $packageToolsetDir = Join-Path $packageDir 'toolset' + $packageToolsDir = Join-Path $packageDir 'tools' + + # TODO: Remove the tools/ check once all supported versions have the toolset folder. + if (!(Test-Path $packageToolsetDir) -and !(Test-Path $packageToolsDir)) { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Arcade SDK package does not contain a toolset or tools folder: $packageDir" + ExitWithExitCode 3 + } - MSBuild-Core $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile + New-Item -ItemType Directory -Path $toolsetToolsDir -Force | Out-Null - $path = Get-Content $toolsetLocationFile -Encoding UTF8 -TotalCount 1 - if (!(Test-Path $path)) { - throw "Invalid toolset path: $path" + # Copy toolset if present at the package root (new layout), otherwise fall back to tools + if (Test-Path $packageToolsetDir) { + Copy-Item -Path "$packageToolsetDir\*" -Destination $toolsetToolsDir -Recurse -Force + } else { + # TODO: Remove this fallback once all supported versions have the toolset folder. + Copy-Item -Path "$packageToolsDir\*" -Destination $toolsetToolsDir -Recurse -Force + } + + if (Test-Path $buildProjPath) { + $toolsetBuildProj = $buildProjPath + } else { + throw "Unable to find Build.proj in toolset at: $toolsetToolsDir" } - return $global:_InitializeToolset = $path + return $global:_InitializeToolset = $toolsetBuildProj } function ExitWithExitCode([int] $exitCode) { @@ -806,6 +784,40 @@ function MSBuild() { MSBuild-Core @args } +# +# Executes a dotnet command with arguments passed to the function. +# Terminates the script if the command fails. +# +function DotNet() { + $dotnetRoot = InitializeDotNetCli -install:$restore + $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') + + $cmdArgs = "" + foreach ($arg in $args) { + if ($null -ne $arg -and $arg.Trim() -ne "") { + if ($arg.EndsWith('\')) { + $arg = $arg + "\" + } + $cmdArgs += " `"$arg`"" + } + } + + $env:ARCADE_BUILD_TOOL_COMMAND = "`"$dotnetPath`" $cmdArgs" + + $exitCode = Exec-Process $dotnetPath $cmdArgs + + if ($exitCode -ne 0) { + Write-Host "dotnet command failed with exit code $exitCode. Check errors above." -ForegroundColor Red + + if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) { + Write-PipelineSetResult -Result "Failed" -Message "dotnet command execution failed." + ExitWithExitCode 0 + } else { + ExitWithExitCode $exitCode + } + } +} + # # Executes msbuild (or 'dotnet msbuild') with arguments passed to the function. # The arguments are automatically quoted. @@ -842,7 +854,7 @@ function MSBuild-Core() { $cmdArgs += ' /p:TreatWarningsAsErrors=false' } - if ($warnNotAsError) { + if ($warnAsError -and $warnNotAsError) { $cmdArgs += " /warnnotaserror:$warnNotAsError /p:AdditionalWarningsNotAsErrors=$warnNotAsError" } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index a6e0ed594fda..95c55ce9b4d9 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -148,7 +148,11 @@ function InitializeDotNetCli { if [[ $global_json_has_runtimes == false && -n "${DOTNET_INSTALL_DIR:-}" && -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then dotnet_root="$DOTNET_INSTALL_DIR" else - dotnet_root="${repo_root}.dotnet" + if [[ -n "${DOTNET_GLOBAL_INSTALL_DIR:-}" ]]; then + dotnet_root="$DOTNET_GLOBAL_INSTALL_DIR" + else + dotnet_root="${repo_root}.dotnet" + fi export DOTNET_INSTALL_DIR="$dotnet_root" @@ -407,15 +411,18 @@ function InitializeToolset { ReadGlobalVersion "Microsoft.DotNet.Arcade.Sdk" local toolset_version=$_ReadGlobalVersion - local toolset_location_file="$toolset_dir/$toolset_version.txt" + local toolset_tools_dir="$toolset_dir/$toolset_version" - if [[ -a "$toolset_location_file" ]]; then - local path=`cat "$toolset_location_file"` - if [[ -a "$path" ]]; then - # return value - _InitializeToolset="$path" - return - fi + # Check if the toolset has already been extracted + local toolset_build_proj="" + if [[ -a "$toolset_tools_dir/Build.proj" ]]; then + toolset_build_proj="$toolset_tools_dir/Build.proj" + fi + + if [[ -n "$toolset_build_proj" ]]; then + # return value + _InitializeToolset="$toolset_build_proj" + return fi if [[ "$restore" != true ]]; then @@ -423,20 +430,45 @@ function InitializeToolset { ExitWithExitCode 2 fi - local proj="$toolset_dir/restore.proj" + local download_args=("package" "download" "Microsoft.DotNet.Arcade.Sdk@$toolset_version" "--verbosity" "minimal" "--prerelease" "--output" "$_GetNuGetPackageCachePath") + local nuget_config="${NUGET_CONFIG:-}" + if [[ -z "$nuget_config" ]]; then + # Search for any variation of nuget.config in the RepoRoot + local found_config + found_config=$(find "$repo_root" -maxdepth 1 -type f -iname "nuget.config" -print -quit) - local bl="" - if [[ "$binary_log" == true ]]; then - bl="/bl:$log_dir/ToolsetRestore.binlog" + if [[ -n "$found_config" ]]; then + nuget_config="$found_config" + fi fi - echo '' > "$proj" - MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file" + if [[ -n "$nuget_config" ]]; then + download_args+=("--configfile" "$nuget_config") + fi + DotNet "${download_args[@]}" - local toolset_build_proj=`cat "$toolset_location_file"` + local package_dir="$_GetNuGetPackageCachePath/microsoft.dotnet.arcade.sdk/$toolset_version" - if [[ ! -a "$toolset_build_proj" ]]; then - Write-PipelineTelemetryError -category 'Build' "Invalid toolset path: $toolset_build_proj" + # TODO: Remove the tools/ check once all supported versions have the toolset folder. + if [[ ! -d "$package_dir/toolset" && ! -d "$package_dir/tools" ]]; then + Write-PipelineTelemetryError -category 'InitializeToolset' "Arcade SDK package does not contain a toolset or tools folder: $package_dir" + ExitWithExitCode 3 + fi + + mkdir -p "$toolset_tools_dir" + + # Copy toolset if present at the package root (new layout), otherwise fall back to tools + if [[ -d "$package_dir/toolset" ]]; then + cp -r "$package_dir/toolset/." "$toolset_tools_dir" + else + # TODO: Remove this fallback once all supported versions have the toolset folder. + cp -r "$package_dir/tools/." "$toolset_tools_dir" + fi + + if [[ -a "$toolset_tools_dir/Build.proj" ]]; then + toolset_build_proj="$toolset_tools_dir/Build.proj" + else + Write-PipelineTelemetryError -category 'Build' "Unable to find Build.proj in toolset at: $toolset_tools_dir" ExitWithExitCode 3 fi @@ -458,6 +490,26 @@ function StopProcesses { return 0 } +function DotNet { + InitializeDotNetCli $restore + + local dotnet_path="$_InitializeDotNetCli/dotnet" + + export ARCADE_BUILD_TOOL_COMMAND="$dotnet_path $@" + + "$dotnet_path" "$@" || { + local exit_code=$? + echo "dotnet command failed with exit code $exit_code. Check errors above." + + if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$from_vmr" != true ]]; then + Write-PipelineSetResult -result "Failed" -message "dotnet command execution failed." + ExitWithExitCode 0 + else + ExitWithExitCode $exit_code + fi + } +} + function MSBuild { local args=( "$@" ) if [[ "$pipelines_log" == true ]]; then @@ -534,7 +586,7 @@ function MSBuild-Core { fi local warnnotaserror_switch="" - if [[ -n "$warn_not_as_error" ]]; then + if [[ -n "$warn_not_as_error" && "$warn_as_error" == true ]]; then warnnotaserror_switch="/warnnotaserror:$warn_not_as_error /p:AdditionalWarningsNotAsErrors=$warn_not_as_error" fi @@ -555,8 +607,22 @@ function GetDarc { # Returns a full path to an Arcade SDK task project file. function GetSdkTaskProject { - taskName=$1 - echo "$(dirname $_InitializeToolset)/SdkTasks/$taskName.proj" + local taskName=$1 + local toolsetDir + toolsetDir="$(dirname "$_InitializeToolset")" + local proj="$toolsetDir/$taskName.proj" + if [[ -a "$proj" ]]; then + echo "$proj" + return + fi + # TODO: Remove this fallback once all supported versions use the new layout. + local legacyProj="$toolsetDir/SdkTasks/$taskName.proj" + if [[ -a "$legacyProj" ]]; then + echo "$legacyProj" + return + fi + Write-PipelineTelemetryError -category 'Build' "Unable to find $taskName.proj in toolset at: $toolsetDir" + ExitWithExitCode 3 } ResolvePath "${BASH_SOURCE[0]}" diff --git a/eng/pipelines/arcade/stage-build.yml b/eng/pipelines/arcade/stage-build.yml index 9942635c8a0a..62c7f3e7e18c 100644 --- a/eng/pipelines/arcade/stage-build.yml +++ b/eng/pipelines/arcade/stage-build.yml @@ -80,8 +80,12 @@ stages: - ${{ each pair in step }}: ${{ pair.key }}: ${{ pair.value }} - - script: ${{ BuildPlatform.buildScript }} -restore -build -configuration ${{ BuildConfiguration }} -projects "${{ parameters.buildTaskProjects }}" /p:ArchiveTests=false /p:TreatWarningsAsErrors=$(TreatWarningsAsErrors) /bl:$(Build.Arcade.LogsPath)${{ BuildConfiguration }}/buildtasks_${{ BuildPlatform.os }}.binlog $(_OfficialBuildIdArgs) - displayName: 🛠️ Build BuildTasks + - script: dotnet cake --target=dotnet-buildtasks --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic + displayName: 🛠️ Provision SDK & Build BuildTasks + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) - - script: ${{ BuildPlatform.buildScript }} -restore -build -configuration ${{ BuildConfiguration }} /p:ArchiveTests=false /p:TreatWarningsAsErrors=$(TreatWarningsAsErrors) /bl:$(Build.Arcade.LogsPath)${{ BuildConfiguration }}/build_${{ BuildPlatform.os }}.binlog $(_OfficialBuildIdArgs) + - script: ${{ BuildPlatform.buildScript }} -restore -build -configuration ${{ BuildConfiguration }} /p:ArchiveTests=false /p:TreatWarningsAsErrors=$(TreatWarningsAsErrors) /p:SkipInitInternalTooling=true /bl:$(Build.Arcade.LogsPath)${{ BuildConfiguration }}/build_${{ BuildPlatform.os }}.binlog $(_OfficialBuildIdArgs) displayName: 🛠️ Build Microsoft.Maui.sln diff --git a/eng/pipelines/arcade/stage-device-tests.yml b/eng/pipelines/arcade/stage-device-tests.yml index 66bcc110990a..fa76802c4a17 100644 --- a/eng/pipelines/arcade/stage-device-tests.yml +++ b/eng/pipelines/arcade/stage-device-tests.yml @@ -122,8 +122,12 @@ stages: ${{ pair.key }}: ${{ pair.value }} # Run on public pipeline - - script: $(_buildScriptMacOS) -restore -build -configuration $(_BuildConfig) -projects '$(Build.SourcesDirectory)/Microsoft.Maui.BuildTasks.slnf' /bl:BuildBuildTasks.binlog $(_OfficialBuildIdArgs) - displayName: Build BuildTasks + - script: dotnet cake --target=dotnet-buildtasks --configuration="$(_BuildConfig)" --verbosity=diagnostic + displayName: Provision SDK & Build BuildTasks + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) - script: $(_buildScriptMacOS) -restore -build -configuration $(_BuildConfig) /p:BuildDeviceTests=true /bl:BuildDeviceTests.binlog displayName: Build DeviceTests @@ -335,8 +339,12 @@ stages: ${{ pair.key }}: ${{ pair.value }} # Run on public pipeline - - script: $(_buildScriptMacOS) -restore -build -configuration $(_BuildConfig) -projects '$(Build.SourcesDirectory)/Microsoft.Maui.BuildTasks.slnf' /bl:BuildBuildTasks.binlog $(_OfficialBuildIdArgs) - displayName: Build BuildTasks + - script: dotnet cake --target=dotnet-buildtasks --configuration="$(_BuildConfig)" --verbosity=diagnostic + displayName: Provision SDK & Build BuildTasks + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) - script: $(_buildScriptMacOS) -restore -build -configuration $(_BuildConfig) /p:BuildDeviceTests=true /p:UseMonoRuntime=false /bl:BuildDeviceTests.binlog displayName: Build DeviceTests (CoreCLR) @@ -549,9 +557,9 @@ stages: displayName: 'Restore .NET tools' retryCountOnTaskFailure: 3 - # Install .NET SDK and workloads using Arcade build script - - script: ./build.cmd -restore -configuration Release - displayName: 'Install .NET' + # Build BuildTasks using Cake (provisions SDK, cleans stale manifests, builds) + - script: dotnet cake --target=dotnet-buildtasks --configuration="Release" --verbosity=diagnostic + displayName: Provision SDK & Build BuildTasks retryCountOnTaskFailure: 3 env: DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) @@ -560,10 +568,6 @@ stages: - pwsh: echo "##vso[task.prependpath]$(DotNet.Dir)" displayName: 'Add .NET to PATH' - # Build BuildTasks first (need -restore to ensure SDK is available) - - script: ./build.cmd -restore -build -configuration Release -projects Microsoft.Maui.BuildTasks.slnf - displayName: Build the MSBuild Tasks - # Build Unpackaged tests FIRST (self-contained .exe for direct execution) # Must build unpackaged BEFORE packaged so we can save the publish output # before the packaged build overwrites the artifacts/bin directory diff --git a/eng/pipelines/arcade/stage-helix-tests.yml b/eng/pipelines/arcade/stage-helix-tests.yml index e68215a92874..b6ca53a140ca 100644 --- a/eng/pipelines/arcade/stage-helix-tests.yml +++ b/eng/pipelines/arcade/stage-helix-tests.yml @@ -84,10 +84,14 @@ stages: - ${{ each pair in step }}: ${{ pair.key }}: ${{ pair.value }} - - script: $(_buildScript) -restore -build -configuration ${{ BuildConfiguration }} -projects "${{ parameters.buildTaskProjects }}" /p:ArchiveTests=false /p:TreatWarningsAsErrors=$(TreatWarningsAsErrors) /bl:$(Build.Arcade.LogsPath)${{ BuildConfiguration }}/buildtasks.binlog $(_OfficialBuildIdArgs) - displayName: 🛠️ Build BuildTasks + - script: dotnet cake --target=dotnet-buildtasks --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic + displayName: 🛠️ Provision SDK & Build BuildTasks + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) - - script: $(_msbuildCommand) "${{ parameters.helixProject }}" -warnAsError 0 -restore /p:Configuration=${{ BuildConfiguration }} /p:HelixInternal="${{ parameters.helixInternal }}" /p:TestRunNameSuffix="_${{ BuildConfiguration }}" /bl:$(Build.Arcade.LogsPath)${{ BuildConfiguration }}/helix_tests.binlog ${{ parameters.extraHelixArguments }} + - script: $(_msbuildCommand) "${{ parameters.helixProject }}" -warnAsError 0 -restore /p:Configuration=${{ BuildConfiguration }} /p:HelixInternal="${{ parameters.helixInternal }}" /p:TestRunNameSuffix="_${{ BuildConfiguration }}" /p:SkipInitInternalTooling=true /bl:$(Build.Arcade.LogsPath)${{ BuildConfiguration }}/helix_tests.binlog ${{ parameters.extraHelixArguments }} displayName: Run Helix Tests env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops diff --git a/eng/pipelines/arcade/stage-pack.yml b/eng/pipelines/arcade/stage-pack.yml index 22218a78f99d..b900bb5c754d 100644 --- a/eng/pipelines/arcade/stage-pack.yml +++ b/eng/pipelines/arcade/stage-pack.yml @@ -69,7 +69,14 @@ stages: - ${{ each pair in step }}: ${{ pair.key }}: ${{ pair.value }} - - script: $(_buildScriptMacOS) -restore -pack -configuration $(_BuildConfig) /bl:$(Build.Arcade.LogsPath)/$(_BuildConfig)/pack-mac.binlog $(_OfficialBuildIdArgs) + - script: dotnet cake --target=dotnet --configuration="$(_BuildConfig)" --verbosity=diagnostic + displayName: Provision SDK & Workloads + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) + + - script: $(_buildScriptMacOS) -restore -pack -configuration $(_BuildConfig) /p:SkipInitInternalTooling=true /bl:$(Build.Arcade.LogsPath)/$(_BuildConfig)/pack-mac.binlog $(_OfficialBuildIdArgs) displayName: Pack - task: CopyFiles@2 @@ -136,18 +143,25 @@ stages: artifact: MacNativeArtifacts path: '$(Build.SourcesDirectory)/artifacts/bin' + - script: dotnet cake --target=dotnet --configuration="$(_BuildConfig)" --verbosity=diagnostic + displayName: Provision SDK & Workloads + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) + # Run on public pipeline - ${{ if not(parameters.enableMicrobuild) }}: - - script: $(_buildScript) -restore -pack -publish $(_PublishArgs) -configuration $(_BuildConfig) /bl:$(Build.Arcade.LogsPath)/$(_BuildConfig)/pack.binlog $(_OfficialBuildIdArgs) + - script: $(_buildScript) -restore -pack -publish $(_PublishArgs) -configuration $(_BuildConfig) /p:SkipInitInternalTooling=true /bl:$(Build.Arcade.LogsPath)/$(_BuildConfig)/pack.binlog $(_OfficialBuildIdArgs) displayName: Pack & Publish # Run on internal pipeline - ${{ if and(not(parameters.runAsPublic) , parameters.enableMicrobuild) }}: - - script: $(_buildScript) -restore -pack -sign $(_SignArgs) -configuration $(_BuildConfig) /bl:$(Build.Arcade.LogsPath)/$(_BuildConfig)/pack.binlog $(_OfficialBuildIdArgs) + - script: $(_buildScript) -restore -pack -sign $(_SignArgs) -configuration $(_BuildConfig) /p:SkipInitInternalTooling=true /bl:$(Build.Arcade.LogsPath)/$(_BuildConfig)/pack.binlog $(_OfficialBuildIdArgs) displayName: Pack, Sign # only for workloads - - script: $(_buildScript) -restore -build -sign $(_SignArgs) -publish $(_PublishArgs) -configuration $(_BuildConfig) /bl:$(Build.Arcade.LogsPath)/$(_BuildConfig)/build-workloads.binlog -projects src/Workload/workloads.csproj $(_OfficialBuildIdArgs) + - script: $(_buildScript) -restore -build -sign $(_SignArgs) -publish $(_PublishArgs) -configuration $(_BuildConfig) /p:SkipInitInternalTooling=true /bl:$(Build.Arcade.LogsPath)/$(_BuildConfig)/build-workloads.binlog -projects src/Workload/workloads.csproj $(_OfficialBuildIdArgs) displayName: Build Workloads, Sign & Publish - task: CopyFiles@2 diff --git a/eng/pipelines/arcade/stage-unit-tests.yml b/eng/pipelines/arcade/stage-unit-tests.yml index 670151f7c37a..89ab8a58f756 100644 --- a/eng/pipelines/arcade/stage-unit-tests.yml +++ b/eng/pipelines/arcade/stage-unit-tests.yml @@ -35,8 +35,12 @@ stages: base64Encode: true outputVariableName: dotnetbuilds-internal-container-read-token-base64 - - script: ${{ job.buildScript }} -restore -build -configuration ${{ parameters.buildConfig }} -projects "${{ parameters.buildTaskProjects }}" /p:ArchiveTests=false /p:TreatWarningsAsErrors=$(TreatWarningsAsErrors) /bl:$(Build.Arcade.LogsPath)${{ parameters.buildConfig }}/buildtasks.binlog $(_OfficialBuildIdArgs) - displayName: 🛠️ Build BuildTasks + - script: dotnet cake --target=dotnet-buildtasks --configuration="${{ parameters.buildConfig }}" --verbosity=diagnostic + displayName: 🛠️ Provision SDK & Build BuildTasks + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) - template: /eng/pipelines/common/run-dotnet-preview.yml parameters: diff --git a/eng/pipelines/common/variables.yml b/eng/pipelines/common/variables.yml index 012613e07189..c6d5f3aefa2e 100644 --- a/eng/pipelines/common/variables.yml +++ b/eng/pipelines/common/variables.yml @@ -8,9 +8,9 @@ variables: - name: DOTNET_VERSION value: 10.0.100 - name: REQUIRED_XCODE - value: 26.2.0 + value: 26.4.0 - name: XCODE - value: 26.2 + value: 26.4 - name: POWERSHELL_VERSION value: 7.4.0 # Localization variables diff --git a/global.json b/global.json index 55ba66e9a3bb..ec11bf32b1c2 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "11.0.100-preview.3.26203.107" + "dotnet": "11.0.100-preview.4.26224.122" }, "sdk": { "paths": [ @@ -11,7 +11,7 @@ "msbuild-sdks": { "MSBuild.Sdk.Extras": "3.0.44", "Microsoft.Build.NoTargets": "3.7.0", - "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26203.107", - "Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26203.107" + "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26224.122", + "Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26224.122" } } diff --git a/src/DotNet/DotNet.csproj b/src/DotNet/DotNet.csproj index 5a7f6ca64f7c..fa4a3b3906ad 100644 --- a/src/DotNet/DotNet.csproj +++ b/src/DotNet/DotNet.csproj @@ -192,6 +192,23 @@ <_WorkloadIds Include="tizen" Condition=" '$(IncludeTizenTargetFrameworks)' == 'true' " /> + + + + <_AllManifestBands Include="$([System.IO.Directory]::GetDirectories('$(DotNetDirectory)sdk-manifests'))" /> + <_StaleManifestBands Include="@(_AllManifestBands)" Condition="'%(Filename)' != '$(DotNetSdkManifestsFolder)'" /> + + + + + @@ -210,7 +227,6 @@ <_WorkloadRestoreEnvVars Condition="$([MSBuild]::IsOSPlatform('osx'))">$(_WorkloadRestoreEnvVars);DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT=true - <_WorkloadDirectoriesToRemove Include="$(DotNetDirectory)sdk-manifests/$(DotNetVersionBand)" /> <_WorkloadDirectoriesToRemove Include="@(_PacksToRemove->'$(DotNetDirectory)sdk-manifests/$(DotNetSdkManifestsFolder)/%(Identity)')" /> From 77fe3caebcf041071459514eeb46bc91dd9e7e06 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 16:24:29 -0500 Subject: [PATCH 3/5] Revert .github changes from preview4 merge Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 8 -------- .github/instructions/android.instructions.md | 8 -------- .../skills/azdo-build-investigator/SKILL.md | 20 ------------------- 3 files changed, 36 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index d24b3a8f7707..0e7463cd64e8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -101,14 +101,6 @@ When referencing or triggering CI pipelines, use these current pipeline names: **⚠️ Old pipeline names** (e.g., `MAUI-UITests-public`, `MAUI-public`) are **outdated** and should NOT be used. Always use the names above. -### Gradle / Maven Dependency Failures (CFSClean) - -The official CI build uses CFSClean network isolation which blocks `repo.maven.apache.org`. All Gradle/Maven dependencies resolve through the `dotnet-public-maven` Azure Artifacts feed. - -**If CI fails with Gradle 401 errors** like `"No local versions of package"` or `"Please provide authentication to save package from upstream"`, it means a Maven package hasn't been ingested into the feed yet. **Fix:** run `./eng/ingest-maven-deps.sh` locally to pre-populate the feed. See `src/Core/AndroidNative/settings.gradle` for details. - -**Do NOT upgrade Gradle past 8.x** — the Android SDK's `net.android.init.gradle.kts` is incompatible with Gradle 9.x (`dotnet/android#10738`). - ### Code Formatting Always format code before committing: diff --git a/.github/instructions/android.instructions.md b/.github/instructions/android.instructions.md index 93d94cd3a19f..ba013f3c27a0 100644 --- a/.github/instructions/android.instructions.md +++ b/.github/instructions/android.instructions.md @@ -4,9 +4,6 @@ applyTo: - "**/Android/**/*.cs" - "**/Platforms/Android/**/*.cs" - "**/Platform/Android/**/*.cs" - - "**/AndroidNative/**" - - "eng/init.gradle" - - "eng/ingest-maven-deps.sh" --- # Android Platform Development Guidelines @@ -126,8 +123,3 @@ protected override void DisconnectHandler(RecyclerView platformView) | Listener not working | Check lifecycle (register/unregister) | | Memory leak | Ensure Dispose() called on Java.Lang.Object | | Threading error | Use `platformView.Post()` for UI thread | -| Gradle 401 / Maven dependency failure | Run `./eng/ingest-maven-deps.sh` — see `copilot-instructions.md` | - -## Gradle / Maven Dependency Failures - -CI uses CFSClean which blocks Maven Central. All deps go through the `dotnet-public-maven` Azure Artifacts feed. If a new package hasn't been ingested, CI fails with `XAGRDL0000` / 401. Run `./eng/ingest-maven-deps.sh` locally to fix. Do NOT upgrade Gradle past 8.x (`dotnet/android#10738`). diff --git a/.github/skills/azdo-build-investigator/SKILL.md b/.github/skills/azdo-build-investigator/SKILL.md index 0588abbabcc5..bd3ddc905332 100644 --- a/.github/skills/azdo-build-investigator/SKILL.md +++ b/.github/skills/azdo-build-investigator/SKILL.md @@ -66,26 +66,6 @@ If available, use the `mcp-binlog-tool` MCP server to analyze downloaded `.binlo | `error CS####` | `maui-pr` | C# compiler error — check file/line | | `error XA####` | `maui-pr` | Android build error | | `XamlC` | `maui-pr` | XAML compiler — usually missing type or bad binding | -| `error XAGRDL0000` / `401` / `No local versions` | `maui-pr` or official build | Gradle/Maven feed issue — see below | | `XHarness timeout` | `maui-pr-devicetests` Helix logs | Test killed by infrastructure; may be transient | | `No test result files found` | `maui-pr-devicetests` Helix logs | Tests never ran or app crashed on launch | | UI test screenshot diff | `maui-pr-uitests` | Visual regression; check baseline images | - -### Gradle / Maven / CFSClean Failures - -**Error signatures:** -``` -error XAGRDL0000: Could not resolve com.android.tools.build:gradle:8.11.1 - > Received status code 401: Unauthorized - No local versions of package -``` -``` -error XAGRDL0000: Could not GET '...pkgs.dev.azure.com/.../maven/v1/...' - > Unauthorized - Please provide authentication to save package from upstream -``` - -**Fix:** Tell the user to run `./eng/ingest-maven-deps.sh` locally to pre-ingest packages into the feed. - -**Do NOT:** -- Remove CFSClean from `ci-official.yml` — security compliance requirement -- Upgrade Gradle past 8.x — `dotnet/android#10738` -- Add `mavenCentral()` or `google()` back — use the Azure Artifacts feed From 6afb37f68bf6e4df444edaea671d1adaa03e6121 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 09:29:11 -0500 Subject: [PATCH 4/5] Bump XHarness to 11.0.0-prerelease.26230.4 (mlaunch 1.1.113) Includes Rolf's fix for mlaunch failing to launch apps on simulator with Xcode 26.4 (dotnet/xharness#1591). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 7eae4d9a5834..a06771ae3239 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -24,7 +24,7 @@ "rollForward": false }, "microsoft.dotnet.xharness.cli": { - "version": "11.0.0-prerelease.26107.1", + "version": "11.0.0-prerelease.26230.4", "commands": [ "xharness" ], diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 82ecd4e08faf..6710cb6e28df 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -157,17 +157,17 @@ https://github.com/dotnet/dotnet 48bd87d899e187fe0e4e2b81a7b4a65a37845213 - + https://github.com/dotnet/xharness - 31e0b8e08f57890f7b7004b93361d69cd4b21079 + 92962e5c46ac08a66ded4c5696209cc60f1a232f - + https://github.com/dotnet/xharness - 31e0b8e08f57890f7b7004b93361d69cd4b21079 + 92962e5c46ac08a66ded4c5696209cc60f1a232f - + https://github.com/dotnet/xharness - 31e0b8e08f57890f7b7004b93361d69cd4b21079 + 92962e5c46ac08a66ded4c5696209cc60f1a232f https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index f3b4da293e55..4fe082b2e121 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -138,9 +138,9 @@ <_HarfBuzzSharpVersion>8.3.0.1 <_SkiaSharpNativeAssetsVersion>0.0.0-commit.e57e2a11dac4ccc72bea52939dede49816842005.1728 7.0.120 - 11.0.0-prerelease.26064.3 - 11.0.0-prerelease.26064.3 - 11.0.0-prerelease.26064.3 + 11.0.0-prerelease.26230.4 + 11.0.0-prerelease.26230.4 + 11.0.0-prerelease.26230.4 0.9.2 2.0.0.4 1.3.0 From 419195ad286426582cc2a6fa2742d4fa50ba8e90 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 11:47:15 -0500 Subject: [PATCH 5/5] [release/11.0.1xx-preview4] Update dependencies from dotnet/dotnet, dotnet/macios (#35271) This pull request updates the following dependencies [marker]: <> (Begin:5ff6fff7-e896-44f6-b87f-673c4569f4a5) ## From https://github.com/dotnet/macios - **Subscription**: [5ff6fff7-e896-44f6-b87f-673c4569f4a5](https://maestro.dot.net/subscriptions?search=5ff6fff7-e896-44f6-b87f-673c4569f4a5) - **Build**: [20260501.3](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13990367) ([312733](https://maestro.dot.net/channel/9588/github:dotnet:macios/build/312733)) - **Date Produced**: May 1, 2026 8:08:10 AM UTC - **Commit**: [cbe42632ab063a8b23df492692f92beeeda68a16](https://github.com/dotnet/macios/commit/cbe42632ab063a8b23df492692f92beeeda68a16) - **Branch**: [release/11.0.1xx-preview4](https://github.com/dotnet/macios/tree/release/11.0.1xx-preview4) [DependencyUpdate]: <> (Begin) - **Dependency Updates**: - From [26.4.11511-net11-p4 to 26.4.11514-net11-p4][3] - Microsoft.iOS.Sdk.net11.0_26.4 - Microsoft.MacCatalyst.Sdk.net11.0_26.4 - Microsoft.macOS.Sdk.net11.0_26.4 - Microsoft.tvOS.Sdk.net11.0_26.4 [3]: https://github.com/dotnet/macios/compare/16dad2059b...cbe42632ab [DependencyUpdate]: <> (End) [marker]: <> (End:5ff6fff7-e896-44f6-b87f-673c4569f4a5) [marker]: <> (Begin:74f9a062-0c3c-4244-97f5-1bdef5ec5486) ## From https://github.com/dotnet/dotnet - **Subscription**: [74f9a062-0c3c-4244-97f5-1bdef5ec5486](https://maestro.dot.net/subscriptions?search=74f9a062-0c3c-4244-97f5-1bdef5ec5486) - **Build**: [20260430.15](https://dev.azure.com/dnceng/internal/_build/results?buildId=2964538) ([312694](https://maestro.dot.net/channel/9588/github:dotnet:dotnet/build/312694)) - **Date Produced**: May 1, 2026 3:25:05 AM UTC - **Commit**: [4370ea16341331f045fa9b89cc46e03aed27195c](https://github.com/dotnet/dotnet/commit/4370ea16341331f045fa9b89cc46e03aed27195c) - **Branch**: [release/11.0.1xx-preview4](https://github.com/dotnet/dotnet/tree/release/11.0.1xx-preview4) [DependencyUpdate]: <> (Begin) - **Dependency Updates**: - From [11.0.0-preview.4.26224.122 to 11.0.0-preview.4.26230.115][2] - Microsoft.AspNetCore.Authentication.Facebook - Microsoft.AspNetCore.Authentication.Google - Microsoft.AspNetCore.Authentication.MicrosoftAccount - Microsoft.AspNetCore.Authorization - Microsoft.AspNetCore.Components - Microsoft.AspNetCore.Components.Analyzers - Microsoft.AspNetCore.Components.Forms - Microsoft.AspNetCore.Components.Web - Microsoft.AspNetCore.Components.WebAssembly - Microsoft.AspNetCore.Components.WebAssembly.Server - Microsoft.AspNetCore.Components.WebView - Microsoft.AspNetCore.Metadata - Microsoft.Extensions.Configuration - Microsoft.Extensions.Configuration.Abstractions - Microsoft.Extensions.Configuration.Json - Microsoft.Extensions.DependencyInjection - Microsoft.Extensions.DependencyInjection.Abstractions - Microsoft.Extensions.FileProviders.Abstractions - Microsoft.Extensions.Hosting.Abstractions - Microsoft.Extensions.Logging - Microsoft.Extensions.Logging.Abstractions - Microsoft.Extensions.Logging.Console - Microsoft.Extensions.Logging.Debug - Microsoft.Extensions.Primitives - Microsoft.JSInterop - Microsoft.NETCore.App.Ref - From [11.0.0-beta.26224.122 to 11.0.0-beta.26230.115][2] - Microsoft.DotNet.Arcade.Sdk - Microsoft.DotNet.Build.Tasks.Feed - Microsoft.DotNet.Build.Tasks.Installers - Microsoft.DotNet.Build.Tasks.Workloads - Microsoft.DotNet.Helix.Sdk - Microsoft.DotNet.RemoteExecutor - Microsoft.DotNet.SharedFramework.Sdk - Microsoft.DotNet.XUnitExtensions - From [11.0.100-preview.4.26224.122 to 11.0.100-preview.4.26230.115][2] - Microsoft.NET.Sdk [2]: https://github.com/dotnet/dotnet/compare/48bd87d899...4370ea1634 [DependencyUpdate]: <> (End) [marker]: <> (End:74f9a062-0c3c-4244-97f5-1bdef5ec5486) [marker]: <> (Begin:Coherency Updates) ## Coherency Updates The following updates ensure that dependencies with a *CoherentParentDependency* attribute were produced in a build used as input to the parent dependency's build. See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview) [DependencyUpdate]: <> (Begin) - **Coherency Updates**: - **Microsoft.MacCatalyst.Sdk.net10.0_26.4**: from 26.4.10255 to 26.4.10259 (parent: Microsoft.MacCatalyst.Sdk.net11.0_26.4) - **Microsoft.macOS.Sdk.net10.0_26.4**: from 26.4.10255 to 26.4.10259 (parent: Microsoft.macOS.Sdk.net11.0_26.4) - **Microsoft.iOS.Sdk.net10.0_26.4**: from 26.4.10255 to 26.4.10259 (parent: Microsoft.iOS.Sdk.net11.0_26.4) - **Microsoft.tvOS.Sdk.net10.0_26.4**: from 26.4.10255 to 26.4.10259 (parent: Microsoft.tvOS.Sdk.net11.0_26.4) [DependencyUpdate]: <> (End) [marker]: <> (End:Coherency Updates) --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: GitHub Actions Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- NuGet.config | 3 +- eng/Version.Details.xml | 184 +++++++++++++++++++------------------- eng/Versions.props | 88 +++++++++--------- global.json | 6 +- 5 files changed, 142 insertions(+), 141 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 7eae4d9a5834..a06771ae3239 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -24,7 +24,7 @@ "rollForward": false }, "microsoft.dotnet.xharness.cli": { - "version": "11.0.0-prerelease.26107.1", + "version": "11.0.0-prerelease.26230.4", "commands": [ "xharness" ], diff --git a/NuGet.config b/NuGet.config index f5155d43ea6c..e99d2e51f7da 100644 --- a/NuGet.config +++ b/NuGet.config @@ -8,7 +8,8 @@ - + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 82ecd4e08faf..64ea3b944174 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,12 +1,12 @@ - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c https://github.com/dotnet/android @@ -17,157 +17,157 @@ https://github.com/dotnet/android e1d3646df9cb50b2a0924f5b67fa78f9750ae489 - + https://github.com/dotnet/macios - 16dad2059bd25ff2227e06de186abc31dd0dfe73 + cbe42632ab063a8b23df492692f92beeeda68a16 - + https://github.com/dotnet/macios - 16dad2059bd25ff2227e06de186abc31dd0dfe73 + cbe42632ab063a8b23df492692f92beeeda68a16 - + https://github.com/dotnet/macios - 16dad2059bd25ff2227e06de186abc31dd0dfe73 + cbe42632ab063a8b23df492692f92beeeda68a16 - + https://github.com/dotnet/macios - 16dad2059bd25ff2227e06de186abc31dd0dfe73 + cbe42632ab063a8b23df492692f92beeeda68a16 - + https://github.com/dotnet/macios - f1daf411a54b3c65b85ac245d0f24ea2ef315173 + 644ec02a86d927f38d214102bc94ba4162b13c4c - + https://github.com/dotnet/macios - f1daf411a54b3c65b85ac245d0f24ea2ef315173 + 644ec02a86d927f38d214102bc94ba4162b13c4c - + https://github.com/dotnet/macios - f1daf411a54b3c65b85ac245d0f24ea2ef315173 + 644ec02a86d927f38d214102bc94ba4162b13c4c - + https://github.com/dotnet/macios - f1daf411a54b3c65b85ac245d0f24ea2ef315173 + 644ec02a86d927f38d214102bc94ba4162b13c4c https://dev.azure.com/microsoft/ProjectReunion/_git/ProjectReunionInternal - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c https://github.com/dotnet/templating 3f4da9ced34942d83054e647f3b1d9d7dde281e8 - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/xharness - 31e0b8e08f57890f7b7004b93361d69cd4b21079 + 92962e5c46ac08a66ded4c5696209cc60f1a232f - + https://github.com/dotnet/xharness - 31e0b8e08f57890f7b7004b93361d69cd4b21079 + 92962e5c46ac08a66ded4c5696209cc60f1a232f - + https://github.com/dotnet/xharness - 31e0b8e08f57890f7b7004b93361d69cd4b21079 + 92962e5c46ac08a66ded4c5696209cc60f1a232f https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -175,37 +175,37 @@ - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c - + https://github.com/dotnet/dotnet - 48bd87d899e187fe0e4e2b81a7b4a65a37845213 + 4370ea16341331f045fa9b89cc46e03aed27195c diff --git a/eng/Versions.props b/eng/Versions.props index f3b4da293e55..7b6f4821f05b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -31,11 +31,11 @@ 10.0.20 - 11.0.100-preview.4.26224.122 + 11.0.100-preview.4.26230.115 $(MicrosoftNETSdkPackageVersion) 11.0.100-preview.3.26203.107 - 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26230.115 $(MicrosoftNETCoreAppRefPackageVersion) $(MicrosoftNETCoreAppRefPackageVersion) $(MicrosoftNETCoreAppRefPackageVersion) @@ -43,18 +43,18 @@ 1.0.0-prerelease.26153.1 $(MicrosoftNETCoreAppRefPackageVersion) - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 10.3.0 10.3.0 11.0.0-preview.2.26103.111 @@ -68,15 +68,15 @@ 36.1.53 $(MicrosoftNetSdkAndroidManifest100100PackageVersion) - 26.4.11511-net11-p4 - 26.4.11511-net11-p4 - 26.4.11511-net11-p4 - 26.4.11511-net11-p4 + 26.4.11514-net11-p4 + 26.4.11514-net11-p4 + 26.4.11514-net11-p4 + 26.4.11514-net11-p4 - 26.4.10255 - 26.4.10255 - 26.4.10255 - 26.4.10255 + 26.4.10259 + 26.4.10259 + 26.4.10259 + 26.4.10259 8.0.148 @@ -85,19 +85,19 @@ 1.3.2 1.0.3179.45 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 - 11.0.0-preview.4.26224.122 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 + 11.0.0-preview.4.26230.115 10.0.2 $(MicrosoftAspNetCorePackageVersion) @@ -138,22 +138,22 @@ <_HarfBuzzSharpVersion>8.3.0.1 <_SkiaSharpNativeAssetsVersion>0.0.0-commit.e57e2a11dac4ccc72bea52939dede49816842005.1728 7.0.120 - 11.0.0-prerelease.26064.3 - 11.0.0-prerelease.26064.3 - 11.0.0-prerelease.26064.3 + 11.0.0-prerelease.26230.4 + 11.0.0-prerelease.26230.4 + 11.0.0-prerelease.26230.4 0.9.2 2.0.0.4 1.3.0 0.9.0 4.2.3 9.0.0 - 11.0.0-beta.26224.122 - 11.0.0-beta.26224.122 - 11.0.0-beta.26224.122 - 11.0.0-beta.26224.122 + 11.0.0-beta.26230.115 + 11.0.0-beta.26230.115 + 11.0.0-beta.26230.115 + 11.0.0-beta.26230.115 1.1.87-gba258badda - 11.0.0-beta.26224.122 - 11.0.0-beta.26224.122 + 11.0.0-beta.26230.115 + 11.0.0-beta.26230.115 17.6.0 diff --git a/global.json b/global.json index ec11bf32b1c2..1923b067f9d1 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "11.0.100-preview.4.26224.122" + "dotnet": "11.0.100-preview.4.26230.115" }, "sdk": { "paths": [ @@ -11,7 +11,7 @@ "msbuild-sdks": { "MSBuild.Sdk.Extras": "3.0.44", "Microsoft.Build.NoTargets": "3.7.0", - "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26224.122", - "Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26224.122" + "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26230.115", + "Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26230.115" } }