From 28cab4f12f37b16df8a708179b5a2b6533ecb0ec Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Tue, 4 Nov 2025 20:21:38 +0000 Subject: [PATCH 01/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop build 20251104.3 On relative base path root Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 From Version 8.0.22 -> To Version 8.0.23 VS.Redist.Common.WindowsDesktop.SharedFramework.x64.8.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.8.0 From Version 8.0.22-servicing.25528.1 -> To Version 8.0.23-servicing.25554.3 --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NuGet.config b/NuGet.config index abc30a9e231f..afc2292a9f83 100644 --- a/NuGet.config +++ b/NuGet.config @@ -26,7 +26,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 715649bf2151..579dfd0158f7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -228,21 +228,21 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 4519b9f0e25cae3c6d06cbd80cae9d6bd5fb90f7 + 642451a62a0adf3370083747ab8bf3453f889311 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 4519b9f0e25cae3c6d06cbd80cae9d6bd5fb90f7 + 642451a62a0adf3370083747ab8bf3453f889311 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 4519b9f0e25cae3c6d06cbd80cae9d6bd5fb90f7 + 642451a62a0adf3370083747ab8bf3453f889311 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 4519b9f0e25cae3c6d06cbd80cae9d6bd5fb90f7 + 642451a62a0adf3370083747ab8bf3453f889311 https://dev.azure.com/dnceng/internal/_git/dotnet-wpf From 3ff05633eb5f03989537c5eaae98923228dbacf7 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Thu, 6 Nov 2025 04:50:29 +0000 Subject: [PATCH 02/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20251105.15 On relative base path root Microsoft.NET.HostModel , Microsoft.NETCore.Platforms , VS.Redist.Common.NetCore.SharedFramework.x64.8.0 , VS.Redist.Common.NetCore.TargetingPack.x64.8.0 From Version 8.0.22-servicing.25527.7 -> To Version 8.0.23-servicing.25555.15 Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver From Version 8.0.22 -> To Version 8.0.23 Dependency coherency updates On relative base path root Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100 From Version 8.0.22 -> To Version 8.0.22 (parent: Microsoft.NETCore.App.Runtime.win-x64) --- NuGet.config | 6 +++--- eng/Version.Details.xml | 38 +++++++++++++++++++------------------- eng/Versions.props | 12 ++++++------ 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/NuGet.config b/NuGet.config index afc2292a9f83..ea741fc63b18 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,7 +3,7 @@ - + @@ -20,7 +20,7 @@ - + @@ -59,7 +59,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 579dfd0158f7..0fc61adcc0c1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,46 +14,46 @@ 56b6fd07951fa6733694ed06accb8da0722f4c19 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a2266c728f63a494ccb6786d794da2df135030be + 2f6e04bea8740e3925c3f88137c6a6ee48acc903 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a2266c728f63a494ccb6786d794da2df135030be + 2f6e04bea8740e3925c3f88137c6a6ee48acc903 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a2266c728f63a494ccb6786d794da2df135030be + 2f6e04bea8740e3925c3f88137c6a6ee48acc903 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a2266c728f63a494ccb6786d794da2df135030be + 2f6e04bea8740e3925c3f88137c6a6ee48acc903 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a2266c728f63a494ccb6786d794da2df135030be + 2f6e04bea8740e3925c3f88137c6a6ee48acc903 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a2266c728f63a494ccb6786d794da2df135030be + 2f6e04bea8740e3925c3f88137c6a6ee48acc903 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a2266c728f63a494ccb6786d794da2df135030be + 2f6e04bea8740e3925c3f88137c6a6ee48acc903 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 81cabf2857a01351e5ab578947c7403a5b128ad1 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a2266c728f63a494ccb6786d794da2df135030be + 2f6e04bea8740e3925c3f88137c6a6ee48acc903 https://github.com/dotnet/emsdk - 9e37ff5ebf5f464d80bdae6ad9d24e7a01ee11f8 + 81d2833ee1bf80f65cae9957c1926993ce1a299f https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted @@ -200,9 +200,9 @@ https://github.com/microsoft/vstest aa59400b11e1aeee2e8af48928dbd48748a8bef9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a2266c728f63a494ccb6786d794da2df135030be + 2f6e04bea8740e3925c3f88137c6a6ee48acc903 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 3aabc0a546b8..f77efd4b347e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -49,18 +49,18 @@ - 8.0.22 - 8.0.22-servicing.25527.7 - 8.0.22 + 8.0.23 + 8.0.23-servicing.25555.15 + 8.0.23 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) 8.0.2 - 8.0.22 - 8.0.22-servicing.25527.7 + 8.0.23 + 8.0.23-servicing.25555.15 8.0.0 8.0.1 8.0.3 8.0.1 - 8.0.22 + 8.0.23 8.0.0 8.0.0 8.0.22 From 5a58fa50ceb01b55b1857ee89dc0c6061e6de093 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Fri, 7 Nov 2025 02:24:12 +0000 Subject: [PATCH 03/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251106.6 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.22-servicing.25528.8 -> To Version 8.0.23-servicing.25556.6 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.22 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 72 ++++++++++++++++++++--------------------- eng/Versions.props | 16 ++++----- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/NuGet.config b/NuGet.config index ea741fc63b18..b0931754d5ba 100644 --- a/NuGet.config +++ b/NuGet.config @@ -13,7 +13,7 @@ - + @@ -51,7 +51,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0fc61adcc0c1..187a07b44469 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn a77b6e41d030878096fa496e00e4c0dffe5af9f0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -248,50 +248,50 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-wpf 925e025a1ad14f0b6f094e5b2d5cc9f62ada294c - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 https://github.com/dotnet/razor @@ -306,21 +306,21 @@ https://github.com/dotnet/razor 4c8bb4ff79523da1aa8ffbf2834ede5118f73d60 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 https://github.com/dotnet/xdt @@ -437,9 +437,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ee417479933278bb5aadc5944706a96b5ef74a5d + 75b46925d4627997cda6be9550ce7b5b52f5d9a9 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index f77efd4b347e..a594bfa8eed5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,7 +63,7 @@ 8.0.23 8.0.0 8.0.0 - 8.0.22 + 8.0.23 8.0.0 8.0.0 8.0.0 @@ -170,13 +170,13 @@ - 8.0.22 - 8.0.22-servicing.25528.8 - 8.0.22-servicing.25528.8 - 8.0.22-servicing.25528.8 - 8.0.22-servicing.25528.8 - 8.0.22-servicing.25528.8 - 8.0.22 + 8.0.23 + 8.0.23-servicing.25556.6 + 8.0.23-servicing.25556.6 + 8.0.23-servicing.25556.6 + 8.0.23-servicing.25556.6 + 8.0.23-servicing.25556.6 + 8.0.23 From 00153ab5211097de753e3eac9bdfea4a9cc0465b Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Fri, 7 Nov 2025 05:26:20 +0000 Subject: [PATCH 04/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251106.12 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.22-servicing.25528.8 -> To Version 8.0.23-servicing.25556.12 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.22 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index b0931754d5ba..9013189c686e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -13,7 +13,7 @@ - + @@ -51,7 +51,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 187a07b44469..723d1b3bccae 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn a77b6e41d030878096fa496e00e4c0dffe5af9f0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 75b46925d4627997cda6be9550ce7b5b52f5d9a9 + cb26fd19215d539f43e3766d2abe9a413e1d4530 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index a594bfa8eed5..d3b7ccb52a23 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25556.6 - 8.0.23-servicing.25556.6 - 8.0.23-servicing.25556.6 - 8.0.23-servicing.25556.6 - 8.0.23-servicing.25556.6 + 8.0.23-servicing.25556.12 + 8.0.23-servicing.25556.12 + 8.0.23-servicing.25556.12 + 8.0.23-servicing.25556.12 + 8.0.23-servicing.25556.12 8.0.23 From 8c02c1ac11d0866a883be72db6b4a5adc5f91f41 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Fri, 7 Nov 2025 18:34:22 +0000 Subject: [PATCH 05/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop build 20251107.2 On relative base path root Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 From Version 8.0.22 -> To Version 8.0.23 VS.Redist.Common.WindowsDesktop.SharedFramework.x64.8.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.8.0 From Version 8.0.22-servicing.25528.1 -> To Version 8.0.23-servicing.25557.2 Dependency coherency updates On relative base path root Microsoft.NET.Sdk.WindowsDesktop From Version 8.0.22-servicing.25528.2 -> To Version 8.0.23-servicing.25556.3 (parent: Microsoft.WindowsDesktop.App.Ref) --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/NuGet.config b/NuGet.config index 9013189c686e..37830367930b 100644 --- a/NuGet.config +++ b/NuGet.config @@ -26,7 +26,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 723d1b3bccae..c5bcbcaf6527 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -230,23 +230,23 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 642451a62a0adf3370083747ab8bf3453f889311 + a0339fddada06465ca501505ddfa569f3fbd5160 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 642451a62a0adf3370083747ab8bf3453f889311 + a0339fddada06465ca501505ddfa569f3fbd5160 https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 642451a62a0adf3370083747ab8bf3453f889311 + a0339fddada06465ca501505ddfa569f3fbd5160 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 642451a62a0adf3370083747ab8bf3453f889311 + a0339fddada06465ca501505ddfa569f3fbd5160 - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf - 925e025a1ad14f0b6f094e5b2d5cc9f62ada294c + a60810132c016f0aba3898c67927feef3491264a https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index d3b7ccb52a23..7c9b7cd2561b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -186,7 +186,7 @@ - 8.0.22-servicing.25528.2 + 8.0.23-servicing.25556.3 From 4350dfcf7a37141d73400bc43ec986baeb8e66be Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Wed, 12 Nov 2025 02:15:53 +0000 Subject: [PATCH 06/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop build 20251111.2 On relative base path root Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 From Version 8.0.22 -> To Version 8.0.23 VS.Redist.Common.WindowsDesktop.SharedFramework.x64.8.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.8.0 From Version 8.0.22-servicing.25528.1 -> To Version 8.0.23-servicing.25561.2 --- NuGet.config | 4 ++-- eng/Version.Details.xml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NuGet.config b/NuGet.config index 37830367930b..c806baa89406 100644 --- a/NuGet.config +++ b/NuGet.config @@ -26,7 +26,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c5bcbcaf6527..c4011cb56808 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -230,19 +230,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - a0339fddada06465ca501505ddfa569f3fbd5160 + 8b84eee3aa75060f4f7916822c3da0fc40cfe229 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - a0339fddada06465ca501505ddfa569f3fbd5160 + 8b84eee3aa75060f4f7916822c3da0fc40cfe229 https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - a0339fddada06465ca501505ddfa569f3fbd5160 + 8b84eee3aa75060f4f7916822c3da0fc40cfe229 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - a0339fddada06465ca501505ddfa569f3fbd5160 + 8b84eee3aa75060f4f7916822c3da0fc40cfe229 https://dev.azure.com/dnceng/internal/_git/dotnet-wpf From acfedc1fc385ca3819a4f825ea32a59c612ba717 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Wed, 12 Nov 2025 02:37:16 +0000 Subject: [PATCH 07/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251111.10 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.22-servicing.25528.8 -> To Version 8.0.23-servicing.25561.10 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.22 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index c806baa89406..3b49702eb7a0 100644 --- a/NuGet.config +++ b/NuGet.config @@ -13,7 +13,7 @@ - + @@ -51,7 +51,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c4011cb56808..26c3362db960 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn a77b6e41d030878096fa496e00e4c0dffe5af9f0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - cb26fd19215d539f43e3766d2abe9a413e1d4530 + 10a8f3b30618f89d105c792210f6522584a4d235 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 7c9b7cd2561b..2ab90281af01 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25556.12 - 8.0.23-servicing.25556.12 - 8.0.23-servicing.25556.12 - 8.0.23-servicing.25556.12 - 8.0.23-servicing.25556.12 + 8.0.23-servicing.25561.10 + 8.0.23-servicing.25561.10 + 8.0.23-servicing.25561.10 + 8.0.23-servicing.25561.10 + 8.0.23-servicing.25561.10 8.0.23 From 6e7e51233cb5950c00bb27fb817599a295e6a90d Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Wed, 12 Nov 2025 23:03:23 +0000 Subject: [PATCH 08/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251112.9 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.22-servicing.25528.8 -> To Version 8.0.23-servicing.25562.9 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.22 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index 3b49702eb7a0..5d81b18a7319 100644 --- a/NuGet.config +++ b/NuGet.config @@ -13,7 +13,7 @@ - + @@ -51,7 +51,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 26c3362db960..268d500db8db 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn a77b6e41d030878096fa496e00e4c0dffe5af9f0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 10a8f3b30618f89d105c792210f6522584a4d235 + 4077b49215a8b76f632147ccdcc61f3db7b895a3 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 2ab90281af01..e7a516b6ab99 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25561.10 - 8.0.23-servicing.25561.10 - 8.0.23-servicing.25561.10 - 8.0.23-servicing.25561.10 - 8.0.23-servicing.25561.10 + 8.0.23-servicing.25562.9 + 8.0.23-servicing.25562.9 + 8.0.23-servicing.25562.9 + 8.0.23-servicing.25562.9 + 8.0.23-servicing.25562.9 8.0.23 From c5f02803ceda46c6a5902e11fe6bb23630382d06 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Mon, 24 Nov 2025 19:02:45 +0000 Subject: [PATCH 09/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop build 20251124.3 On relative base path root Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 From Version 8.0.23 -> To Version 8.0.23 VS.Redist.Common.WindowsDesktop.SharedFramework.x64.8.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.8.0 From Version 8.0.23-servicing.25561.2 -> To Version 8.0.23-servicing.25574.3 Dependency coherency updates On relative base path root Microsoft.NET.Sdk.WindowsDesktop From Version 8.0.23-servicing.25556.3 -> To Version 8.0.23-servicing.25570.3 (parent: Microsoft.WindowsDesktop.App.Ref) --- NuGet.config | 5 ++--- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/NuGet.config b/NuGet.config index 4f06e4715ae7..44e92378e031 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,7 +3,6 @@ - @@ -27,7 +26,7 @@ - + @@ -63,7 +62,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 69195a820e9f..d8288a598b6f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -230,23 +230,23 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 8b84eee3aa75060f4f7916822c3da0fc40cfe229 + cfa425b55483bd857f7108d8025623dc1074202d - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 8b84eee3aa75060f4f7916822c3da0fc40cfe229 + cfa425b55483bd857f7108d8025623dc1074202d https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 8b84eee3aa75060f4f7916822c3da0fc40cfe229 + cfa425b55483bd857f7108d8025623dc1074202d - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 8b84eee3aa75060f4f7916822c3da0fc40cfe229 + cfa425b55483bd857f7108d8025623dc1074202d - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf - a60810132c016f0aba3898c67927feef3491264a + 5ad26cb9d7420532ea7dabb3ce4eae39051f12b7 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index a3a157345fc7..c08b58d16a32 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -186,7 +186,7 @@ - 8.0.23-servicing.25556.3 + 8.0.23-servicing.25570.3 From ad11b34fd2c08840d14ab2e5fd0066e2a938cc37 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Mon, 24 Nov 2025 19:06:49 +0000 Subject: [PATCH 10/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251120.9 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.23-servicing.25562.9 -> To Version 8.0.23-servicing.25570.9 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index 44e92378e031..b0848a17f977 100644 --- a/NuGet.config +++ b/NuGet.config @@ -12,7 +12,7 @@ - + @@ -51,7 +51,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d8288a598b6f..632220001d65 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn a77b6e41d030878096fa496e00e4c0dffe5af9f0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4077b49215a8b76f632147ccdcc61f3db7b895a3 + d927412377d8ada49dfa2832dde74244a1c8feef https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index c08b58d16a32..cf3000dc16c2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25562.9 - 8.0.23-servicing.25562.9 - 8.0.23-servicing.25562.9 - 8.0.23-servicing.25562.9 - 8.0.23-servicing.25562.9 + 8.0.23-servicing.25570.9 + 8.0.23-servicing.25570.9 + 8.0.23-servicing.25570.9 + 8.0.23-servicing.25570.9 + 8.0.23-servicing.25570.9 8.0.23 From bc26284f7fa6ad5967c0bd32c305642a5e9d6106 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Wed, 26 Nov 2025 21:32:33 +0000 Subject: [PATCH 11/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20251126.7 On relative base path root Microsoft.NET.HostModel , Microsoft.NETCore.Platforms , VS.Redist.Common.NetCore.SharedFramework.x64.8.0 , VS.Redist.Common.NetCore.TargetingPack.x64.8.0 From Version 8.0.23-servicing.25555.15 -> To Version 8.0.23-servicing.25576.7 Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 ++-- eng/Version.Details.xml | 26 +++++++++++++------------- eng/Versions.props | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/NuGet.config b/NuGet.config index 54afeec061b3..b99fa0b35820 100644 --- a/NuGet.config +++ b/NuGet.config @@ -16,7 +16,7 @@ - + @@ -55,7 +55,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 74dea6d1b5e2..db15981e0617 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -16,32 +16,32 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2f6e04bea8740e3925c3f88137c6a6ee48acc903 + 3423649721e677e2789b5b84f09460258c865ab7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2f6e04bea8740e3925c3f88137c6a6ee48acc903 + 3423649721e677e2789b5b84f09460258c865ab7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2f6e04bea8740e3925c3f88137c6a6ee48acc903 + 3423649721e677e2789b5b84f09460258c865ab7 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2f6e04bea8740e3925c3f88137c6a6ee48acc903 + 3423649721e677e2789b5b84f09460258c865ab7 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2f6e04bea8740e3925c3f88137c6a6ee48acc903 + 3423649721e677e2789b5b84f09460258c865ab7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2f6e04bea8740e3925c3f88137c6a6ee48acc903 + 3423649721e677e2789b5b84f09460258c865ab7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2f6e04bea8740e3925c3f88137c6a6ee48acc903 + 3423649721e677e2789b5b84f09460258c865ab7 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -49,7 +49,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2f6e04bea8740e3925c3f88137c6a6ee48acc903 + 3423649721e677e2789b5b84f09460258c865ab7 https://github.com/dotnet/emsdk @@ -202,7 +202,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2f6e04bea8740e3925c3f88137c6a6ee48acc903 + 3423649721e677e2789b5b84f09460258c865ab7 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 63c318f31277..dd24307c55dc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -50,12 +50,12 @@ 8.0.23 - 8.0.23-servicing.25555.15 + 8.0.23-servicing.25576.7 8.0.23 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) 8.0.2 8.0.23 - 8.0.23-servicing.25555.15 + 8.0.23-servicing.25576.7 8.0.0 8.0.1 8.0.3 From c0e7212fff313a8e58f91c5b7e83b279da6322f1 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Wed, 26 Nov 2025 23:39:39 +0000 Subject: [PATCH 12/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20251126.11 On relative base path root Microsoft.NET.HostModel , Microsoft.NETCore.Platforms , VS.Redist.Common.NetCore.SharedFramework.x64.8.0 , VS.Redist.Common.NetCore.TargetingPack.x64.8.0 From Version 8.0.23-servicing.25555.15 -> To Version 8.0.23-servicing.25576.11 Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 ++-- eng/Version.Details.xml | 26 +++++++++++++------------- eng/Versions.props | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/NuGet.config b/NuGet.config index b99fa0b35820..607fe57bcd88 100644 --- a/NuGet.config +++ b/NuGet.config @@ -16,7 +16,7 @@ - + @@ -55,7 +55,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index db15981e0617..42b7a309a4fa 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -16,32 +16,32 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3423649721e677e2789b5b84f09460258c865ab7 + 06f15fd947d0235d30adab97aa915211af489520 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3423649721e677e2789b5b84f09460258c865ab7 + 06f15fd947d0235d30adab97aa915211af489520 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3423649721e677e2789b5b84f09460258c865ab7 + 06f15fd947d0235d30adab97aa915211af489520 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3423649721e677e2789b5b84f09460258c865ab7 + 06f15fd947d0235d30adab97aa915211af489520 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3423649721e677e2789b5b84f09460258c865ab7 + 06f15fd947d0235d30adab97aa915211af489520 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3423649721e677e2789b5b84f09460258c865ab7 + 06f15fd947d0235d30adab97aa915211af489520 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3423649721e677e2789b5b84f09460258c865ab7 + 06f15fd947d0235d30adab97aa915211af489520 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -49,7 +49,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3423649721e677e2789b5b84f09460258c865ab7 + 06f15fd947d0235d30adab97aa915211af489520 https://github.com/dotnet/emsdk @@ -202,7 +202,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3423649721e677e2789b5b84f09460258c865ab7 + 06f15fd947d0235d30adab97aa915211af489520 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index dd24307c55dc..ea212c19e86a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -50,12 +50,12 @@ 8.0.23 - 8.0.23-servicing.25576.7 + 8.0.23-servicing.25576.11 8.0.23 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) 8.0.2 8.0.23 - 8.0.23-servicing.25576.7 + 8.0.23-servicing.25576.11 8.0.0 8.0.1 8.0.3 From 43093b6ea818454cb164bebbaf300cfffe22a4f8 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Thu, 4 Dec 2025 22:24:43 +0000 Subject: [PATCH 13/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20251204.14 On relative base path root Microsoft.NET.HostModel , Microsoft.NETCore.Platforms , VS.Redist.Common.NetCore.SharedFramework.x64.8.0 , VS.Redist.Common.NetCore.TargetingPack.x64.8.0 From Version 8.0.23-servicing.25555.15 -> To Version 8.0.23-servicing.25604.14 Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 ++-- eng/Version.Details.xml | 26 +++++++++++++------------- eng/Versions.props | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/NuGet.config b/NuGet.config index 607fe57bcd88..be1144172885 100644 --- a/NuGet.config +++ b/NuGet.config @@ -16,7 +16,7 @@ - + @@ -55,7 +55,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 42b7a309a4fa..3e019485d38a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -16,32 +16,32 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 06f15fd947d0235d30adab97aa915211af489520 + 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 06f15fd947d0235d30adab97aa915211af489520 + 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 06f15fd947d0235d30adab97aa915211af489520 + 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 06f15fd947d0235d30adab97aa915211af489520 + 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 06f15fd947d0235d30adab97aa915211af489520 + 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 06f15fd947d0235d30adab97aa915211af489520 + 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 06f15fd947d0235d30adab97aa915211af489520 + 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -49,7 +49,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 06f15fd947d0235d30adab97aa915211af489520 + 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 https://github.com/dotnet/emsdk @@ -202,7 +202,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 06f15fd947d0235d30adab97aa915211af489520 + 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index ea212c19e86a..5d847b374003 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -50,12 +50,12 @@ 8.0.23 - 8.0.23-servicing.25576.11 + 8.0.23-servicing.25604.14 8.0.23 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) 8.0.2 8.0.23 - 8.0.23-servicing.25576.11 + 8.0.23-servicing.25604.14 8.0.0 8.0.1 8.0.3 From 86be6059b34be34b6379fabaac860b3f07c3024d Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Thu, 4 Dec 2025 22:33:21 +0000 Subject: [PATCH 14/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251204.5 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.23-servicing.25570.9 -> To Version 8.0.23-servicing.25604.5 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index be1144172885..e0b11f082984 100644 --- a/NuGet.config +++ b/NuGet.config @@ -8,7 +8,7 @@ - + @@ -47,7 +47,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3e019485d38a..ca53e033dc1f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn 38896ab4e7cee896fcde8a4e26914a777c794e3b - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - d927412377d8ada49dfa2832dde74244a1c8feef + ab2bbaeb1de821489b7f3b2a84171becbe7f3563 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 5d847b374003..8c69af06b4f5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25570.9 - 8.0.23-servicing.25570.9 - 8.0.23-servicing.25570.9 - 8.0.23-servicing.25570.9 - 8.0.23-servicing.25570.9 + 8.0.23-servicing.25604.5 + 8.0.23-servicing.25604.5 + 8.0.23-servicing.25604.5 + 8.0.23-servicing.25604.5 + 8.0.23-servicing.25604.5 8.0.23 From c40d06c871533ccc9b24b00715a0f4d23844b1aa Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Thu, 4 Dec 2025 23:24:36 +0000 Subject: [PATCH 15/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop build 20251204.3 On relative base path root Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 From Version 8.0.23 -> To Version 8.0.23 VS.Redist.Common.WindowsDesktop.SharedFramework.x64.8.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.8.0 From Version 8.0.23-servicing.25574.3 -> To Version 8.0.23-servicing.25604.3 Dependency coherency updates On relative base path root Microsoft.NET.Sdk.WindowsDesktop From Version 8.0.23-servicing.25570.3 -> To Version 8.0.23-servicing.25604.5 (parent: Microsoft.WindowsDesktop.App.Ref) --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/NuGet.config b/NuGet.config index e0b11f082984..55ef9a463d84 100644 --- a/NuGet.config +++ b/NuGet.config @@ -22,7 +22,7 @@ - + @@ -58,7 +58,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ca53e033dc1f..e2022c578ab2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -230,23 +230,23 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - cfa425b55483bd857f7108d8025623dc1074202d + b913cde8b86485bfaf159cbdb3fe48b28819206a - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - cfa425b55483bd857f7108d8025623dc1074202d + b913cde8b86485bfaf159cbdb3fe48b28819206a https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - cfa425b55483bd857f7108d8025623dc1074202d + b913cde8b86485bfaf159cbdb3fe48b28819206a - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - cfa425b55483bd857f7108d8025623dc1074202d + b913cde8b86485bfaf159cbdb3fe48b28819206a - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf - 5ad26cb9d7420532ea7dabb3ce4eae39051f12b7 + 5e01ea78bc84fcfcb6efef9ca2fde4d598a2ea88 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 8c69af06b4f5..0add51ad64d3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -186,7 +186,7 @@ - 8.0.23-servicing.25570.3 + 8.0.23-servicing.25604.5 From f55d1bf0f3d0baa2ca5a294e6f63f50060e5e0dd Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Fri, 5 Dec 2025 01:10:30 +0000 Subject: [PATCH 16/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251204.11 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.23-servicing.25570.9 -> To Version 8.0.23-servicing.25604.11 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index 55ef9a463d84..1928b5bac4f4 100644 --- a/NuGet.config +++ b/NuGet.config @@ -8,7 +8,7 @@ - + @@ -47,7 +47,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e2022c578ab2..e3da4c66b3d9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn 38896ab4e7cee896fcde8a4e26914a777c794e3b - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ab2bbaeb1de821489b7f3b2a84171becbe7f3563 + c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 0add51ad64d3..8507cb0a40dd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25604.5 - 8.0.23-servicing.25604.5 - 8.0.23-servicing.25604.5 - 8.0.23-servicing.25604.5 - 8.0.23-servicing.25604.5 + 8.0.23-servicing.25604.11 + 8.0.23-servicing.25604.11 + 8.0.23-servicing.25604.11 + 8.0.23-servicing.25604.11 + 8.0.23-servicing.25604.11 8.0.23 From 686b1a671c88a15bfd4ea160269f20dfd83156e4 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Fri, 5 Dec 2025 04:01:02 +0000 Subject: [PATCH 17/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251204.17 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.23-servicing.25570.9 -> To Version 8.0.23-servicing.25604.17 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index 1928b5bac4f4..71e3b7c1dc63 100644 --- a/NuGet.config +++ b/NuGet.config @@ -8,7 +8,7 @@ - + @@ -47,7 +47,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e3da4c66b3d9..56b721d5a8a2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn 38896ab4e7cee896fcde8a4e26914a777c794e3b - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c449cb8951dd0a58df46f4cfb2cb4bd06bbc78ea + ba36999317e30bc67bab0ea8387e3bc3c609e855 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 8507cb0a40dd..3d1f785b76dc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25604.11 - 8.0.23-servicing.25604.11 - 8.0.23-servicing.25604.11 - 8.0.23-servicing.25604.11 - 8.0.23-servicing.25604.11 + 8.0.23-servicing.25604.17 + 8.0.23-servicing.25604.17 + 8.0.23-servicing.25604.17 + 8.0.23-servicing.25604.17 + 8.0.23-servicing.25604.17 8.0.23 From 9924b6155c6dfa469d9f83617de8278ce711b2de Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Fri, 5 Dec 2025 18:47:55 +0000 Subject: [PATCH 18/29] Merged PR 55868: Configure SB leg to use container The source build leg in the CI pipeline is failing in the `Generate delegation SAS Token` step: ``` ##[error]Azure CLI 2.x is not installed on this machine. ##[error]Script failed with error: Error: Unable to locate executable file: 'az'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable. ``` This is caused by switch in the distro version of the agent from Mariner 2.0 to Azure Linux 3.0 and the Azure Linux 3.0 image doesn't contain the Azure CLI. However, the job should really be using the SB container image, not directly on the build agent. These changes fix the configuration to run the job in a container. It was misconfigured before because the image needs to be defined as a pipeline resource. ---- #### AI description (iteration 1) #### PR Classification Configuration update to utilize containers for the SB leg in the CI pipeline. #### PR Summary This PR restructures the CI configuration by defining a container alias and updating its usage in the platform settings. - `.vsts-ci.yml`: Added a `containers` section with the `sourceBuildManagedContainer` definition. - `.vsts-ci.yml`: Modified the platform configuration to reference `sourceBuildManagedContainer` instead of a direct image URL. --- .vsts-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index df58ec2eb3aa..0f03e03a8e12 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -64,6 +64,9 @@ extends: name: $(DncEngInternalBuildPool) image: 1es-windows-2022 os: windows + containers: + sourceBuildManagedContainer: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9 stages: - stage: build displayName: Build @@ -120,7 +123,7 @@ extends: enableInternalSources: true platform: name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9' + container: sourceBuildManagedContainer - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - template: /eng/build.yml@self parameters: From a0e924d11b332bc15f3be3ce57eae15c7e56cb17 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Mon, 8 Dec 2025 22:04:45 +0000 Subject: [PATCH 19/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251208.2 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.23-servicing.25604.17 -> To Version 8.0.23-servicing.25608.2 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index bf2304fb9099..74a73435a56a 100644 --- a/NuGet.config +++ b/NuGet.config @@ -8,7 +8,7 @@ - + @@ -47,7 +47,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 098bbbcec7a4..2d2deb7c0526 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn 38896ab4e7cee896fcde8a4e26914a777c794e3b - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - ba36999317e30bc67bab0ea8387e3bc3c609e855 + 6b7eb7c417e1c31e459c4899adef06844cfba703 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 646e8b721728..96941fe9fb1e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25604.17 - 8.0.23-servicing.25604.17 - 8.0.23-servicing.25604.17 - 8.0.23-servicing.25604.17 - 8.0.23-servicing.25604.17 + 8.0.23-servicing.25608.2 + 8.0.23-servicing.25608.2 + 8.0.23-servicing.25608.2 + 8.0.23-servicing.25608.2 + 8.0.23-servicing.25608.2 8.0.23 From ef2c48da76723706bb28567741c9805fe7fb85b7 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Tue, 9 Dec 2025 00:45:41 +0000 Subject: [PATCH 20/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20251206.7 On relative base path root Microsoft.NET.HostModel , Microsoft.NETCore.Platforms , VS.Redist.Common.NetCore.SharedFramework.x64.8.0 , VS.Redist.Common.NetCore.TargetingPack.x64.8.0 From Version 8.0.23-servicing.25604.14 -> To Version 8.0.23-servicing.25606.7 Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver From Version 8.0.23 -> To Version 8.0.23 Dependency coherency updates On relative base path root Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100 From Version 8.0.22 -> To Version 8.0.23 (parent: Microsoft.NETCore.App.Runtime.win-x64) --- NuGet.config | 5 +++-- eng/Version.Details.xml | 30 +++++++++++++++--------------- eng/Versions.props | 6 +++--- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/NuGet.config b/NuGet.config index 74a73435a56a..5b413a9802ed 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,6 +3,7 @@ + @@ -16,7 +17,7 @@ - + @@ -55,7 +56,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2d2deb7c0526..7b0e28b0b54a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -16,32 +16,32 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 + c96cd11cb2f0c204f272b2280082a329aee24cf7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 + c96cd11cb2f0c204f272b2280082a329aee24cf7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 + c96cd11cb2f0c204f272b2280082a329aee24cf7 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 + c96cd11cb2f0c204f272b2280082a329aee24cf7 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 + c96cd11cb2f0c204f272b2280082a329aee24cf7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 + c96cd11cb2f0c204f272b2280082a329aee24cf7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 + c96cd11cb2f0c204f272b2280082a329aee24cf7 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -49,11 +49,11 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 + c96cd11cb2f0c204f272b2280082a329aee24cf7 - + https://github.com/dotnet/emsdk - 81d2833ee1bf80f65cae9957c1926993ce1a299f + 87f89d77d2eb70ed29b3e0f37cfbf28bfd49c536 https://github.com/dotnet/msbuild @@ -202,7 +202,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1c1ec94ea2a2583b20af6b042c61bf8b108248b3 + c96cd11cb2f0c204f272b2280082a329aee24cf7 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 96941fe9fb1e..53cfabc5e38c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -50,12 +50,12 @@ 8.0.23 - 8.0.23-servicing.25604.14 + 8.0.23-servicing.25606.7 8.0.23 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) 8.0.2 8.0.23 - 8.0.23-servicing.25604.14 + 8.0.23-servicing.25606.7 8.0.0 8.0.1 8.0.3 @@ -230,7 +230,7 @@ - 8.0.22 + 8.0.23 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100PackageVersion) 8.0.100$([System.Text.RegularExpressions.Regex]::Match($(EmscriptenWorkloadManifestVersion), `-rtm|-[A-z]*\.*\d*`)) From a5361811e6ba01af81f7bf6f1e0accc8b28e30a9 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Tue, 9 Dec 2025 03:41:28 +0000 Subject: [PATCH 21/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251208.9 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.23-servicing.25604.17 -> To Version 8.0.23-servicing.25608.9 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index 5b413a9802ed..1e95064f87bc 100644 --- a/NuGet.config +++ b/NuGet.config @@ -9,7 +9,7 @@ - + @@ -48,7 +48,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7b0e28b0b54a..88d87b942b3d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn 38896ab4e7cee896fcde8a4e26914a777c794e3b - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 6b7eb7c417e1c31e459c4899adef06844cfba703 + 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 53cfabc5e38c..959566177fd6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25608.2 - 8.0.23-servicing.25608.2 - 8.0.23-servicing.25608.2 - 8.0.23-servicing.25608.2 - 8.0.23-servicing.25608.2 + 8.0.23-servicing.25608.9 + 8.0.23-servicing.25608.9 + 8.0.23-servicing.25608.9 + 8.0.23-servicing.25608.9 + 8.0.23-servicing.25608.9 8.0.23 From c266609b1ca3ad5b82e08c924875d12877c73f86 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Tue, 9 Dec 2025 20:16:14 +0000 Subject: [PATCH 22/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop build 20251209.2 On relative base path root Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 From Version 8.0.23 -> To Version 8.0.23 VS.Redist.Common.WindowsDesktop.SharedFramework.x64.8.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.8.0 From Version 8.0.23-servicing.25604.3 -> To Version 8.0.23-servicing.25609.2 Dependency coherency updates On relative base path root Microsoft.NET.Sdk.WindowsDesktop From Version 8.0.23-servicing.25604.5 -> To Version 8.0.23-servicing.25609.4 (parent: Microsoft.WindowsDesktop.App.Ref) --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/NuGet.config b/NuGet.config index 1e95064f87bc..16b9dd160443 100644 --- a/NuGet.config +++ b/NuGet.config @@ -23,7 +23,7 @@ - + @@ -59,7 +59,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 88d87b942b3d..266d68261739 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -230,23 +230,23 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - b913cde8b86485bfaf159cbdb3fe48b28819206a + 0167058c735054c0f948ca3925c693a958875427 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - b913cde8b86485bfaf159cbdb3fe48b28819206a + 0167058c735054c0f948ca3925c693a958875427 https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - b913cde8b86485bfaf159cbdb3fe48b28819206a + 0167058c735054c0f948ca3925c693a958875427 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - b913cde8b86485bfaf159cbdb3fe48b28819206a + 0167058c735054c0f948ca3925c693a958875427 - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf - 5e01ea78bc84fcfcb6efef9ca2fde4d598a2ea88 + b132b33a48ebc857db94785fdd86d671d123911a https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 959566177fd6..3b716a2af89a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -186,7 +186,7 @@ - 8.0.23-servicing.25604.5 + 8.0.23-servicing.25609.4 From a6918566f0dd78ae1c558495cf8cd4412508c3ce Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Wed, 10 Dec 2025 17:49:00 +0000 Subject: [PATCH 23/29] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20251209.5 On relative base path root dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0 From Version 8.0.23-servicing.25608.9 -> To Version 8.0.23-servicing.25609.5 Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.ObjectPool , Microsoft.JSInterop From Version 8.0.23 -> To Version 8.0.23 --- NuGet.config | 4 +-- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 10 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NuGet.config b/NuGet.config index 16b9dd160443..ecd9226c537e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -9,7 +9,7 @@ - + @@ -48,7 +48,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 276e09997350..dcea8529c988 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -111,13 +111,13 @@ https://github.com/dotnet/roslyn 38896ab4e7cee896fcde8a4e26914a777c794e3b - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -250,48 +250,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 https://github.com/dotnet/razor @@ -308,19 +308,19 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 https://github.com/dotnet/xdt @@ -439,7 +439,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 5fb2dbe1ec6e5cdd560714349bb5bde1ad4cff80 + 568fff703254def7dcd35fda9892bf702d4c81d3 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 7de0123edbc2..14173d1b31d7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,11 +171,11 @@ 8.0.23 - 8.0.23-servicing.25608.9 - 8.0.23-servicing.25608.9 - 8.0.23-servicing.25608.9 - 8.0.23-servicing.25608.9 - 8.0.23-servicing.25608.9 + 8.0.23-servicing.25609.5 + 8.0.23-servicing.25609.5 + 8.0.23-servicing.25609.5 + 8.0.23-servicing.25609.5 + 8.0.23-servicing.25609.5 8.0.23 From 7a5391d7c919b6f4532455066c3c0edaebe2a5a6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 10:37:35 -0800 Subject: [PATCH 24/29] [release/8.0.1xx] Update dependencies from dotnet/razor (#52454) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 94e58efffbea..f3cd3e4d8422 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -293,18 +293,18 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore ee417479933278bb5aadc5944706a96b5ef74a5d - + https://github.com/dotnet/razor - a36694712be3000f238f25e52f11e6225dda5f9b + e137c0322ddb9e3d4f4a5de385647baa9719f9a6 - + https://github.com/dotnet/razor - a36694712be3000f238f25e52f11e6225dda5f9b + e137c0322ddb9e3d4f4a5de385647baa9719f9a6 - + https://github.com/dotnet/razor - a36694712be3000f238f25e52f11e6225dda5f9b + e137c0322ddb9e3d4f4a5de385647baa9719f9a6 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 1b62ad7f049c..67b55868c06a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -180,9 +180,9 @@ - 7.0.0-preview.25628.11 - 7.0.0-preview.25628.11 - 7.0.0-preview.25628.11 + 7.0.0-preview.26064.3 + 7.0.0-preview.26064.3 + 7.0.0-preview.26064.3 From 6f9b68e2f1e6a9d19c7e3ef72ba275310a027a17 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Sun, 18 Jan 2026 10:59:33 -0500 Subject: [PATCH 25/29] Disable workload resolver tests on Full Framework for 8.0 --- .../WorkloadTests.cs | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Tests/Microsoft.NET.Build.Tests/WorkloadTests.cs b/src/Tests/Microsoft.NET.Build.Tests/WorkloadTests.cs index aa93bbfd6667..b4f588b76aef 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/WorkloadTests.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/WorkloadTests.cs @@ -11,7 +11,8 @@ public WorkloadTests(ITestOutputHelper log) : base(log) { } - [Fact] + // Changing these tests to core MSBuild only for 8.0 since there were weird test failures and the Full Framework resolver doesn't ship from 8.0 into Visual Studio anymore. + [CoreMSBuildOnlyFact] public void It_should_build_with_workload() { var testProject = new TestProject() @@ -29,7 +30,7 @@ public void It_should_build_with_workload() .Pass(); } - [Fact] + [CoreMSBuildOnlyFact] public void It_should_fail_without_workload() { var testProject = new TestProject() @@ -49,7 +50,7 @@ public void It_should_fail_without_workload() .HaveStdOutContaining("NETSDK1147"); } - [Fact] + [CoreMSBuildOnlyFact] public void It_should_create_suggested_workload_items() { var testProject = new TestProject() @@ -80,7 +81,7 @@ public void It_should_create_suggested_workload_items() .BeEquivalentTo(new[] { ("microsoft-net-sdk-missingtestworkload", "microsoft.net.sdk.missingtestworkload") }); } - [Fact] + [CoreMSBuildOnlyFact] public void It_should_fail_to_restore_without_workload_when_multitargeted() { var testProject = new TestProject() @@ -107,7 +108,7 @@ public void It_should_fail_to_restore_without_workload_when_multitargeted() // .HaveStdOutContaining("android"); } - [Fact(Skip = "https://github.com/dotnet/sdk/issues/19866")] + [CoreMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/19866")] public void It_should_fail_to_build_without_workload_when_multitargeted() { var testProject = new TestProject() @@ -129,7 +130,7 @@ public void It_should_fail_to_build_without_workload_when_multitargeted() .HaveStdOutContaining("android"); } - [Fact] + [CoreMSBuildOnlyFact] public void It_should_fail_to_build_when_multitargeted_to_unknown_platforms() { var testProject = new TestProject() @@ -150,7 +151,7 @@ public void It_should_fail_to_build_when_multitargeted_to_unknown_platforms() } - [Fact] + [CoreMSBuildOnlyFact] public void It_should_fail_with_resolver_disabled() { var testProject = new TestProject() @@ -172,7 +173,7 @@ public void It_should_fail_with_resolver_disabled() .HaveStdOutContaining("NETSDK1208"); } - [Fact] + [CoreMSBuildOnlyFact] public void It_should_import_AutoImports_for_installed_workloads() { var testProject = new TestProject() @@ -198,7 +199,7 @@ public void It_should_import_AutoImports_for_installed_workloads() .BeEquivalentTo("true"); } - [Fact] + [CoreMSBuildOnlyFact] public void It_should_import_aliased_pack() { var testProject = new TestProject() @@ -227,7 +228,7 @@ public void It_should_import_aliased_pack() .BeEquivalentTo("true"); } - [Fact(Skip = "https://github.com/dotnet/sdk/issues/19866")] + [CoreMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/19866")] public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target() { var mainProject = new TestProject() @@ -255,7 +256,7 @@ public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target() .BeEquivalentTo("android"); } - [Theory(Skip = "https://github.com/dotnet/installer/issues/13361")] + [CoreMSBuildOnlyTheory(Skip = "https://github.com/dotnet/installer/issues/13361")] [InlineData($"{ToolsetInfo.CurrentTargetFramework}-android;{ToolsetInfo.CurrentTargetFramework}-ios", $"{ToolsetInfo.CurrentTargetFramework}-android;{ToolsetInfo.CurrentTargetFramework}-ios", "android;android-aot")] [InlineData(ToolsetInfo.CurrentTargetFramework, $"{ToolsetInfo.CurrentTargetFramework};{ToolsetInfo.CurrentTargetFramework}-android;{ToolsetInfo.CurrentTargetFramework}-ios", "macos;android-aot")] [InlineData($"{ToolsetInfo.CurrentTargetFramework};{ToolsetInfo.CurrentTargetFramework}-ios", $"{ToolsetInfo.CurrentTargetFramework};{ToolsetInfo.CurrentTargetFramework}-android", "macos;android-aot")] From 09d134444ee5e55e120f5ac9db70d22d5479996b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 20:19:19 +0000 Subject: [PATCH 26/29] Reset files to release/8.0.4xx Reset patterns: - global.json - NuGet.config - eng/Version.Details.xml - eng/Versions.props - eng/common/* --- NuGet.config | 13 ++- eng/Version.Details.xml | 212 ++++++++++++++++++++-------------------- eng/Versions.props | 95 +++++++++--------- 3 files changed, 162 insertions(+), 158 deletions(-) diff --git a/NuGet.config b/NuGet.config index 60dbe4113340..a15c8be96590 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,3 +1,4 @@ + @@ -6,13 +7,12 @@ - + - @@ -20,11 +20,13 @@ - + + + @@ -50,16 +52,17 @@ - + - + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8011db07203c..3e075aa26930 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,17 @@ - + https://github.com/dotnet/templating - c60b810b74b2e1dad8159cd33363483c07195f41 + 13c6760d66f74bfb5c8ce8343cf4c5d8f7471584 - + https://github.com/dotnet/templating - c60b810b74b2e1dad8159cd33363483c07195f41 + 13c6760d66f74bfb5c8ce8343cf4c5d8f7471584 - + https://github.com/dotnet/templating - c60b810b74b2e1dad8159cd33363483c07195f41 + 13c6760d66f74bfb5c8ce8343cf4c5d8f7471584 @@ -55,61 +55,61 @@ https://github.com/dotnet/emsdk 87f89d77d2eb70ed29b3e0f37cfbf28bfd49c536 - - https://github.com/dotnet/msbuild - 7806cbf7b0fd91ea6ab55c2e42d8ed973114e197 + + https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted + 02bf66295b64ab368d12933041f7281aad186a2d - - https://github.com/dotnet/msbuild - 7806cbf7b0fd91ea6ab55c2e42d8ed973114e197 + + https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted + 02bf66295b64ab368d12933041f7281aad186a2d - - https://github.com/dotnet/msbuild - 7806cbf7b0fd91ea6ab55c2e42d8ed973114e197 + + https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted + 02bf66295b64ab368d12933041f7281aad186a2d - + https://github.com/dotnet/fsharp - fc5e9eda234e2b69aa479f4f83faddc31fdd4da7 + e11d7079bebc6f101c5313fe0d1de9e3d38a7c02 - + https://github.com/dotnet/fsharp - fc5e9eda234e2b69aa479f4f83faddc31fdd4da7 + e11d7079bebc6f101c5313fe0d1de9e3d38a7c02 - + https://github.com/dotnet/format - a8be5ff9c558f921f565c461dd7688905f84742a + b7d483d5a0ce4e96a3468514f3f4a98f3c371434 - + https://github.com/dotnet/roslyn - 38896ab4e7cee896fcde8a4e26914a777c794e3b + 3fb752d448006a3144a60ccf181d745e555422f9 - + https://github.com/dotnet/roslyn - 38896ab4e7cee896fcde8a4e26914a777c794e3b + 3fb752d448006a3144a60ccf181d745e555422f9 - + https://github.com/dotnet/roslyn - 38896ab4e7cee896fcde8a4e26914a777c794e3b + 3fb752d448006a3144a60ccf181d745e555422f9 - + https://github.com/dotnet/roslyn - 38896ab4e7cee896fcde8a4e26914a777c794e3b + 3fb752d448006a3144a60ccf181d745e555422f9 - + https://github.com/dotnet/roslyn - 38896ab4e7cee896fcde8a4e26914a777c794e3b + 3fb752d448006a3144a60ccf181d745e555422f9 - + https://github.com/dotnet/roslyn - 38896ab4e7cee896fcde8a4e26914a777c794e3b + 3fb752d448006a3144a60ccf181d745e555422f9 - + https://github.com/dotnet/roslyn - 38896ab4e7cee896fcde8a4e26914a777c794e3b + 3fb752d448006a3144a60ccf181d745e555422f9 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore @@ -119,86 +119,86 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore 568fff703254def7dcd35fda9892bf702d4c81d3 - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - - https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 550277e0616e549446f03fda35d3e23dff75dc01 + + https://github.com/nuget/nuget.client + 5469bd0d9de8108f15f21644759773b85471366c - + https://github.com/microsoft/vstest - aa59400b11e1aeee2e8af48928dbd48748a8bef9 + 7855c9b221686104532ebf3380f2d45b3613b369 - + https://github.com/microsoft/vstest - aa59400b11e1aeee2e8af48928dbd48748a8bef9 + 7855c9b221686104532ebf3380f2d45b3613b369 - + https://github.com/microsoft/vstest - aa59400b11e1aeee2e8af48928dbd48748a8bef9 + 7855c9b221686104532ebf3380f2d45b3613b369 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -293,18 +293,18 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore 568fff703254def7dcd35fda9892bf702d4c81d3 - + https://github.com/dotnet/razor - e137c0322ddb9e3d4f4a5de385647baa9719f9a6 + c937db618f8c8739c6fa66ab4ca541344a468fdc - + https://github.com/dotnet/razor - e137c0322ddb9e3d4f4a5de385647baa9719f9a6 + c937db618f8c8739c6fa66ab4ca541344a468fdc - + https://github.com/dotnet/razor - e137c0322ddb9e3d4f4a5de385647baa9719f9a6 + c937db618f8c8739c6fa66ab4ca541344a468fdc https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore @@ -327,17 +327,17 @@ 9a1c3e1b7f0c8763d4c96e593961a61a72679a7b - + https://github.com/dotnet/roslyn-analyzers - 8fe06101545209b36f67bd86cbb40cfc71e55d4e + abef8ced132657943b7150f01a308e2199a17d5d - + https://github.com/dotnet/roslyn-analyzers - 8fe06101545209b36f67bd86cbb40cfc71e55d4e + abef8ced132657943b7150f01a308e2199a17d5d - + https://github.com/dotnet/roslyn-analyzers - 8fe06101545209b36f67bd86cbb40cfc71e55d4e + abef8ced132657943b7150f01a308e2199a17d5d @@ -469,9 +469,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 81cabf2857a01351e5ab578947c7403a5b128ad1 - + https://dev.azure.com/dnceng/internal/_git/dotnet-winforms - e4ede9b8979b9d2b1b1d4383f30a791414f0625b + fdc20074cf1e48b8cf11fe6ac78f255b1fbfe611 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 120b44ba25a9..0d4fe45dc9fd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,12 +11,13 @@ - 8.0.124 + 8.0.418 + 8.0.400 true release - rtm + preview rtm servicing @@ -30,10 +31,11 @@ 2.0.1-servicing-26011-01 2.0.3 13.0.3 + 4.8.6 1.2.0-beta.435 - 7.0.0 + 8.0.0 4.0.0 - 7.0.0 + 8.0.1 8.0.0-beta.25611.2 7.0.0-preview.22423.2 8.0.0 @@ -57,6 +59,7 @@ 8.0.23 8.0.23-servicing.25606.7 8.0.0 + $(MicrosoftExtensionsDependencyModelPackageVersion) 8.0.1 8.0.3 8.0.1 @@ -72,7 +75,7 @@ 8.0.0 8.0.2 8.0.1 - 8.0.0 + 8.0.7 8.0.1 8.0.2 8.0.0 @@ -85,26 +88,26 @@ - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 - 6.8.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 + 6.11.1-rc.2 $(NuGetPackagingPackageVersion) $(NuGetProjectModelPackageVersion) - 17.8.0-release-23615-02 - 17.8.0-release-23615-02 - 17.8.0-release-23615-02 + 17.11.1-release-24455-02 + 17.11.1-release-24455-02 + 17.11.1-release-24455-02 @@ -114,58 +117,56 @@ - 8.1.657407 + 8.3.657409 - 8.0.0-preview.26058.1 - 3.11.0-beta1.26058.1 + 8.0.0-preview.23614.1 + 3.11.0-beta1.23614.1 - 17.8.49 + 17.11.48 $(MicrosoftBuildPackageVersion) - $(MicrosoftBuildPackageVersion) - $(MicrosoftBuildPackageVersion) - 17.8.49-servicing-25616-08 - $(MicrosoftBuildPackageVersion) - $(MicrosoftBuildPackageVersion) + This avoids the need to juggle references to packages that have been updated in newer MSBuild. --> + 17.8.43 + $(MicrosoftBuildMinimumVersion) + $(MicrosoftBuildMinimumVersion) + 17.11.48-servicing-25466-05 + $(MicrosoftBuildMinimumVersion) + $(MicrosoftBuildMinimumVersion) $(MicrosoftBuildTasksCorePackageVersion) + $(MicrosoftBuildMinimumVersion) - 8.0.124 + 8.0.418 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.124-servicing.26056.5 + 8.0.418-servicing.26055.10 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) - 12.8.102-beta.24081.2 + 12.8.403-beta.24526.2 - 4.8.0-7.25569.25 - 4.8.0-7.25569.25 - 4.8.0-7.25569.25 - 4.8.0-7.25569.25 - 4.8.0-7.25569.25 - 4.8.0-7.25569.25 - 4.8.0-7.25569.25 + 4.11.0-3.25569.22 + 4.11.0-3.25569.22 + 4.11.0-3.25569.22 + 4.11.0-3.25569.22 + 4.11.0-3.25569.22 + 4.11.0-3.25569.22 + 4.11.0-3.25569.22 $(MicrosoftNetCompilersToolsetPackageVersion) @@ -180,9 +181,9 @@ - 7.0.0-preview.26064.3 - 7.0.0-preview.26064.3 - 7.0.0-preview.26064.3 + 9.0.0-preview.24577.3 + 9.0.0-preview.24577.3 + 9.0.0-preview.24577.3 From 93915b90e89f39d20519c611de30441b54500673 Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Mon, 2 Feb 2026 09:34:41 -0800 Subject: [PATCH 27/29] Update branding to 8.0.419 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 0d4fe45dc9fd..647a3f611fa3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ - 8.0.418 + 8.0.419 8.0.400 true From 7001700c2859795c78ad032becb50291634a80ec Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 4 Feb 2026 02:02:08 +0000 Subject: [PATCH 28/29] Update dependencies from https://github.com/dotnet/templating build 20260202.5 On relative base path root Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Mocks From Version 8.0.418-servicing.26055.10 -> To Version 8.0.419-servicing.26102.5 Microsoft.TemplateEngine.Abstractions From Version 8.0.418 -> To Version 8.0.419 --- NuGet.config | 9 +-------- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/NuGet.config b/NuGet.config index a15c8be96590..7d3def07b816 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,26 +4,22 @@ - - - - + - @@ -50,17 +46,14 @@ - - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3e075aa26930..e9af68903bef 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,17 @@ - + https://github.com/dotnet/templating - 13c6760d66f74bfb5c8ce8343cf4c5d8f7471584 + f7df7689eef984a98b71017bef8a67146797d92b - + https://github.com/dotnet/templating - 13c6760d66f74bfb5c8ce8343cf4c5d8f7471584 + f7df7689eef984a98b71017bef8a67146797d92b - + https://github.com/dotnet/templating - 13c6760d66f74bfb5c8ce8343cf4c5d8f7471584 + f7df7689eef984a98b71017bef8a67146797d92b diff --git a/eng/Versions.props b/eng/Versions.props index 647a3f611fa3..c68493510fd5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -143,13 +143,13 @@ - 8.0.418 + 8.0.419 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.418-servicing.26055.10 + 8.0.419-servicing.26102.5 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From d8b7771330cba77b31b801a46896b53542f309ae Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 06:11:11 +0000 Subject: [PATCH 29/29] Reset files to release/9.0.1xx Reset patterns: - global.json - NuGet.config - eng/Version.Details.xml - eng/Versions.props - eng/common/* --- NuGet.config | 38 +- eng/Version.Details.xml | 669 +++++++++++------- eng/Versions.props | 375 ++++++---- eng/common/SetupNugetSources.ps1 | 54 +- eng/common/SetupNugetSources.sh | 62 +- eng/common/build.cmd | 3 + eng/common/build.ps1 | 3 + eng/common/build.sh | 15 +- eng/common/core-templates/job/job.yml | 253 +++++++ eng/common/core-templates/job/onelocbuild.yml | 121 ++++ .../job/publish-build-assets.yml | 172 +++++ .../core-templates/job/source-build.yml | 99 +++ .../job/source-index-stage1.yml | 81 +++ .../core-templates/jobs/codeql-build.yml | 33 + eng/common/core-templates/jobs/jobs.yml | 123 ++++ .../core-templates/jobs/source-build.yml | 63 ++ .../post-build/common-variables.yml | 22 + .../core-templates/post-build/post-build.yml | 327 +++++++++ .../post-build/setup-maestro-vars.yml | 74 ++ .../steps/component-governance.yml | 16 + .../steps/enable-internal-runtimes.yml | 32 + .../steps/enable-internal-sources.yml | 47 ++ .../core-templates/steps/generate-sbom.yml | 54 ++ .../steps/get-delegation-sas.yml | 55 ++ .../steps/get-federated-access-token.yml | 42 ++ .../steps/publish-build-artifacts.yml | 20 + .../core-templates/steps/publish-logs.yml | 58 ++ .../steps/publish-pipeline-artifacts.yml | 20 + .../core-templates/steps/retain-build.yml | 28 + .../core-templates/steps/send-to-helix.yml | 93 +++ .../core-templates/steps/source-build.yml | 137 ++++ .../variables/pool-providers.yml | 8 + eng/common/cross/build-android-rootfs.sh | 8 +- eng/common/cross/build-rootfs.sh | 262 +++++-- eng/common/cross/riscv64/tizen/tizen.patch | 9 + eng/common/cross/tizen-build-rootfs.sh | 21 + eng/common/cross/tizen-fetch.sh | 19 +- eng/common/cross/toolchain.cmake | 25 +- eng/common/darc-init.ps1 | 2 +- eng/common/darc-init.sh | 2 +- eng/common/dotnet-install.sh | 5 +- eng/common/generate-sbom-prep.sh | 2 +- eng/common/helixpublish.proj | 1 + eng/common/internal/Directory.Build.props | 7 + eng/common/internal/NuGet.config | 3 + eng/common/internal/Tools.csproj | 14 +- eng/common/native/CommonLibrary.psm1 | 3 +- eng/common/native/init-compiler.sh | 117 +-- eng/common/native/init-distro-rid.sh | 76 +- eng/common/native/init-os-and-arch.sh | 7 +- .../post-build/check-channel-consistency.ps1 | 12 +- eng/common/post-build/nuget-validation.ps1 | 9 +- eng/common/post-build/nuget-verification.ps1 | 2 +- eng/common/post-build/publish-using-darc.ps1 | 15 +- eng/common/post-build/redact-logs.ps1 | 89 +++ .../post-build/sourcelink-validation.ps1 | 10 +- eng/common/post-build/symbols-validation.ps1 | 2 - eng/common/sdl/NuGet.config | 4 +- eng/common/sdl/execute-all-sdl-tools.ps1 | 4 +- eng/common/sdl/init-sdl.ps1 | 8 + eng/common/sdl/packages.config | 2 +- eng/common/sdl/sdl.ps1 | 4 +- eng/common/sdl/trim-assets-version.ps1 | 2 +- eng/common/template-guidance.md | 133 ++++ eng/common/templates-official/job/job.yml | 340 ++------- .../templates-official/job/onelocbuild.yml | 115 +-- .../job/publish-build-assets.yml | 180 +---- .../templates-official/job/source-build.yml | 82 +-- .../job/source-index-stage1.yml | 86 +-- .../templates-official/jobs/codeql-build.yml | 32 +- eng/common/templates-official/jobs/jobs.yml | 104 +-- .../templates-official/jobs/source-build.yml | 62 +- .../post-build/common-variables.yml | 26 +- .../post-build/post-build.yml | 295 +------- .../post-build/setup-maestro-vars.yml | 74 +- .../steps/component-governance.yml | 18 +- .../steps/enable-internal-runtimes.yml | 31 +- .../steps/enable-internal-sources.yml | 7 + .../steps/generate-sbom.yml | 51 +- .../steps/get-delegation-sas.yml | 55 +- .../steps/get-federated-access-token.yml | 45 +- .../steps/publish-build-artifacts.yml | 41 ++ .../templates-official/steps/publish-logs.yml | 26 +- .../steps/publish-pipeline-artifacts.yml | 28 + .../templates-official/steps/retain-build.yml | 33 +- .../steps/send-to-helix.yml | 97 +-- .../templates-official/steps/source-build.yml | 138 +--- eng/common/templates/job/job.yml | 319 ++------- eng/common/templates/job/onelocbuild.yml | 112 +-- .../templates/job/publish-build-assets.yml | 176 +---- eng/common/templates/job/source-build.yml | 81 +-- .../templates/job/source-index-stage1.yml | 85 +-- eng/common/templates/jobs/codeql-build.yml | 32 +- eng/common/templates/jobs/jobs.yml | 104 +-- eng/common/templates/jobs/source-build.yml | 62 +- .../templates/post-build/common-variables.yml | 26 +- .../templates/post-build/post-build.yml | 291 +------- .../post-build/setup-maestro-vars.yml | 74 +- .../templates/steps/component-governance.yml | 18 +- .../steps/enable-internal-runtimes.yml | 30 +- .../steps/enable-internal-sources.yml | 7 + eng/common/templates/steps/generate-sbom.yml | 51 +- .../templates/steps/get-delegation-sas.yml | 55 +- .../steps/get-federated-access-token.yml | 45 +- .../steps/publish-build-artifacts.yml | 40 ++ eng/common/templates/steps/publish-logs.yml | 26 +- .../steps/publish-pipeline-artifacts.yml | 34 + eng/common/templates/steps/retain-build.yml | 33 +- eng/common/templates/steps/send-to-helix.yml | 97 +-- eng/common/templates/steps/source-build.yml | 138 +--- .../templates/variables/pool-providers.yml | 56 +- eng/common/tools.ps1 | 73 +- eng/common/tools.sh | 39 +- global.json | 13 +- 114 files changed, 4000 insertions(+), 4159 deletions(-) create mode 100644 eng/common/build.cmd create mode 100644 eng/common/core-templates/job/job.yml create mode 100644 eng/common/core-templates/job/onelocbuild.yml create mode 100644 eng/common/core-templates/job/publish-build-assets.yml create mode 100644 eng/common/core-templates/job/source-build.yml create mode 100644 eng/common/core-templates/job/source-index-stage1.yml create mode 100644 eng/common/core-templates/jobs/codeql-build.yml create mode 100644 eng/common/core-templates/jobs/jobs.yml create mode 100644 eng/common/core-templates/jobs/source-build.yml create mode 100644 eng/common/core-templates/post-build/common-variables.yml create mode 100644 eng/common/core-templates/post-build/post-build.yml create mode 100644 eng/common/core-templates/post-build/setup-maestro-vars.yml create mode 100644 eng/common/core-templates/steps/component-governance.yml create mode 100644 eng/common/core-templates/steps/enable-internal-runtimes.yml create mode 100644 eng/common/core-templates/steps/enable-internal-sources.yml create mode 100644 eng/common/core-templates/steps/generate-sbom.yml create mode 100644 eng/common/core-templates/steps/get-delegation-sas.yml create mode 100644 eng/common/core-templates/steps/get-federated-access-token.yml create mode 100644 eng/common/core-templates/steps/publish-build-artifacts.yml create mode 100644 eng/common/core-templates/steps/publish-logs.yml create mode 100644 eng/common/core-templates/steps/publish-pipeline-artifacts.yml create mode 100644 eng/common/core-templates/steps/retain-build.yml create mode 100644 eng/common/core-templates/steps/send-to-helix.yml create mode 100644 eng/common/core-templates/steps/source-build.yml create mode 100644 eng/common/core-templates/variables/pool-providers.yml create mode 100644 eng/common/cross/riscv64/tizen/tizen.patch create mode 100644 eng/common/post-build/redact-logs.ps1 create mode 100644 eng/common/template-guidance.md create mode 100644 eng/common/templates-official/steps/enable-internal-sources.yml create mode 100644 eng/common/templates-official/steps/publish-build-artifacts.yml create mode 100644 eng/common/templates-official/steps/publish-pipeline-artifacts.yml create mode 100644 eng/common/templates/steps/enable-internal-sources.yml create mode 100644 eng/common/templates/steps/publish-build-artifacts.yml create mode 100644 eng/common/templates/steps/publish-pipeline-artifacts.yml diff --git a/NuGet.config b/NuGet.config index 7d3def07b816..c46104cfb806 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,26 +3,42 @@ + + + + + + + + + + + + + + + + + + + + - - - + - + - - @@ -30,6 +46,9 @@ + + + @@ -39,23 +58,18 @@ - - - - + - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e9af68903bef..b48b9cc5331f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,521 +1,664 @@ - + https://github.com/dotnet/templating - f7df7689eef984a98b71017bef8a67146797d92b + e99d728d09ae2e529b3e0a17b4f02896af6e70ee - + https://github.com/dotnet/templating - f7df7689eef984a98b71017bef8a67146797d92b + e99d728d09ae2e529b3e0a17b4f02896af6e70ee - + + https://github.com/dotnet/templating - f7df7689eef984a98b71017bef8a67146797d92b + e99d728d09ae2e529b3e0a17b4f02896af6e70ee - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c96cd11cb2f0c204f272b2280082a329aee24cf7 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c96cd11cb2f0c204f272b2280082a329aee24cf7 - + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c96cd11cb2f0c204f272b2280082a329aee24cf7 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c96cd11cb2f0c204f272b2280082a329aee24cf7 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c96cd11cb2f0c204f272b2280082a329aee24cf7 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c96cd11cb2f0c204f272b2280082a329aee24cf7 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c96cd11cb2f0c204f272b2280082a329aee24cf7 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 81cabf2857a01351e5ab578947c7403a5b128ad1 + 2f124007573374800632d39177cde00ca9fe1ef0 - + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c96cd11cb2f0c204f272b2280082a329aee24cf7 + 2f124007573374800632d39177cde00ca9fe1ef0 + + + + + + https://github.com/dotnet/core-setup + 7d57652f33493fa022125b7f63aad0d70c52d810 + + + https://github.com/dotnet/emsdk + f364bf26bf50d8cbdd8652d284d25a8ccb55039a + + + https://github.com/dotnet/emsdk + f364bf26bf50d8cbdd8652d284d25a8ccb55039a - + + https://github.com/dotnet/emsdk - 87f89d77d2eb70ed29b3e0f37cfbf28bfd49c536 + f364bf26bf50d8cbdd8652d284d25a8ccb55039a + - - https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted - 02bf66295b64ab368d12933041f7281aad186a2d + + https://github.com/dotnet/msbuild + 07da1b9a89da6d00c5a5a6a385cdcebfdfed7110 - - https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted - 02bf66295b64ab368d12933041f7281aad186a2d + + https://github.com/dotnet/msbuild + 07da1b9a89da6d00c5a5a6a385cdcebfdfed7110 - - https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted - 02bf66295b64ab368d12933041f7281aad186a2d + + + https://github.com/dotnet/msbuild + 07da1b9a89da6d00c5a5a6a385cdcebfdfed7110 - + https://github.com/dotnet/fsharp - e11d7079bebc6f101c5313fe0d1de9e3d38a7c02 + 47d4e3f91e4e5414b6dafbf14288b9c5a798ef99 - + + https://github.com/dotnet/fsharp - e11d7079bebc6f101c5313fe0d1de9e3d38a7c02 + 47d4e3f91e4e5414b6dafbf14288b9c5a798ef99 - - https://github.com/dotnet/format - b7d483d5a0ce4e96a3468514f3f4a98f3c371434 - + + https://github.com/dotnet/roslyn + fc52718eccdb37693a40a518b1178b1e23114e68 - + + https://github.com/dotnet/roslyn - 3fb752d448006a3144a60ccf181d745e555422f9 + fc52718eccdb37693a40a518b1178b1e23114e68 - + + https://github.com/dotnet/roslyn + fc52718eccdb37693a40a518b1178b1e23114e68 + + https://github.com/dotnet/roslyn - 3fb752d448006a3144a60ccf181d745e555422f9 + fc52718eccdb37693a40a518b1178b1e23114e68 - + https://github.com/dotnet/roslyn - 3fb752d448006a3144a60ccf181d745e555422f9 + fc52718eccdb37693a40a518b1178b1e23114e68 - + https://github.com/dotnet/roslyn - 3fb752d448006a3144a60ccf181d745e555422f9 + fc52718eccdb37693a40a518b1178b1e23114e68 - + https://github.com/dotnet/roslyn - 3fb752d448006a3144a60ccf181d745e555422f9 + fc52718eccdb37693a40a518b1178b1e23114e68 - + https://github.com/dotnet/roslyn - 3fb752d448006a3144a60ccf181d745e555422f9 + fc52718eccdb37693a40a518b1178b1e23114e68 - + https://github.com/dotnet/roslyn - 3fb752d448006a3144a60ccf181d745e555422f9 + fc52718eccdb37693a40a518b1178b1e23114e68 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 + - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/nuget/nuget.client - 5469bd0d9de8108f15f21644759773b85471366c + 42bfb4554167e1d2fc2b950728d9bd8164f806c1 - + https://github.com/microsoft/vstest - 7855c9b221686104532ebf3380f2d45b3613b369 - + bc9161306b23641b0364b8f93d546da4d48da1eb - + https://github.com/microsoft/vstest - 7855c9b221686104532ebf3380f2d45b3613b369 + bc9161306b23641b0364b8f93d546da4d48da1eb - + https://github.com/microsoft/vstest - 7855c9b221686104532ebf3380f2d45b3613b369 + bc9161306b23641b0364b8f93d546da4d48da1eb - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c96cd11cb2f0c204f272b2280082a329aee24cf7 + + + https://github.com/microsoft/vstest + bc9161306b23641b0364b8f93d546da4d48da1eb + - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 50c4cb9fc31c47f03eac865d7bc518af173b74b7 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 50c4cb9fc31c47f03eac865d7bc518af173b74b7 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 0167058c735054c0f948ca3925c693a958875427 + 9b9a26408ddd07dc51c232082af1ca6863af7bc9 + - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 0167058c735054c0f948ca3925c693a958875427 + 9b9a26408ddd07dc51c232082af1ca6863af7bc9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 0167058c735054c0f948ca3925c693a958875427 + 9b9a26408ddd07dc51c232082af1ca6863af7bc9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - 0167058c735054c0f948ca3925c693a958875427 + 9b9a26408ddd07dc51c232082af1ca6863af7bc9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf - b132b33a48ebc857db94785fdd86d671d123911a + 58060180f2776452976616ae4894118dfd21f8d5 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 - + f736effe82a61eb6f5eba46e4173eae3b7d3dffd + + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd + - + https://github.com/dotnet/razor - c937db618f8c8739c6fa66ab4ca541344a468fdc - + cff92f3cc3f19a607ddbb7a0cddfbccf87a1c061 - + https://github.com/dotnet/razor - c937db618f8c8739c6fa66ab4ca541344a468fdc + cff92f3cc3f19a607ddbb7a0cddfbccf87a1c061 - + https://github.com/dotnet/razor - c937db618f8c8739c6fa66ab4ca541344a468fdc + cff92f3cc3f19a607ddbb7a0cddfbccf87a1c061 - + + + https://github.com/dotnet/razor + cff92f3cc3f19a607ddbb7a0cddfbccf87a1c061 + + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd + + + https://github.com/dotnet/test-templates + 0385265f4d0b6413d64aea0223172366a9b9858c + + + https://github.com/dotnet/test-templates + 307b8f538d83a955d8f6dd909eee41a5555f2f4d + + + https://github.com/dotnet/test-templates + becc4bd157cd6608b51a5ffe414a5d2de6330272 + + + https://github.com/dotnet/test-templates + becc4bd157cd6608b51a5ffe414a5d2de6330272 + + + https://github.com/dotnet/test-templates + 49c9ad01f057b3c6352bbec12b117acc2224493c - + + https://github.com/dotnet/test-templates + 47c90e140b027225b799ca8413af10ee3d5f1126 + + + + https://github.com/dotnet/test-templates + 47c90e140b027225b799ca8413af10ee3d5f1126 + + + + + https://dev.azure.com/dnceng/internal/_git/dotnet-winforms + b05fe71693c6c70b537911f88865ea456a9015f5 + + + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf + 58060180f2776452976616ae4894118dfd21f8d5 + + https://github.com/dotnet/xdt - 9a1c3e1b7f0c8763d4c96e593961a61a72679a7b + 63ae81154c50a1cf9287cc47d8351d55b4289e6d + + + + https://github.com/dotnet/xdt + 63ae81154c50a1cf9287cc47d8351d55b4289e6d - + https://github.com/dotnet/roslyn-analyzers - abef8ced132657943b7150f01a308e2199a17d5d + 5ef1abb57ce3df89eae65ecadeb1ddbab323ae05 - + https://github.com/dotnet/roslyn-analyzers - abef8ced132657943b7150f01a308e2199a17d5d + 5ef1abb57ce3df89eae65ecadeb1ddbab323ae05 - + + https://github.com/dotnet/roslyn-analyzers - abef8ced132657943b7150f01a308e2199a17d5d + 5ef1abb57ce3df89eae65ecadeb1ddbab323ae05 - + + https://github.com/dotnet/command-line-api + 803d8598f98fb4efd94604b32627ee9407f246db + + https://github.com/dotnet/command-line-api - 02fe27cd6a9b001c8feb7938e6ef4b3799745759 + 803d8598f98fb4efd94604b32627ee9407f246db - + + + + https://github.com/dotnet/symreader + 0710a7892d89999956e8808c28e9dd0512bd53f3 + + + https://github.com/dotnet/command-line-api - 02fe27cd6a9b001c8feb7938e6ef4b3799745759 + 803d8598f98fb4efd94604b32627ee9407f246db - + + https://github.com/dotnet/source-build-externals - 5f4a123a49dd5480065c8d6182536cf86b4f4410 + 16c380d1ce5fa0b24e232251c31cb013bbf3365f - + + https://github.com/dotnet/source-build-reference-packages - 44b5b62182b48c34c4b6aef28943ec3f3e82f214 + d968306ccb2fe6d2834ba92bbcad7cc70a8c0edc - + https://github.com/dotnet/deployment-tools - 5255d40e228ea1d4b624781b5b97ec16484a3b4b + b2d5c0c5841de4bc036ef4c84b5db3532504e5f3 - + https://github.com/dotnet/sourcelink - 94eaac3385cafff41094454966e1af1d1cf60f00 - + 657ade4711e607cc4759e89e0943aa1ca8aadc63 - + https://github.com/dotnet/sourcelink - 94eaac3385cafff41094454966e1af1d1cf60f00 + 657ade4711e607cc4759e89e0943aa1ca8aadc63 - + https://github.com/dotnet/sourcelink - 94eaac3385cafff41094454966e1af1d1cf60f00 + 657ade4711e607cc4759e89e0943aa1ca8aadc63 - + https://github.com/dotnet/sourcelink - 94eaac3385cafff41094454966e1af1d1cf60f00 + 657ade4711e607cc4759e89e0943aa1ca8aadc63 - + https://github.com/dotnet/sourcelink - 94eaac3385cafff41094454966e1af1d1cf60f00 + 657ade4711e607cc4759e89e0943aa1ca8aadc63 - + https://github.com/dotnet/sourcelink - 94eaac3385cafff41094454966e1af1d1cf60f00 + 657ade4711e607cc4759e89e0943aa1ca8aadc63 - - + + + https://github.com/dotnet/sourcelink + 657ade4711e607cc4759e89e0943aa1ca8aadc63 + + + + https://github.com/dotnet/deployment-tools - 5255d40e228ea1d4b624781b5b97ec16484a3b4b + b2d5c0c5841de4bc036ef4c84b5db3532504e5f3 - + + https://github.com/dotnet/symreader - 27e584661980ee6d82c419a2a471ae505b7d122e + 0710a7892d89999956e8808c28e9dd0512bd53f3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 81cabf2857a01351e5ab578947c7403a5b128ad1 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 50c4cb9fc31c47f03eac865d7bc518af173b74b7 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 81cabf2857a01351e5ab578947c7403a5b128ad1 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 81cabf2857a01351e5ab578947c7403a5b128ad1 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - ef853a71052646a42abf17e888ec6d9a69614ad9 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 568fff703254def7dcd35fda9892bf702d4c81d3 + f736effe82a61eb6f5eba46e4173eae3b7d3dffd - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 81cabf2857a01351e5ab578947c7403a5b128ad1 + 2f124007573374800632d39177cde00ca9fe1ef0 - - https://dev.azure.com/dnceng/internal/_git/dotnet-winforms - fdc20074cf1e48b8cf11fe6ac78f255b1fbfe611 - - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 81cabf2857a01351e5ab578947c7403a5b128ad1 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 81cabf2857a01351e5ab578947c7403a5b128ad1 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 2f124007573374800632d39177cde00ca9fe1ef0 - + https://github.com/dotnet/arcade - 4b01306353c43c151d713d152f48a4d523c41960 - + c1205e7ef5628ab617dc234c7d89616fcd2917a8 - + https://github.com/dotnet/arcade - 4b01306353c43c151d713d152f48a4d523c41960 + c1205e7ef5628ab617dc234c7d89616fcd2917a8 - + https://github.com/dotnet/arcade - 4b01306353c43c151d713d152f48a4d523c41960 + c1205e7ef5628ab617dc234c7d89616fcd2917a8 - + https://github.com/dotnet/arcade - 4b01306353c43c151d713d152f48a4d523c41960 + c1205e7ef5628ab617dc234c7d89616fcd2917a8 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 81cabf2857a01351e5ab578947c7403a5b128ad1 + + https://github.com/dotnet/arcade + c1205e7ef5628ab617dc234c7d89616fcd2917a8 + + + https://github.com/dotnet/arcade + c1205e7ef5628ab617dc234c7d89616fcd2917a8 + + + + https://github.com/dotnet/arcade + c1205e7ef5628ab617dc234c7d89616fcd2917a8 + - - https://github.com/dotnet/xliff-tasks - 73f0850939d96131c28cf6ea6ee5aacb4da0083a - + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 2f124007573374800632d39177cde00ca9fe1ef0 + + + https://github.com/dotnet/arcade-services + e156e649f28395d9d0ee1e848225a689b59e0fd3 + + + https://github.com/dotnet/arcade-services + e156e649f28395d9d0ee1e848225a689b59e0fd3 + + + https://github.com/dotnet/scenario-tests + e4cdae73d1aaad398c2915f319e3d8d8ed41a737 + + + + https://github.com/dotnet/scenario-tests + e4cdae73d1aaad398c2915f319e3d8d8ed41a737 + + + + + https://github.com/dotnet/aspire + 5fa9337a84a52e9bd185d04d156eccbdcf592f74 + + + + https://github.com/dotnet/aspire + 5fa9337a84a52e9bd185d04d156eccbdcf592f74 + https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index c68493510fd5..12e55782eefb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,193 +1,267 @@ - - - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - true - true - - - - 8.0.419 - 8.0.400 + + 9 + 0 + 1 + 15 + + $(VersionMajor).$(VersionMinor).$(VersionSDKMinor)00 + $(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature) + $(VersionMajor).$(VersionMinor) + $(MajorMinorVersion).$(VersionSDKMinor) true release - preview + rtm rtm servicing + + true 6.0.1 - - + + 30 + 32 + 17 + 36 + 20 + $([MSBuild]::Add($(VersionFeature), 10)) + + <_NET70ILLinkPackVersion>7.0.100-1.23211.1 + + + + https://ci.dot.net/public/ + https://dotnetclimsrc.blob.core.windows.net/dotnet/ + + + 10.0.0-preview.24609.2 1.0.0-20230414.1 - 2.21.0 + 2.22.0 2.0.1-servicing-26011-01 2.0.3 13.0.3 4.8.6 1.2.0-beta.435 - 8.0.0 - 4.0.0 - 8.0.1 - 8.0.0-beta.25611.2 - 7.0.0-preview.22423.2 - 8.0.0 - 4.3.0 - 4.3.0 4.0.5 - 8.0.1 - 4.6.0 - 2.0.0-beta4.23307.1 - 2.0.0-rtm.1.25064.1 + 2.0.0-beta4.24324.3 + 0.4.0-alpha.24324.3 + 2.0.0-rtm.1.25059.4 + 2.2.0-beta.24327.2 + 1.1.2-beta1.22216.1 + 10.3.0 3.2.2146 0.3.49-beta + + + 1.8.1 + + + 0.2.0 + - - 8.0.23 - 8.0.23-servicing.25606.7 - 8.0.23 - $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 8.0.2 - 8.0.23 - 8.0.23-servicing.25606.7 - 8.0.0 - $(MicrosoftExtensionsDependencyModelPackageVersion) - 8.0.1 - 8.0.3 - 8.0.1 - 8.0.23 - 8.0.0 - 8.0.0 - 8.0.23 - 8.0.0 - 8.0.0 - 8.0.0 - 8.0.0 - 8.0.0 - 8.0.0 - 8.0.2 - 8.0.1 - 8.0.7 - 8.0.1 - 8.0.2 - 8.0.0 - 8.0.1 - 8.0.6 - - 8.0.5 - 8.0.0 - 8.0.2 + + 1.1.0-beta.25317.4 - - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - 6.11.1-rc.2 - $(NuGetPackagingPackageVersion) - $(NuGetProjectModelPackageVersion) + + 9.0.12-servicing.25608.3 - - 17.11.1-release-24455-02 - 17.11.1-release-24455-02 - 17.11.1-release-24455-02 + + + 1.1.0-rtm.25262.1 - 8.0.0 - 8.0.0 - 8.0.0 + 9.0.12 + 9.0.12-servicing.25606.9 + 9.0.12 + 9.0.12 + 9.0.12-servicing.25606.9 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 8.0.0-rc.1.23414.4 + 9.0.12-servicing.25606.9 + 9.0.12-servicing.25606.9 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 2.1.0 + 9.0.12 + 8.0.0 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 8.0.0 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + 9.0.12 + + 8.0.5 + 9.0.12 + 9.0.12 - - 8.3.657409 + + 9.0.12-servicing.25609.4 + 9.0.12-servicing.25609.4 + 9.0.12 + 9.0.12 + + + + 6.12.4 + 6.12.4 + 6.12.4 + 6.12.4 + 6.12.4 + 6.12.4 + 6.12.4-rc.9 + 6.12.4 + 6.12.4 + 6.12.4 + 6.12.4 + 6.12.4 + + + + 17.12.0-release-24508-01 + 17.12.0-release-24508-01 + 17.12.0-release-24508-01 - 8.0.0-preview.23614.1 - 3.11.0-beta1.23614.1 + 9.0.0-preview.26075.3 + 3.11.0-beta1.26075.3 - 17.11.48 - $(MicrosoftBuildPackageVersion) - - 17.8.43 - $(MicrosoftBuildMinimumVersion) - $(MicrosoftBuildMinimumVersion) - 17.11.48-servicing-25466-05 - $(MicrosoftBuildMinimumVersion) - $(MicrosoftBuildMinimumVersion) - $(MicrosoftBuildTasksCorePackageVersion) - $(MicrosoftBuildMinimumVersion) + At usage sites, either we use MicrosoftBuildMinimumVersion, or MicrosoftBuildVersion in source-only modes. + + Additionally, set the MinimumVSVersion for the installer UI that's required for targeting NetCurrent --> + 17.12.57 + 17.12.57-preview-26069-01 + 17.11.48 + 17.12 - 8.0.419 + 9.0.115 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.419-servicing.26102.5 + 9.0.115-servicing.26103.1 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) - 12.8.403-beta.24526.2 + 12.9.101-beta.25070.7 - 4.11.0-3.25569.22 - 4.11.0-3.25569.22 - 4.11.0-3.25569.22 - 4.11.0-3.25569.22 - 4.11.0-3.25569.22 - 4.11.0-3.25569.22 - 4.11.0-3.25569.22 - $(MicrosoftNetCompilersToolsetPackageVersion) + 4.12.0-3.25609.5 + 4.12.0-3.25609.5 + 4.12.0-3.25609.5 + 4.12.0-3.25609.5 + 4.12.0-3.25609.5 + 4.12.0-3.25609.5 + 4.12.0-3.25609.5 + 4.12.0-3.25609.5 - 8.0.23 - 8.0.23-servicing.25609.5 - 8.0.23-servicing.25609.5 - 8.0.23-servicing.25609.5 - 8.0.23-servicing.25609.5 - 8.0.23-servicing.25609.5 - 8.0.23 + 9.0.12 + 9.0.12-servicing.25609.3 + 9.0.12-servicing.25609.3 + 9.0.12-servicing.25609.3 + 9.0.12-servicing.25609.3 + 9.0.12-servicing.25609.3 + 9.0.12 + 9.0.12 + 9.0.12-servicing.25609.3 + 9.0.12-servicing.25609.3 + 9.0.12-servicing.25609.3 + 9.0.12-servicing.25609.3 + 9.0.12-servicing.25609.3 - - 9.0.0-preview.24577.3 - 9.0.0-preview.24577.3 - 9.0.0-preview.24577.3 + + 9.0.0-preview.26069.1 + 9.0.0-preview.26069.1 + 9.0.0-preview.26069.1 - 8.0.23-servicing.25609.4 + 9.0.12-rtm.25609.3 + 9.0.12-rtm.25609.3 + + + + $(MicrosoftNETCoreAppHostwinx64PackageVersion) + $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) + $(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion) + $(MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion) + + + $(MicrosoftNETCoreAppRuntimePackageVersion) + $(MicrosoftNETCoreAppRuntimePackageVersion) + + + + $(MicrosoftAspNetCoreAppRuntimePackageVersion) + $(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion) + $(MicrosoftDotNetWpfProjectTemplatesPackageVersion) + $(NUnit3DotNetNewTemplatePackageVersion) + + + 2.2.0-beta.19072.10 + 2.0.0 + 9.0.0-preview.26071.1 @@ -195,17 +269,20 @@ 4.0.1 - - 1.0.0-beta.23475.1 + + 9.0.0-beta.26104.5 + 9.0.0-beta.26104.5 + 9.0.0-beta.26104.5 + 9.0.0-beta.26104.5 - 8.0.0-beta.23615.1 - 8.0.0-beta.23615.1 - 8.0.0-beta.23615.1 - 8.0.0-beta.23615.1 - 8.0.0-beta.23615.1 - 8.0.0-beta.23615.1 + 9.0.0-beta.25564.5 + 9.0.0-beta.25564.5 + 9.0.0-beta.25564.5 + 9.0.0-beta.25564.5 + 9.0.0-beta.25564.5 + 9.0.0-beta.25564.5 @@ -215,8 +292,8 @@ 6.12.0 6.1.0 - 8.0.0-beta.25611.2 4.18.4 + 3.4.3 1.3.2 8.0.0-beta.23607.1 @@ -229,15 +306,35 @@ <_DotNetHiveRoot Condition="!HasTrailingSlash('$(_DotNetHiveRoot)')">$(_DotNetHiveRoot)/ $(_DotNetHiveRoot)dotnet$(ExeExtension) - + + 8.0.100 + 8.2.2 + 9.0.100 + 9.0.0 + 35.0.7 + 18.0.9617 + 18.0.9617 + 15.0.9617 + 18.0.9617 - 8.0.23 - $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100PackageVersion) + 9.0.12-servicing.25602.39 + 9.0.12 + $(MicrosoftNETWorkloadEmscriptenCurrentManifest90100PackageVersion) - 8.0.100$([System.Text.RegularExpressions.Regex]::Match($(EmscriptenWorkloadManifestVersion), `-rtm|-[A-z]*\.*\d*`)) + 9.0.100$([System.Text.RegularExpressions.Regex]::Match($(EmscriptenWorkloadManifestVersion), `-(?!rtm)[A-z]*[\.]*\d*`)) $(MicrosoftNETCoreAppRefPackageVersion) - 8.0.100$([System.Text.RegularExpressions.Regex]::Match($(MonoWorkloadManifestVersion), `-rtm|-[A-z]*\.*\d*`)) + 9.0.100$([System.Text.RegularExpressions.Regex]::Match($(MonoWorkloadManifestVersion), `-(?!rtm)[A-z]*[\.]*\d*`)) + + + + 15.7.179 + 15.7.179 + + + + 2.0.1-servicing-26011-01 + diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 59b2d55e1a33..792b60b49d42 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -1,17 +1,10 @@ -# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. -# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 +# This script adds internal feeds required to build commits that depend on internal package sources. For instance, +# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables +# disabled internal Maestro (darc-int*) feeds. # -# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry -# under for each Maestro managed private feed. Two additional credential -# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. +# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. # -# This script needs to be called in every job that will restore packages and which the base repo has -# private AzDO feeds in the NuGet.config. -# -# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` -# from the AzureDevOps-Artifact-Feeds-Pats variable group. -# -# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing +# See example call for this script below. # # - task: PowerShell@2 # displayName: Setup Private Feeds Credentials @@ -21,11 +14,18 @@ # arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token # env: # Token: $(dn-bot-dnceng-artifact-feeds-rw) +# +# Note that the NuGetAuthenticate task should be called after SetupNugetSources. +# This ensures that: +# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) +# - The credential provider is installed. +# +# This logic is also abstracted into enable-internal-sources.yml. [CmdletBinding()] param ( [Parameter(Mandatory = $true)][string]$ConfigFile, - [Parameter(Mandatory = $true)][string]$Password + $Password ) $ErrorActionPreference = "Stop" @@ -48,11 +48,17 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern else { Write-Host "Package source $SourceName already present." } + AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd } # Add a credential node for the specified source function AddCredential($creds, $source, $username, $pwd) { + # If no cred supplied, don't do anything. + if (!$pwd) { + return; + } + # Looks for credential configuration for the given SourceName. Create it if none is found. $sourceElement = $creds.SelectSingleNode($Source) if ($sourceElement -eq $null) @@ -110,11 +116,6 @@ if (!(Test-Path $ConfigFile -PathType Leaf)) { ExitWithExitCode 1 } -if (!$Password) { - Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT' - ExitWithExitCode 1 -} - # Load NuGet.config $doc = New-Object System.Xml.XmlDocument $filename = (Get-Item $ConfigFile).FullName @@ -127,11 +128,14 @@ if ($sources -eq $null) { $doc.DocumentElement.AppendChild($sources) | Out-Null } -# Looks for a node. Create it if none is found. -$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") -if ($creds -eq $null) { - $creds = $doc.CreateElement("packageSourceCredentials") - $doc.DocumentElement.AppendChild($creds) | Out-Null +$creds = $null +if ($Password) { + # Looks for a node. Create it if none is found. + $creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") + if ($creds -eq $null) { + $creds = $doc.CreateElement("packageSourceCredentials") + $doc.DocumentElement.AppendChild($creds) | Out-Null + } } # Check for disabledPackageSources; we'll enable any darc-int ones we find there @@ -153,7 +157,7 @@ if ($dotnet31Source -ne $null) { AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password } -$dotnetVersions = @('5','6','7','8') +$dotnetVersions = @('5','6','7','8','9') foreach ($dotnetVersion in $dotnetVersions) { $feedPrefix = "dotnet" + $dotnetVersion; @@ -164,4 +168,4 @@ foreach ($dotnetVersion in $dotnetVersions) { } } -$doc.Save($filename) \ No newline at end of file +$doc.Save($filename) diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index c0e7bbef21c4..facb415ca6ff 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -1,28 +1,27 @@ #!/usr/bin/env bash -# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. -# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 +# This script adds internal feeds required to build commits that depend on internal package sources. For instance, +# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables +# disabled internal Maestro (darc-int*) feeds. +# +# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. # -# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry -# under for each Maestro's managed private feed. Two additional credential -# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. -# -# This script needs to be called in every job that will restore packages and which the base repo has -# private AzDO feeds in the NuGet.config. -# -# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` -# from the AzureDevOps-Artifact-Feeds-Pats variable group. -# -# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing. +# See example call for this script below. # # - task: Bash@3 -# displayName: Setup Private Feeds Credentials +# displayName: Setup Internal Feeds # inputs: # filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh -# arguments: $(System.DefaultWorkingDirectory)/NuGet.config $Token +# arguments: $(System.DefaultWorkingDirectory)/NuGet.config # condition: ne(variables['Agent.OS'], 'Windows_NT') -# env: -# Token: $(dn-bot-dnceng-artifact-feeds-rw) +# - task: NuGetAuthenticate@1 +# +# Note that the NuGetAuthenticate task should be called after SetupNugetSources. +# This ensures that: +# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) +# - The credential provider is installed. +# +# This logic is also abstracted into enable-internal-sources.yml. ConfigFile=$1 CredToken=$2 @@ -48,11 +47,6 @@ if [ ! -f "$ConfigFile" ]; then ExitWithExitCode 1 fi -if [ -z "$CredToken" ]; then - Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT" - ExitWithExitCode 1 -fi - if [[ `uname -s` == "Darwin" ]]; then NL=$'\\\n' TB='' @@ -105,7 +99,7 @@ if [ "$?" == "0" ]; then PackageSources+=('dotnet3.1-internal-transport') fi -DotNetVersions=('5' '6' '7' '8') +DotNetVersions=('5' '6' '7' '8' '9') for DotNetVersion in ${DotNetVersions[@]} ; do FeedPrefix="dotnet${DotNetVersion}"; @@ -140,18 +134,20 @@ PackageSources+="$IFS" PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') IFS=$PrevIFS -for FeedName in ${PackageSources[@]} ; do - # Check if there is no existing credential for this FeedName - grep -i "<$FeedName>" $ConfigFile - if [ "$?" != "0" ]; then - echo "Adding credentials for $FeedName." +if [ "$CredToken" ]; then + for FeedName in ${PackageSources[@]} ; do + # Check if there is no existing credential for this FeedName + grep -i "<$FeedName>" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding credentials for $FeedName." - PackageSourceCredentialsNodeFooter="" - NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" + PackageSourceCredentialsNodeFooter="" + NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" - sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile - fi -done + sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile + fi + done +fi # Re-enable any entries in disabledPackageSources where the feed name contains darc-int grep -i "" $ConfigFile diff --git a/eng/common/build.cmd b/eng/common/build.cmd new file mode 100644 index 000000000000..99daf368abae --- /dev/null +++ b/eng/common/build.cmd @@ -0,0 +1,3 @@ +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""" %*" +exit /b %ErrorLevel% diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index 33a6f2d0e248..438f9920c43e 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -19,6 +19,7 @@ Param( [switch] $pack, [switch] $publish, [switch] $clean, + [switch][Alias('pb')]$productBuild, [switch][Alias('bl')]$binaryLog, [switch][Alias('nobl')]$excludeCIBinarylog, [switch] $ci, @@ -58,6 +59,7 @@ function Print-Usage() { Write-Host " -sign Sign build outputs" Write-Host " -publish Publish artifacts (e.g. symbols)" Write-Host " -clean Clean the solution" + Write-Host " -productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)" Write-Host "" Write-Host "Advanced settings:" @@ -120,6 +122,7 @@ function Build { /p:Deploy=$deploy ` /p:Test=$test ` /p:Pack=$pack ` + /p:DotNetBuildRepo=$productBuild ` /p:IntegrationTest=$integrationTest ` /p:PerformanceTest=$performanceTest ` /p:Sign=$sign ` diff --git a/eng/common/build.sh b/eng/common/build.sh index 50af40cdd2ce..ac1ee8620cd2 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -22,6 +22,9 @@ usage() echo " --sourceBuild Source-build the solution (short: -sb)" echo " Will additionally trigger the following actions: --restore, --build, --pack" echo " If --configuration is not set explicitly, will also set it to 'Release'" + echo " --productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)" + echo " Will additionally trigger the following actions: --restore, --build, --pack" + echo " If --configuration is not set explicitly, will also set it to 'Release'" echo " --rebuild Rebuild solution" echo " --test Run all unit tests in the solution (short: -t)" echo " --integrationTest Run all integration tests in the solution" @@ -59,6 +62,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" restore=false build=false source_build=false +product_build=false rebuild=false test=false integration_test=false @@ -105,7 +109,7 @@ while [[ $# > 0 ]]; do -binarylog|-bl) binary_log=true ;; - -excludeCIBinarylog|-nobl) + -excludecibinarylog|-nobl) exclude_ci_binary_log=true ;; -pipelineslog|-pl) @@ -126,6 +130,13 @@ while [[ $# > 0 ]]; do -sourcebuild|-sb) build=true source_build=true + product_build=true + restore=true + pack=true + ;; + -productBuild|-pb) + build=true + product_build=true restore=true pack=true ;; @@ -219,7 +230,9 @@ function Build { /p:RepoRoot="$repo_root" \ /p:Restore=$restore \ /p:Build=$build \ + /p:DotNetBuildRepo=$product_build \ /p:ArcadeBuildFromSource=$source_build \ + /p:DotNetBuildSourceOnly=$source_build \ /p:Rebuild=$rebuild \ /p:Test=$test \ /p:Pack=$pack \ diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml new file mode 100644 index 000000000000..8da43d3b5837 --- /dev/null +++ b/eng/common/core-templates/job/job.yml @@ -0,0 +1,253 @@ +parameters: +# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job + cancelTimeoutInMinutes: '' + condition: '' + container: '' + continueOnError: false + dependsOn: '' + displayName: '' + pool: '' + steps: [] + strategy: '' + timeoutInMinutes: '' + variables: [] + workspace: '' + templateContext: {} + +# Job base template specific parameters + # See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md + # publishing defaults + artifacts: '' + enableMicrobuild: false + microbuildUseESRP: true + enablePublishBuildArtifacts: false + enablePublishBuildAssets: false + enablePublishTestResults: false + enablePublishUsingPipelines: false + enableBuildRetry: false + mergeTestResults: false + testRunTitle: '' + testResultsFormat: '' + name: '' + componentGovernanceSteps: [] + preSteps: [] + artifactPublishSteps: [] + runAsPublic: false + +# 1es specific parameters + is1ESPipeline: '' + +jobs: +- job: ${{ parameters.name }} + + ${{ if ne(parameters.cancelTimeoutInMinutes, '') }}: + cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }} + + ${{ if ne(parameters.condition, '') }}: + condition: ${{ parameters.condition }} + + ${{ if ne(parameters.container, '') }}: + container: ${{ parameters.container }} + + ${{ if ne(parameters.continueOnError, '') }}: + continueOnError: ${{ parameters.continueOnError }} + + ${{ if ne(parameters.dependsOn, '') }}: + dependsOn: ${{ parameters.dependsOn }} + + ${{ if ne(parameters.displayName, '') }}: + displayName: ${{ parameters.displayName }} + + ${{ if ne(parameters.pool, '') }}: + pool: ${{ parameters.pool }} + + ${{ if ne(parameters.strategy, '') }}: + strategy: ${{ parameters.strategy }} + + ${{ if ne(parameters.timeoutInMinutes, '') }}: + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + + ${{ if ne(parameters.templateContext, '') }}: + templateContext: ${{ parameters.templateContext }} + + variables: + - ${{ if ne(parameters.enableTelemetry, 'false') }}: + - name: DOTNET_CLI_TELEMETRY_PROFILE + value: '$(Build.Repository.Uri)' + - ${{ if eq(parameters.enableRichCodeNavigation, 'true') }}: + - name: EnableRichCodeNavigation + value: 'true' + # Retry signature validation up to three times, waiting 2 seconds between attempts. + # See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures + - name: NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY + value: 3,2000 + - ${{ each variable in parameters.variables }}: + # handle name-value variable syntax + # example: + # - name: [key] + # value: [value] + - ${{ if ne(variable.name, '') }}: + - name: ${{ variable.name }} + value: ${{ variable.value }} + + # handle variable groups + - ${{ if ne(variable.group, '') }}: + - group: ${{ variable.group }} + + # handle template variable syntax + # example: + # - template: path/to/template.yml + # parameters: + # [key]: [value] + - ${{ if ne(variable.template, '') }}: + - template: ${{ variable.template }} + ${{ if ne(variable.parameters, '') }}: + parameters: ${{ variable.parameters }} + + # handle key-value variable syntax. + # example: + # - [key]: [value] + - ${{ if and(eq(variable.name, ''), eq(variable.group, ''), eq(variable.template, '')) }}: + - ${{ each pair in variable }}: + - name: ${{ pair.key }} + value: ${{ pair.value }} + + # DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds + - ${{ if and(eq(parameters.enableTelemetry, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - group: DotNet-HelixApi-Access + + ${{ if ne(parameters.workspace, '') }}: + workspace: ${{ parameters.workspace }} + + steps: + - ${{ if eq(parameters.is1ESPipeline, '') }}: + - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error + + - ${{ if ne(parameters.preSteps, '') }}: + - ${{ each preStep in parameters.preSteps }}: + - ${{ preStep }} + + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if eq(parameters.enableMicrobuild, 'true') }}: + - task: MicroBuildSigningPlugin@4 + displayName: Install MicroBuild plugin + inputs: + signType: $(_SignType) + zipSources: false + feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + ${{ if eq(parameters.microbuildUseESRP, true) }}: + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea + ${{ else }}: + ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca + env: + TeamName: $(_TeamName) + MicroBuildOutputFolderOverride: '$(Agent.TempDirectory)' + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) + + - ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}: + - task: NuGetAuthenticate@1 + + - ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}: + - task: DownloadPipelineArtifact@2 + inputs: + buildType: current + artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }} + targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }} + itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }} + + - ${{ each step in parameters.steps }}: + - ${{ step }} + + - ${{ if eq(parameters.enableRichCodeNavigation, true) }}: + - task: RichCodeNavIndexer@0 + displayName: RichCodeNav Upload + inputs: + languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }} + environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'internal') }} + richNavLogOutputDirectory: $(System.DefaultWorkingDirectory)/artifacts/bin + uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} + continueOnError: true + + - ${{ each step in parameters.componentGovernanceSteps }}: + - ${{ step }} + + - ${{ if eq(parameters.enableMicrobuild, 'true') }}: + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: MicroBuildCleanup@1 + displayName: Execute Microbuild cleanup tasks + condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + env: + TeamName: $(_TeamName) + + # Publish test results + - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'xunit')) }}: + - task: PublishTestResults@2 + displayName: Publish XUnit Test Results + inputs: + testResultsFormat: 'xUnit' + testResultsFiles: '*.xml' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' + testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit + mergeTestResults: ${{ parameters.mergeTestResults }} + continueOnError: true + condition: always() + - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'vstest')) }}: + - task: PublishTestResults@2 + displayName: Publish TRX Test Results + inputs: + testResultsFormat: 'VSTest' + testResultsFiles: '*.trx' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' + testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx + mergeTestResults: ${{ parameters.mergeTestResults }} + continueOnError: true + condition: always() + + # gather artifacts + - ${{ if ne(parameters.artifacts.publish, '') }}: + - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: + - task: CopyFiles@2 + displayName: Gather binaries for publish to artifacts + inputs: + SourceFolder: 'artifacts/bin' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin' + - task: CopyFiles@2 + displayName: Gather packages for publish to artifacts + inputs: + SourceFolder: 'artifacts/packages' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages' + - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: + - task: CopyFiles@2 + displayName: Gather logs for publish to artifacts + inputs: + SourceFolder: 'artifacts/log' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/log' + continueOnError: true + condition: always() + + - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: + - task: CopyFiles@2 + displayName: Gather logs for publish to artifacts + inputs: + SourceFolder: 'artifacts/log/$(_BuildConfig)' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' + continueOnError: true + condition: always() + - ${{ if eq(parameters.enableBuildRetry, 'true') }}: + - task: CopyFiles@2 + displayName: Gather buildconfiguration for build retry + inputs: + SourceFolder: '$(System.DefaultWorkingDirectory)/eng/common/BuildConfiguration' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/eng/common/BuildConfiguration' + continueOnError: true + condition: always() + - ${{ each step in parameters.artifactPublishSteps }}: + - ${{ step }} diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml new file mode 100644 index 000000000000..edefa789d360 --- /dev/null +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -0,0 +1,121 @@ +parameters: + # Optional: dependencies of the job + dependsOn: '' + + # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + pool: '' + + CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex + GithubPat: $(BotAccount-dotnet-bot-repo-PAT) + + SourcesDirectory: $(System.DefaultWorkingDirectory) + CreatePr: true + AutoCompletePr: false + ReusePr: true + UseLfLineEndings: true + UseCheckedInLocProjectJson: false + SkipLocProjectJsonGeneration: false + LanguageSet: VS_Main_Languages + LclSource: lclFilesInRepo + LclPackageId: '' + RepoType: gitHub + GitHubOrg: dotnet + MirrorRepo: '' + MirrorBranch: main + condition: '' + JobNameSuffix: '' + is1ESPipeline: '' +jobs: +- job: OneLocBuild${{ parameters.JobNameSuffix }} + + dependsOn: ${{ parameters.dependsOn }} + + displayName: OneLocBuild${{ parameters.JobNameSuffix }} + + variables: + - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat + - name: _GenerateLocProjectArguments + value: -SourcesDirectory ${{ parameters.SourcesDirectory }} + -LanguageSet "${{ parameters.LanguageSet }}" + -CreateNeutralXlfs + - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: + - name: _GenerateLocProjectArguments + value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson + - template: /eng/common/core-templates/variables/pool-providers.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + + ${{ if ne(parameters.pool, '') }}: + pool: ${{ parameters.pool }} + ${{ if eq(parameters.pool, '') }}: + 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 + ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + name: $(DncEngInternalBuildPool) + image: 1es-windows-2022 + os: windows + + steps: + - ${{ if eq(parameters.is1ESPipeline, '') }}: + - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error + + - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: + - task: Powershell@2 + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1 + arguments: $(_GenerateLocProjectArguments) + displayName: Generate LocProject.json + condition: ${{ parameters.condition }} + + - task: OneLocBuild@2 + displayName: OneLocBuild + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + inputs: + locProj: eng/Localize/LocProject.json + outDir: $(Build.ArtifactStagingDirectory) + lclSource: ${{ parameters.LclSource }} + lclPackageId: ${{ parameters.LclPackageId }} + isCreatePrSelected: ${{ parameters.CreatePr }} + isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} + ${{ if eq(parameters.CreatePr, true) }}: + isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} + ${{ if eq(parameters.RepoType, 'gitHub') }}: + isShouldReusePrSelected: ${{ parameters.ReusePr }} + packageSourceAuth: patAuth + patVariable: ${{ parameters.CeapexPat }} + ${{ if eq(parameters.RepoType, 'gitHub') }}: + repoType: ${{ parameters.RepoType }} + gitHubPatVariable: "${{ parameters.GithubPat }}" + ${{ if ne(parameters.MirrorRepo, '') }}: + isMirrorRepoSelected: true + gitHubOrganization: ${{ parameters.GitHubOrg }} + mirrorRepo: ${{ parameters.MirrorRepo }} + mirrorBranch: ${{ parameters.MirrorBranch }} + condition: ${{ parameters.condition }} + + - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + args: + displayName: Publish Localization Files + pathToPublish: '$(Build.ArtifactStagingDirectory)/loc' + publishLocation: Container + artifactName: Loc + condition: ${{ parameters.condition }} + + - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + args: + displayName: Publish LocProject.json + pathToPublish: '$(System.DefaultWorkingDirectory)/eng/Localize/' + publishLocation: Container + artifactName: Loc + condition: ${{ parameters.condition }} \ No newline at end of file diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml new file mode 100644 index 000000000000..3cb20fb5041f --- /dev/null +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -0,0 +1,172 @@ +parameters: + configuration: 'Debug' + + # Optional: condition for the job to run + condition: '' + + # Optional: 'true' if future jobs should run even if this job fails + continueOnError: false + + # Optional: dependencies of the job + dependsOn: '' + + # Optional: Include PublishBuildArtifacts task + enablePublishBuildArtifacts: false + + # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + pool: {} + + # Optional: should run as a public build even in the internal project + # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. + runAsPublic: false + + # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing + publishUsingPipelines: false + + # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing + publishAssetsImmediately: false + + artifactsPublishingAdditionalParameters: '' + + signingValidationAdditionalParameters: '' + + is1ESPipeline: '' + + repositoryAlias: self + + officialBuildId: '' + +jobs: +- job: Asset_Registry_Publish + + dependsOn: ${{ parameters.dependsOn }} + timeoutInMinutes: 150 + + ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + displayName: Publish Assets + ${{ else }}: + displayName: Publish to Build Asset Registry + + variables: + - template: /eng/common/core-templates/variables/pool-providers.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - group: Publish-Build-Assets + - group: AzureDevOps-Artifact-Feeds-Pats + - name: runCodesignValidationInjection + value: false + # unconditional - needed for logs publishing (redactor tool version) + - template: /eng/common/core-templates/post-build/common-variables.yml + - name: OfficialBuildId + ${{ if ne(parameters.officialBuildId, '') }}: + value: ${{ parameters.officialBuildId }} + ${{ else }}: + value: $(Build.BuildNumber) + + 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 + ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + name: NetCore1ESPool-Publishing-Internal + image: windows.vs2022.amd64 + os: windows + steps: + - ${{ if eq(parameters.is1ESPipeline, '') }}: + - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error + + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - checkout: ${{ parameters.repositoryAlias }} + fetchDepth: 3 + clean: true + + - task: DownloadBuildArtifacts@0 + displayName: Download artifact + inputs: + artifactName: AssetManifests + downloadPath: '$(Build.StagingDirectory)/Download' + checkDownloadedFiles: true + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + + - task: NuGetAuthenticate@1 + + - task: AzureCLI@2 + displayName: Publish Build Assets + inputs: + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1 + arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' + /p:MaestroApiEndpoint=https://maestro.dot.net + /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} + /p:OfficialBuildId=$(OfficialBuildId) + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + + - task: powershell@2 + displayName: Create ReleaseConfigs Artifact + inputs: + targetType: inline + script: | + New-Item -Path "$(Build.StagingDirectory)/ReleaseConfigs" -ItemType Directory -Force + $filePath = "$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt" + Add-Content -Path $filePath -Value $(BARBuildId) + Add-Content -Path $filePath -Value "$(DefaultChannels)" + Add-Content -Path $filePath -Value $(IsStableBuild) + + $symbolExclusionfile = "$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt" + if (Test-Path -Path $symbolExclusionfile) + { + Write-Host "SymbolExclusionFile exists" + Copy-Item -Path $symbolExclusionfile -Destination "$(Build.StagingDirectory)/ReleaseConfigs" + } + + - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + args: + displayName: Publish ReleaseConfigs Artifact + pathToPublish: '$(Build.StagingDirectory)/ReleaseConfigs' + publishLocation: Container + artifactName: ReleaseConfigs + + - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + is1ESPipeline: ${{ parameters.is1ESPipeline }} + + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + + - task: AzureCLI@2 + displayName: Publish Using Darc + inputs: + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: > + -BuildId $(BARBuildId) + -PublishingInfraVersion 3 + -AzdoToken '$(System.AccessToken)' + -WaitPublishingFinish true + -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' + + - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: + - template: /eng/common/core-templates/steps/publish-logs.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + JobLabel: 'Publish_Artifacts_Logs' diff --git a/eng/common/core-templates/job/source-build.yml b/eng/common/core-templates/job/source-build.yml new file mode 100644 index 000000000000..0e5458e1f46c --- /dev/null +++ b/eng/common/core-templates/job/source-build.yml @@ -0,0 +1,99 @@ +parameters: + # This template adds arcade-powered source-build to CI. The template produces a server job with a + # default ID 'Source_Build_Complete' to put in a dependency list if necessary. + + # Specifies the prefix for source-build jobs added to pipeline. Use this if disambiguation needed. + jobNamePrefix: 'Source_Build' + + # Defines the platform on which to run the job. By default, a linux-x64 machine, suitable for + # managed-only repositories. This is an object with these properties: + # + # name: '' + # The name of the job. This is included in the job ID. + # targetRID: '' + # The name of the target RID to use, instead of the one auto-detected by Arcade. + # nonPortable: false + # Enables non-portable mode. This means a more specific RID (e.g. fedora.32-x64 rather than + # linux-x64), and compiling against distro-provided packages rather than portable ones. + # skipPublishValidation: false + # Disables publishing validation. By default, a check is performed to ensure no packages are + # published by source-build. + # container: '' + # A container to use. Runs in docker. + # pool: {} + # A pool to use. Runs directly on an agent. + # buildScript: '' + # Specifies the build script to invoke to perform the build in the repo. The default + # './build.sh' should work for typical Arcade repositories, but this is customizable for + # difficult situations. + # buildArguments: '' + # Specifies additional build arguments to pass to the build script. + # jobProperties: {} + # A list of job properties to inject at the top level, for potential extensibility beyond + # container and pool. + platform: {} + + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + + is1ESPipeline: '' + + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + +jobs: +- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} + displayName: Source-Build (${{ parameters.platform.name }}) + + ${{ each property in parameters.platform.jobProperties }}: + ${{ property.key }}: ${{ property.value }} + + ${{ if ne(parameters.platform.container, '') }}: + container: ${{ parameters.platform.container }} + + ${{ if eq(parameters.platform.pool, '') }}: + # The default VM host AzDO pool. This should be capable of running Docker containers: almost all + # source-build builds run in Docker, including the default managed platform. + # /eng/common/core-templates/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic + ${{ if eq(parameters.is1ESPipeline, 'true') }}: + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')] + demands: ImageOverride -equals build.ubuntu.2004.amd64 + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] + image: Azure-Linux-3-Amd64 + os: linux + ${{ else }}: + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')] + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64 + ${{ if ne(parameters.platform.pool, '') }}: + pool: ${{ parameters.platform.pool }} + + workspace: + clean: all + + steps: + - ${{ if eq(parameters.is1ESPipeline, '') }}: + - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error + + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/core-templates/steps/enable-internal-sources.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + - template: /eng/common/core-templates/steps/enable-internal-runtimes.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + - template: /eng/common/core-templates/steps/source-build.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + platform: ${{ parameters.platform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} diff --git a/eng/common/core-templates/job/source-index-stage1.yml b/eng/common/core-templates/job/source-index-stage1.yml new file mode 100644 index 000000000000..ddf8c2e00d80 --- /dev/null +++ b/eng/common/core-templates/job/source-index-stage1.yml @@ -0,0 +1,81 @@ +parameters: + runAsPublic: false + sourceIndexUploadPackageVersion: 2.0.0-20250425.2 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 + sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json + sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" + preSteps: [] + binlogPath: artifacts/log/Debug/Build.binlog + condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') + dependsOn: '' + pool: '' + is1ESPipeline: '' + +jobs: +- job: SourceIndexStage1 + dependsOn: ${{ parameters.dependsOn }} + condition: ${{ parameters.condition }} + variables: + - name: SourceIndexUploadPackageVersion + value: ${{ parameters.sourceIndexUploadPackageVersion }} + - name: SourceIndexProcessBinlogPackageVersion + value: ${{ parameters.sourceIndexProcessBinlogPackageVersion }} + - name: SourceIndexPackageSource + value: ${{ parameters.sourceIndexPackageSource }} + - name: BinlogPath + value: ${{ parameters.binlogPath }} + - template: /eng/common/core-templates/variables/pool-providers.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + + ${{ if ne(parameters.pool, '') }}: + pool: ${{ parameters.pool }} + ${{ if eq(parameters.pool, '') }}: + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + image: 1es-windows-2022-open + os: windows + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + image: 1es-windows-2022 + os: windows + + steps: + - ${{ if eq(parameters.is1ESPipeline, '') }}: + - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error + + - ${{ each preStep in parameters.preSteps }}: + - ${{ preStep }} + + - task: UseDotNet@2 + displayName: Use .NET 8 SDK + inputs: + packageType: sdk + version: 8.0.x + installationPath: $(Agent.TempDirectory)/dotnet + workingDirectory: $(Agent.TempDirectory) + + - script: | + $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(sourceIndexProcessBinlogPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools + $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(sourceIndexUploadPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools + displayName: Download Tools + # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk. + workingDirectory: $(Agent.TempDirectory) + + - script: ${{ parameters.sourceIndexBuildCommand }} + displayName: Build Repository + + - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output + displayName: Process Binlog into indexable sln + + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: AzureCLI@2 + displayName: Log in to Azure and upload stage1 artifacts to source index + inputs: + azureSubscription: 'SourceDotNet Stage1 Publish' + addSpnToEnvironment: true + scriptType: 'ps' + scriptLocation: 'inlineScript' + inlineScript: | + $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 diff --git a/eng/common/core-templates/jobs/codeql-build.yml b/eng/common/core-templates/jobs/codeql-build.yml new file mode 100644 index 000000000000..4571a7864df6 --- /dev/null +++ b/eng/common/core-templates/jobs/codeql-build.yml @@ -0,0 +1,33 @@ +parameters: + # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md + continueOnError: false + # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job + jobs: [] + # Optional: if specified, restore and use this version of Guardian instead of the default. + overrideGuardianVersion: '' + is1ESPipeline: '' + +jobs: +- template: /eng/common/core-templates/jobs/jobs.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + enableMicrobuild: false + enablePublishBuildArtifacts: false + enablePublishTestResults: false + enablePublishBuildAssets: false + enablePublishUsingPipelines: false + enableTelemetry: true + + variables: + - group: Publish-Build-Assets + # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in + # sync with the packages.config file. + - name: DefaultGuardianVersion + value: 0.109.0 + - name: GuardianPackagesConfigFile + value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config + - name: GuardianVersion + value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} + + jobs: ${{ parameters.jobs }} + diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml new file mode 100644 index 000000000000..bf33cdc2cc77 --- /dev/null +++ b/eng/common/core-templates/jobs/jobs.yml @@ -0,0 +1,123 @@ +parameters: + # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md + continueOnError: false + + # Optional: Include PublishBuildArtifacts task + enablePublishBuildArtifacts: false + + # Optional: Enable publishing using release pipelines + enablePublishUsingPipelines: false + + # Optional: Enable running the source-build jobs to build repo from source + enableSourceBuild: false + + # Optional: Parameters for source-build template. + # See /eng/common/core-templates/jobs/source-build.yml for options + sourceBuildParameters: [] + + graphFileGeneration: + # Optional: Enable generating the graph files at the end of the build + enabled: false + # Optional: Include toolset dependencies in the generated graph files + includeToolset: false + + # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job + jobs: [] + + # Optional: Override automatically derived dependsOn value for "publish build assets" job + publishBuildAssetsDependsOn: '' + + # Optional: Publish the assets as soon as the publish to BAR stage is complete, rather doing so in a separate stage. + publishAssetsImmediately: false + + # Optional: If using publishAssetsImmediately and additional parameters are needed, can be used to send along additional parameters (normally sent to post-build.yml) + artifactsPublishingAdditionalParameters: '' + signingValidationAdditionalParameters: '' + + # Optional: should run as a public build even in the internal project + # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. + runAsPublic: false + + enableSourceIndex: false + sourceIndexParams: {} + + artifacts: {} + is1ESPipeline: '' + repositoryAlias: self + officialBuildId: '' + +# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, +# and some (Microbuild) should only be applied to non-PR cases for internal builds. + +jobs: +- ${{ each job in parameters.jobs }}: + - ${{ if eq(parameters.is1ESPipeline, 'true') }}: + - template: /eng/common/templates-official/job/job.yml + parameters: + # pass along parameters + ${{ each parameter in parameters }}: + ${{ if ne(parameter.key, 'jobs') }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # pass along job properties + ${{ each property in job }}: + ${{ if ne(property.key, 'job') }}: + ${{ property.key }}: ${{ property.value }} + + name: ${{ job.job }} + + - ${{ else }}: + - template: /eng/common/templates/job/job.yml + parameters: + # pass along parameters + ${{ each parameter in parameters }}: + ${{ if ne(parameter.key, 'jobs') }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # pass along job properties + ${{ each property in job }}: + ${{ if ne(property.key, 'job') }}: + ${{ property.key }}: ${{ property.value }} + + name: ${{ job.job }} + +- ${{ if eq(parameters.enableSourceBuild, true) }}: + - template: /eng/common/core-templates/jobs/source-build.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + allCompletedJobId: Source_Build_Complete + ${{ each parameter in parameters.sourceBuildParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + +- ${{ if eq(parameters.enableSourceIndex, 'true') }}: + - template: ../job/source-index-stage1.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + runAsPublic: ${{ parameters.runAsPublic }} + ${{ each parameter in parameters.sourceIndexParams }}: + ${{ parameter.key }}: ${{ parameter.value }} + +- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: + - template: ../job/publish-build-assets.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + continueOnError: ${{ parameters.continueOnError }} + dependsOn: + - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}: + - ${{ each job in parameters.publishBuildAssetsDependsOn }}: + - ${{ job.job }} + - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}: + - ${{ each job in parameters.jobs }}: + - ${{ job.job }} + - ${{ if eq(parameters.enableSourceBuild, true) }}: + - Source_Build_Complete + + runAsPublic: ${{ parameters.runAsPublic }} + publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} + publishAssetsImmediately: ${{ parameters.publishAssetsImmediately }} + enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} + repositoryAlias: ${{ parameters.repositoryAlias }} + officialBuildId: ${{ parameters.officialBuildId }} diff --git a/eng/common/core-templates/jobs/source-build.yml b/eng/common/core-templates/jobs/source-build.yml new file mode 100644 index 000000000000..0b408a67bd51 --- /dev/null +++ b/eng/common/core-templates/jobs/source-build.yml @@ -0,0 +1,63 @@ +parameters: + # This template adds arcade-powered source-build to CI. A job is created for each platform, as + # well as an optional server job that completes when all platform jobs complete. + + # The name of the "join" job for all source-build platforms. If set to empty string, the job is + # not included. Existing repo pipelines can use this job depend on all source-build jobs + # completing without maintaining a separate list of every single job ID: just depend on this one + # server job. By default, not included. Recommended name if used: 'Source_Build_Complete'. + allCompletedJobId: '' + + # See /eng/common/core-templates/job/source-build.yml + jobNamePrefix: 'Source_Build' + + # This is the default platform provided by Arcade, intended for use by a managed-only repo. + defaultManagedPlatform: + name: 'Managed' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9' + + # Defines the platforms on which to run build jobs. One job is created for each platform, and the + # object in this array is sent to the job template as 'platform'. If no platforms are specified, + # one job runs on 'defaultManagedPlatform'. + platforms: [] + + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + + is1ESPipeline: '' + + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + +jobs: + +- ${{ if ne(parameters.allCompletedJobId, '') }}: + - job: ${{ parameters.allCompletedJobId }} + displayName: Source-Build Complete + pool: server + dependsOn: + - ${{ each platform in parameters.platforms }}: + - ${{ parameters.jobNamePrefix }}_${{ platform.name }} + - ${{ if eq(length(parameters.platforms), 0) }}: + - ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }} + +- ${{ each platform in parameters.platforms }}: + - template: /eng/common/core-templates/job/source-build.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + jobNamePrefix: ${{ parameters.jobNamePrefix }} + platform: ${{ platform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} + enableInternalSources: ${{ parameters.enableInternalSources }} + +- ${{ if eq(length(parameters.platforms), 0) }}: + - template: /eng/common/core-templates/job/source-build.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + jobNamePrefix: ${{ parameters.jobNamePrefix }} + platform: ${{ parameters.defaultManagedPlatform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/core-templates/post-build/common-variables.yml b/eng/common/core-templates/post-build/common-variables.yml new file mode 100644 index 000000000000..d5627a994ae5 --- /dev/null +++ b/eng/common/core-templates/post-build/common-variables.yml @@ -0,0 +1,22 @@ +variables: + - group: Publish-Build-Assets + + # Whether the build is internal or not + - name: IsInternalBuild + value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} + + # Default Maestro++ API Endpoint and API Version + - name: MaestroApiEndPoint + value: "https://maestro.dot.net" + - name: MaestroApiVersion + value: "2020-02-20" + + - name: SourceLinkCLIVersion + value: 3.0.0 + - name: SymbolToolVersion + value: 1.0.1 + - name: BinlogToolVersion + value: 1.0.11 + + - name: runCodesignValidationInjection + value: false diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml new file mode 100644 index 000000000000..864427d9694a --- /dev/null +++ b/eng/common/core-templates/post-build/post-build.yml @@ -0,0 +1,327 @@ +parameters: + # Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST. + # Publishing V1 is no longer supported + # Publishing V2 is no longer supported + # Publishing V3 is the default + - name: publishingInfraVersion + displayName: Which version of publishing should be used to promote the build definition? + type: number + default: 3 + values: + - 3 + + - name: BARBuildId + displayName: BAR Build Id + type: number + default: 0 + + - name: PromoteToChannelIds + displayName: Channel to promote BARBuildId to + type: string + default: '' + + - name: enableSourceLinkValidation + displayName: Enable SourceLink validation + type: boolean + default: false + + - name: enableSigningValidation + displayName: Enable signing validation + type: boolean + default: true + + - name: enableSymbolValidation + displayName: Enable symbol validation + type: boolean + default: false + + - name: enableNugetValidation + displayName: Enable NuGet validation + type: boolean + default: true + + - name: publishInstallersAndChecksums + displayName: Publish installers and checksums + type: boolean + default: true + + - name: requireDefaultChannels + displayName: Fail the build if there are no default channel(s) registrations for the current build + type: boolean + default: false + + - name: SDLValidationParameters + type: object + default: + enable: false + publishGdn: false + continueOnError: false + params: '' + artifactNames: '' + downloadArtifacts: true + + # These parameters let the user customize the call to sdk-task.ps1 for publishing + # symbols & general artifacts as well as for signing validation + - name: symbolPublishingAdditionalParameters + displayName: Symbol publishing additional parameters + type: string + default: '' + + - name: artifactsPublishingAdditionalParameters + displayName: Artifact publishing additional parameters + type: string + default: '' + + - name: signingValidationAdditionalParameters + displayName: Signing validation additional parameters + type: string + default: '' + + # Which stages should finish execution before post-build stages start + - name: validateDependsOn + type: object + default: + - build + + - name: publishDependsOn + type: object + default: + - Validate + + # Optional: Call asset publishing rather than running in a separate stage + - name: publishAssetsImmediately + type: boolean + default: false + + - name: is1ESPipeline + type: boolean + default: false + +stages: +- ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: + - stage: Validate + dependsOn: ${{ parameters.validateDependsOn }} + displayName: Validate Build Assets + variables: + - template: /eng/common/core-templates/post-build/common-variables.yml + - template: /eng/common/core-templates/variables/pool-providers.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + jobs: + - job: + displayName: NuGet Validation + condition: and(succeededOrFailed(), eq( ${{ parameters.enableNugetValidation }}, '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: windows.vs2022.amd64 + os: windows + ${{ else }}: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals windows.vs2022.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 Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts + checkDownloadedFiles: true + + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1 + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ + + - job: + displayName: Signing Validation + condition: and( eq( ${{ parameters.enableSigningValidation }}, 'true'), ne( variables['PostBuildSign'], '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.vs2022.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 Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts + checkDownloadedFiles: true + itemPattern: | + ** + !**/Microsoft.SourceBuild.Intermediate.*.nupkg + + # 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 + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@1 + displayName: 'Authenticate to AzDO Feeds' + + # Signing validation will optionally work with the buildmanifest file which is downloaded from + # Azure DevOps above. + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task SigningValidation -restore -msbuildEngine vs + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' + /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' + ${{ parameters.signingValidationAdditionalParameters }} + + - template: /eng/common/core-templates/steps/publish-logs.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + StageLabel: 'Validation' + 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.vs2022.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 + +- ${{ if ne(parameters.publishAssetsImmediately, 'true') }}: + - stage: publish_using_darc + ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: + dependsOn: ${{ parameters.publishDependsOn }} + ${{ else }}: + dependsOn: ${{ parameters.validateDependsOn }} + displayName: Publish using Darc + variables: + - template: /eng/common/core-templates/post-build/common-variables.yml + - template: /eng/common/core-templates/variables/pool-providers.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + jobs: + - job: + displayName: Publish Using Darc + timeoutInMinutes: 120 + 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: NetCore1ESPool-Publishing-Internal + image: windows.vs2022.amd64 + os: windows + ${{ else }}: + name: NetCore1ESPool-Publishing-Internal + demands: ImageOverride -equals windows.vs2022.amd64 + steps: + - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + is1ESPipeline: ${{ parameters.is1ESPipeline }} + + - task: NuGetAuthenticate@1 + + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + + - task: AzureCLI@2 + displayName: Publish Using Darc + inputs: + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: > + -BuildId $(BARBuildId) + -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} + -AzdoToken '$(System.AccessToken)' + -WaitPublishingFinish true + -RequireDefaultChannels ${{ parameters.requireDefaultChannels }} + -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/core-templates/post-build/setup-maestro-vars.yml b/eng/common/core-templates/post-build/setup-maestro-vars.yml new file mode 100644 index 000000000000..a7abd58c4bb6 --- /dev/null +++ b/eng/common/core-templates/post-build/setup-maestro-vars.yml @@ -0,0 +1,74 @@ +parameters: + BARBuildId: '' + PromoteToChannelIds: '' + is1ESPipeline: '' + +steps: + - ${{ if eq(parameters.is1ESPipeline, '') }}: + - '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 + displayName: Download Release Configs + inputs: + buildType: current + artifactName: ReleaseConfigs + checkDownloadedFiles: true + + - task: AzureCLI@2 + name: setReleaseVars + displayName: Set Release Configs Vars + inputs: + azureSubscription: "Darc: Maestro Production" + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | + try { + if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { + $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt + + $BarId = $Content | Select -Index 0 + $Channels = $Content | Select -Index 1 + $IsStableBuild = $Content | Select -Index 2 + + $AzureDevOpsProject = $Env:System_TeamProject + $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId + $AzureDevOpsBuildId = $Env:Build_BuildId + } + else { + . $(System.DefaultWorkingDirectory)\eng\common\tools.ps1 + $darc = Get-Darc + $buildInfo = & $darc get-build ` + --id ${{ parameters.BARBuildId }} ` + --extended ` + --output-format json ` + --ci ` + | convertFrom-Json + + $BarId = ${{ parameters.BARBuildId }} + $Channels = $Env:PromoteToMaestroChannels -split "," + $Channels = $Channels -join "][" + $Channels = "[$Channels]" + + $IsStableBuild = $buildInfo.stable + $AzureDevOpsProject = $buildInfo.azureDevOpsProject + $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId + $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId + } + + Write-Host "##vso[task.setvariable variable=BARBuildId]$BarId" + Write-Host "##vso[task.setvariable variable=TargetChannels]$Channels" + Write-Host "##vso[task.setvariable variable=IsStableBuild]$IsStableBuild" + + Write-Host "##vso[task.setvariable variable=AzDOProjectName]$AzureDevOpsProject" + Write-Host "##vso[task.setvariable variable=AzDOPipelineId]$AzureDevOpsBuildDefinitionId" + Write-Host "##vso[task.setvariable variable=AzDOBuildId]$AzureDevOpsBuildId" + } + catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + exit 1 + } + env: + PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/eng/common/core-templates/steps/component-governance.yml b/eng/common/core-templates/steps/component-governance.yml new file mode 100644 index 000000000000..cf0649aa9565 --- /dev/null +++ b/eng/common/core-templates/steps/component-governance.yml @@ -0,0 +1,16 @@ +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/enable-internal-runtimes.yml b/eng/common/core-templates/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..6bdbf62ac500 --- /dev/null +++ b/eng/common/core-templates/steps/enable-internal-runtimes.yml @@ -0,0 +1,32 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true +- name: is1ESPipeline + type: boolean + default: false + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/core-templates/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl + is1ESPipeline: ${{ parameters.is1ESPipeline }} \ No newline at end of file diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml new file mode 100644 index 000000000000..4085512b6909 --- /dev/null +++ b/eng/common/core-templates/steps/enable-internal-sources.yml @@ -0,0 +1,47 @@ +parameters: +# This is the Azure federated service connection that we log into to get an access token. +- name: nugetFederatedServiceConnection + type: string + default: 'dnceng-artifacts-feeds-read' +- name: is1ESPipeline + type: boolean + default: false +# Legacy parameters to allow for PAT usage +- name: legacyCredential + type: string + default: '' + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if ne(parameters.legacyCredential, '') }}: + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token + env: + Token: ${{ parameters.legacyCredential }} + # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. + # If running on DevDiv, NuGetAuthenticate is not really an option. It's scoped to a single feed, and we have many feeds that + # may be added. Instead, we'll use the traditional approach (add cred to nuget.config), but use an account token. + - ${{ else }}: + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config + - ${{ else }}: + - template: /eng/common/templates/steps/get-federated-access-token.yml + parameters: + federatedServiceConnection: ${{ parameters.nugetFederatedServiceConnection }} + outputVariableName: 'dnceng-artifacts-feeds-read-access-token' + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) + # This is required in certain scenarios to install the ADO credential provider. + # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others + # (e.g. dotnet msbuild). + - task: NuGetAuthenticate@1 diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml new file mode 100644 index 000000000000..7f5b84c4cb82 --- /dev/null +++ b/eng/common/core-templates/steps/generate-sbom.yml @@ -0,0 +1,54 @@ +# 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: 9.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 + +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) + diff --git a/eng/common/core-templates/steps/get-delegation-sas.yml b/eng/common/core-templates/steps/get-delegation-sas.yml new file mode 100644 index 000000000000..9db5617ea7de --- /dev/null +++ b/eng/common/core-templates/steps/get-delegation-sas.yml @@ -0,0 +1,55 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: false +- name: storageAccount + type: string +- name: container + type: string +- name: permissions + type: string + default: 'rl' +- name: is1ESPipeline + type: boolean + default: false + +steps: +- task: AzureCLI@2 + displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # Calculate the expiration of the SAS token and convert to UTC + $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + # Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads + # of correlation payloads. https://github.com/dotnet/dnceng/issues/3484 + $sas = "" + do { + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + } while($sas.IndexOf('/') -ne -1) + + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + + if ('${{ parameters.base64Encode }}' -eq 'true') { + $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) + } + + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" diff --git a/eng/common/core-templates/steps/get-federated-access-token.yml b/eng/common/core-templates/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..3a4d4410c482 --- /dev/null +++ b/eng/common/core-templates/steps/get-federated-access-token.yml @@ -0,0 +1,42 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: is1ESPipeline + type: boolean +- name: stepName + type: string + default: 'getFederatedAccessToken' +- name: condition + type: string + default: '' +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' +- name: isStepOutputVariable + type: boolean + default: false + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + name: ${{ parameters.stepName }} + ${{ if ne(parameters.condition, '') }}: + condition: ${{ parameters.condition }} + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken" \ No newline at end of file diff --git a/eng/common/core-templates/steps/publish-build-artifacts.yml b/eng/common/core-templates/steps/publish-build-artifacts.yml new file mode 100644 index 000000000000..f24ce346684e --- /dev/null +++ b/eng/common/core-templates/steps/publish-build-artifacts.yml @@ -0,0 +1,20 @@ +parameters: +- name: is1ESPipeline + type: boolean + default: false +- name: args + type: object + default: {} +steps: +- ${{ if ne(parameters.is1ESPipeline, true) }}: + - template: /eng/common/templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + ${{ each parameter in parameters.args }}: + ${{ parameter.key }}: ${{ parameter.value }} +- ${{ else }}: + - template: /eng/common/templates-official/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + ${{ each parameter in parameters.args }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml new file mode 100644 index 000000000000..0623ac6e1123 --- /dev/null +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -0,0 +1,58 @@ +parameters: + StageLabel: '' + JobLabel: '' + CustomSensitiveDataList: '' + # A default - in case value from eng/common/core-templates/post-build/common-variables.yml is not passed + BinlogToolVersion: '1.0.11' + is1ESPipeline: false + +steps: +- task: Powershell@2 + displayName: Prepare Binlogs to Upload + inputs: + targetType: inline + script: | + New-Item -ItemType Directory $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + Move-Item -Path $(System.DefaultWorkingDirectory)/artifacts/log/Debug/* $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + continueOnError: true + condition: always() + +- task: PowerShell@2 + displayName: Redact Logs + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/redact-logs.ps1 + # For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml + # Sensitive data can as well be added to $(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' + # If the file exists - sensitive data for redaction will be sourced from it + # (single entry per line, lines starting with '# ' are considered comments and skipped) + arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs' + -BinlogToolVersion ${{parameters.BinlogToolVersion}} + -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' + '$(publishing-dnceng-devdiv-code-r-build-re)' + '$(MaestroAccessToken)' + '$(dn-bot-all-orgs-artifact-feeds-rw)' + '$(akams-client-id)' + '$(microsoft-symbol-server-pat)' + '$(symweb-symbol-server-pat)' + '$(dn-bot-all-orgs-build-rw-code-rw)' + ${{parameters.CustomSensitiveDataList}} + continueOnError: true + condition: always() + +- task: CopyFiles@2 + displayName: Gather post build logs + inputs: + SourceFolder: '$(System.DefaultWorkingDirectory)/PostBuildLogs' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs' + +- template: /eng/common/core-templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + args: + displayName: Publish Logs + pathToPublish: '$(Build.ArtifactStagingDirectory)/PostBuildLogs' + publishLocation: Container + artifactName: PostBuildLogs + continueOnError: true + condition: always() diff --git a/eng/common/core-templates/steps/publish-pipeline-artifacts.yml b/eng/common/core-templates/steps/publish-pipeline-artifacts.yml new file mode 100644 index 000000000000..2efec04dc2c1 --- /dev/null +++ b/eng/common/core-templates/steps/publish-pipeline-artifacts.yml @@ -0,0 +1,20 @@ +parameters: +- name: is1ESPipeline + type: boolean + default: false + +- name: args + type: object + default: {} + +steps: +- ${{ if ne(parameters.is1ESPipeline, true) }}: + - template: /eng/common/templates/steps/publish-pipeline-artifacts.yml + parameters: + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} +- ${{ else }}: + - template: /eng/common/templates-official/steps/publish-pipeline-artifacts.yml + parameters: + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/core-templates/steps/retain-build.yml b/eng/common/core-templates/steps/retain-build.yml new file mode 100644 index 000000000000..83d97a26a01f --- /dev/null +++ b/eng/common/core-templates/steps/retain-build.yml @@ -0,0 +1,28 @@ +parameters: + # Optional azure devops PAT with build execute permissions for the build's organization, + # only needed if the build that should be retained ran on a different organization than + # the pipeline where this template is executing from + Token: '' + # Optional BuildId to retain, defaults to the current running build + BuildId: '' + # Azure devops Organization URI for the build in the https://dev.azure.com/ format. + # Defaults to the organization the current pipeline is running on + AzdoOrgUri: '$(System.CollectionUri)' + # Azure devops project for the build. Defaults to the project the current pipeline is running on + AzdoProject: '$(System.TeamProject)' + +steps: + - task: powershell@2 + inputs: + targetType: 'filePath' + filePath: eng/common/retain-build.ps1 + pwsh: true + arguments: > + -AzdoOrgUri: ${{parameters.AzdoOrgUri}} + -AzdoProject ${{parameters.AzdoProject}} + -Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }} + -BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}} + displayName: Enable permanent build retention + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + BUILD_ID: $(Build.BuildId) \ No newline at end of file diff --git a/eng/common/core-templates/steps/send-to-helix.yml b/eng/common/core-templates/steps/send-to-helix.yml new file mode 100644 index 000000000000..68fa739c4ab2 --- /dev/null +++ b/eng/common/core-templates/steps/send-to-helix.yml @@ -0,0 +1,93 @@ +# Please remember to update the documentation if you make changes to these parameters! +parameters: + HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ + HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' + HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number + HelixTargetQueues: '' # required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues + HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group + HelixProjectPath: 'eng/common/helixpublish.proj' # optional -- path to the project file to build relative to BUILD_SOURCESDIRECTORY + HelixProjectArguments: '' # optional -- arguments passed to the build command + HelixConfiguration: '' # optional -- additional property attached to a job + HelixPreCommands: '' # optional -- commands to run before Helix work item execution + HelixPostCommands: '' # optional -- commands to run after Helix work item execution + WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects + WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects + WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects + CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload + XUnitProjects: '' # optional -- semicolon-delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true + XUnitWorkItemTimeout: '' # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects + XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects + XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner + XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects + IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion + DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json + DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json + WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." + IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set + HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net ) + Creator: '' # optional -- if the build is external, use this to specify who is sending the job + DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO + condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() + continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false + +steps: + - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' + displayName: ${{ parameters.DisplayNamePrefix }} (Windows) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixConfiguration: ${{ parameters.HelixConfiguration }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + WorkItemCommand: ${{ parameters.WorkItemCommand }} + WorkItemTimeout: ${{ parameters.WorkItemTimeout }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + XUnitProjects: ${{ parameters.XUnitProjects }} + XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} + XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} + XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} + XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + HelixBaseUri: ${{ parameters.HelixBaseUri }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog + displayName: ${{ parameters.DisplayNamePrefix }} (Unix) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixConfiguration: ${{ parameters.HelixConfiguration }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + WorkItemCommand: ${{ parameters.WorkItemCommand }} + WorkItemTimeout: ${{ parameters.WorkItemTimeout }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + XUnitProjects: ${{ parameters.XUnitProjects }} + XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} + XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} + XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} + XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + HelixBaseUri: ${{ parameters.HelixBaseUri }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml new file mode 100644 index 000000000000..7846584d2a77 --- /dev/null +++ b/eng/common/core-templates/steps/source-build.yml @@ -0,0 +1,137 @@ +parameters: + # This template adds arcade-powered source-build to CI. + + # This is a 'steps' template, and is intended for advanced scenarios where the existing build + # infra has a careful build methodology that must be followed. For example, a repo + # (dotnet/runtime) might choose to clone the GitHub repo only once and store it as a pipeline + # artifact for all subsequent jobs to use, to reduce dependence on a strong network connection to + # GitHub. Using this steps template leaves room for that infra to be included. + + # Defines the platform on which to run the steps. See 'eng/common/core-templates/job/source-build.yml' + # for details. The entire object is described in the 'job' template for simplicity, even though + # the usage of the properties on this object is split between the 'job' and 'steps' templates. + platform: {} + + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + + is1ESPipeline: false + +steps: +# Build. Keep it self-contained for simple reusability. (No source-build-specific job variables.) +- script: | + set -x + df -h + + # If file changes are detected, set CopyWipIntoInnerSourceBuildRepo to copy the WIP changes into the inner source build repo. + internalRestoreArgs= + if ! git diff --quiet; then + internalRestoreArgs='/p:CopyWipIntoInnerSourceBuildRepo=true' + # The 'Copy WIP' feature of source build uses git stash to apply changes from the original repo. + # This only works if there is a username/email configured, which won't be the case in most CI runs. + git config --get user.email + if [ $? -ne 0 ]; then + git config user.email dn-bot@microsoft.com + git config user.name dn-bot + fi + fi + + # If building on the internal project, the internal storage variable may be available (usually only if needed) + # In that case, add variables to allow the download of internal runtimes if the specified versions are not found + # in the default public locations. + internalRuntimeDownloadArgs= + if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then + internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' + fi + + buildConfig=Release + # Check if AzDO substitutes in a build config from a variable, and use it if so. + if [ '$(_BuildConfig)' != '$''(_BuildConfig)' ]; then + buildConfig='$(_BuildConfig)' + fi + + officialBuildArgs= + if [ '${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}' = 'True' ]; then + officialBuildArgs='/p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=$(BUILD.BUILDNUMBER)' + fi + + targetRidArgs= + if [ '${{ parameters.platform.targetRID }}' != '' ]; then + targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}' + fi + + runtimeOsArgs= + if [ '${{ parameters.platform.runtimeOS }}' != '' ]; then + runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}' + fi + + baseOsArgs= + if [ '${{ parameters.platform.baseOS }}' != '' ]; then + baseOsArgs='/p:BaseOS=${{ parameters.platform.baseOS }}' + fi + + publishArgs= + if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then + publishArgs='--publish' + fi + + assetManifestFileName=SourceBuild_RidSpecific.xml + if [ '${{ parameters.platform.name }}' != '' ]; then + assetManifestFileName=SourceBuild_${{ parameters.platform.name }}.xml + fi + + ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ + --configuration $buildConfig \ + --restore --build --pack $publishArgs -bl \ + ${{ parameters.platform.buildArguments }} \ + $officialBuildArgs \ + $internalRuntimeDownloadArgs \ + $internalRestoreArgs \ + $targetRidArgs \ + $runtimeOsArgs \ + $baseOsArgs \ + /p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \ + /p:ArcadeBuildFromSource=true \ + /p:DotNetBuildSourceOnly=true \ + /p:DotNetBuildRepo=true \ + /p:AssetManifestFileName=$assetManifestFileName + displayName: Build + +# Upload build logs for diagnosis. +- task: CopyFiles@2 + displayName: Prepare BuildLogs staging directory + inputs: + SourceFolder: '$(System.DefaultWorkingDirectory)' + Contents: | + **/*.log + **/*.binlog + artifacts/sb/prebuilt-report/** + TargetFolder: '$(Build.StagingDirectory)/BuildLogs' + CleanTargetFolder: true + continueOnError: true + condition: succeededOrFailed() + +- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + args: + displayName: Publish BuildLogs + targetPath: '$(Build.StagingDirectory)/BuildLogs' + artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt) + continueOnError: true + condition: succeededOrFailed() + sbomEnabled: false # we don't need SBOM for logs + +# Manually inject component detection so that we can ignore the source build upstream cache, which contains +# a nupkg cache of input packages (a local feed). +# This path must match the upstream cache path in property 'CurrentRepoSourceBuiltNupkgCacheDir' +# in src\Microsoft.DotNet.Arcade.Sdk\tools\SourceBuild\SourceBuildArcade.targets +- template: /eng/common/core-templates/steps/component-governance.yml + parameters: + displayName: Component Detection (Exclude upstream cache) + is1ESPipeline: ${{ parameters.is1ESPipeline }} + ${{ if eq(length(parameters.componentGovernanceIgnoreDirectories), 0) }}: + componentGovernanceIgnoreDirectories: '$(System.DefaultWorkingDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache' + ${{ else }}: + componentGovernanceIgnoreDirectories: ${{ join(',', parameters.componentGovernanceIgnoreDirectories) }} + disableComponentGovernance: ${{ eq(variables['System.TeamProject'], 'public') }} diff --git a/eng/common/core-templates/variables/pool-providers.yml b/eng/common/core-templates/variables/pool-providers.yml new file mode 100644 index 000000000000..41053d382a2e --- /dev/null +++ b/eng/common/core-templates/variables/pool-providers.yml @@ -0,0 +1,8 @@ +parameters: + is1ESPipeline: false + +variables: + - ${{ if eq(parameters.is1ESPipeline, 'true') }}: + - template: /eng/common/templates-official/variables/pool-providers.yml + - ${{ else }}: + - template: /eng/common/templates/variables/pool-providers.yml \ No newline at end of file diff --git a/eng/common/cross/build-android-rootfs.sh b/eng/common/cross/build-android-rootfs.sh index f163fb9dae96..7e9ba2b75ed3 100755 --- a/eng/common/cross/build-android-rootfs.sh +++ b/eng/common/cross/build-android-rootfs.sh @@ -5,15 +5,15 @@ __NDK_Version=r21 usage() { echo "Creates a toolchain and sysroot used for cross-compiling for Android." - echo. + echo echo "Usage: $0 [BuildArch] [ApiLevel]" - echo. + echo echo "BuildArch is the target architecture of Android. Currently only arm64 is supported." echo "ApiLevel is the target Android API level. API levels usually match to Android releases. See https://source.android.com/source/build-numbers.html" - echo. + echo echo "By default, the toolchain and sysroot will be generated in cross/android-rootfs/toolchain/[BuildArch]. You can change this behavior" echo "by setting the TOOLCHAIN_DIR environment variable" - echo. + echo echo "By default, the NDK will be downloaded into the cross/android-rootfs/android-ndk-$__NDK_Version directory. If you already have an NDK installation," echo "you can set the NDK_DIR environment variable to have this script use that installation of the NDK." echo "By default, this script will generate a file, android_platform, in the root of the ROOTFS_DIR directory that contains the RID for the supported and tested Android build: android.28-arm64. This file is to replace '/etc/os-release', which is not available for Android." diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 9caf9b021dbd..4b5e8d7166bd 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -8,7 +8,7 @@ usage() echo "BuildArch can be: arm(default), arm64, armel, armv6, ppc64le, riscv64, s390x, x64, x86" echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine" echo " for alpine can be specified with version: alpineX.YY or alpineedge" - echo " for FreeBSD can be: freebsd12, freebsd13" + echo " for FreeBSD can be: freebsd13, freebsd14" echo " for illumos can be: illumos" echo " for Haiku can be: haiku." echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD" @@ -30,7 +30,8 @@ __IllumosArch=arm7 __HaikuArch=arm __QEMUArch=arm __UbuntuArch=armhf -__UbuntuRepo="http://ports.ubuntu.com/" +__UbuntuRepo= +__UbuntuSuites="updates security backports" __LLDB_Package="liblldb-3.9-dev" __SkipUnmount=0 @@ -71,9 +72,9 @@ __AlpinePackages+=" krb5-dev" __AlpinePackages+=" openssl-dev" __AlpinePackages+=" zlib-dev" -__FreeBSDBase="12.4-RELEASE" +__FreeBSDBase="13.3-RELEASE" __FreeBSDPkg="1.17.0" -__FreeBSDABI="12" +__FreeBSDABI="13" __FreeBSDPackages="libunwind" __FreeBSDPackages+=" icu" __FreeBSDPackages+=" libinotify" @@ -129,6 +130,7 @@ __AlpineKeys=' 616db30d:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnpUpyWDWjlUk3smlWeA0\nlIMW+oJ38t92CRLHH3IqRhyECBRW0d0aRGtq7TY8PmxjjvBZrxTNDpJT6KUk4LRm\na6A6IuAI7QnNK8SJqM0DLzlpygd7GJf8ZL9SoHSH+gFsYF67Cpooz/YDqWrlN7Vw\ntO00s0B+eXy+PCXYU7VSfuWFGK8TGEv6HfGMALLjhqMManyvfp8hz3ubN1rK3c8C\nUS/ilRh1qckdbtPvoDPhSbTDmfU1g/EfRSIEXBrIMLg9ka/XB9PvWRrekrppnQzP\nhP9YE3x/wbFc5QqQWiRCYyQl/rgIMOXvIxhkfe8H5n1Et4VAorkpEAXdsfN8KSVv\nLSMazVlLp9GYq5SUpqYX3KnxdWBgN7BJoZ4sltsTpHQ/34SXWfu3UmyUveWj7wp0\nx9hwsPirVI00EEea9AbP7NM2rAyu6ukcm4m6ATd2DZJIViq2es6m60AE6SMCmrQF\nwmk4H/kdQgeAELVfGOm2VyJ3z69fQuywz7xu27S6zTKi05Qlnohxol4wVb6OB7qG\nLPRtK9ObgzRo/OPumyXqlzAi/Yvyd1ZQk8labZps3e16bQp8+pVPiumWioMFJDWV\nGZjCmyMSU8V6MB6njbgLHoyg2LCukCAeSjbPGGGYhnKLm1AKSoJh3IpZuqcKCk5C\n8CM1S15HxV78s9dFntEqIokCAwEAAQ== ' __Keyring= +__KeyringFile="/usr/share/keyrings/ubuntu-archive-keyring.gpg" __SkipSigCheck=0 __UseMirror=0 @@ -142,7 +144,6 @@ while :; do case $lowerI in -\?|-h|--help) usage - exit 1 ;; arm) __BuildArch=arm @@ -163,6 +164,7 @@ while :; do __UbuntuArch=armel __UbuntuRepo="http://ftp.debian.org/debian/" __CodeName=jessie + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" ;; armv6) __BuildArch=armv6 @@ -170,10 +172,12 @@ while :; do __QEMUArch=arm __UbuntuRepo="http://raspbian.raspberrypi.org/raspbian/" __CodeName=buster + __KeyringFile="/usr/share/keyrings/raspbian-archive-keyring.gpg" __LLDB_Package="liblldb-6.0-dev" + __UbuntuSuites= - if [[ -e "/usr/share/keyrings/raspbian-archive-keyring.gpg" ]]; then - __Keyring="--keyring /usr/share/keyrings/raspbian-archive-keyring.gpg" + if [[ -e "$__KeyringFile" ]]; then + __Keyring="--keyring $__KeyringFile" fi ;; riscv64) @@ -182,13 +186,8 @@ while :; do __AlpinePackages="${__AlpinePackages// lldb-dev/}" __QEMUArch=riscv64 __UbuntuArch=riscv64 - __UbuntuRepo="http://deb.debian.org/debian-ports" __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" unset __LLDB_Package - - if [[ -e "/usr/share/keyrings/debian-ports-archive-keyring.gpg" ]]; then - __Keyring="--keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg --include=debian-ports-archive-keyring" - fi ;; ppc64le) __BuildArch=ppc64le @@ -229,12 +228,19 @@ while :; do __UbuntuRepo="http://archive.ubuntu.com/ubuntu/" ;; lldb*) - version="${lowerI/lldb/}" - parts=(${version//./ }) + version="$(echo "$lowerI" | tr -d '[:alpha:]-=')" + majorVersion="${version%%.*}" + + [ -z "${version##*.*}" ] && minorVersion="${version#*.}" + if [ -z "$minorVersion" ]; then + minorVersion=0 + fi # for versions > 6.0, lldb has dropped the minor version - if [[ "${parts[0]}" -gt 6 ]]; then - version="${parts[0]}" + if [ "$majorVersion" -le 6 ]; then + version="$majorVersion.$minorVersion" + else + version="$majorVersion" fi __LLDB_Package="liblldb-${version}-dev" @@ -243,15 +249,19 @@ while :; do unset __LLDB_Package ;; llvm*) - version="${lowerI/llvm/}" - parts=(${version//./ }) - __LLVM_MajorVersion="${parts[0]}" - __LLVM_MinorVersion="${parts[1]}" - - # for versions > 6.0, llvm has dropped the minor version - if [[ -z "$__LLVM_MinorVersion" && "$__LLVM_MajorVersion" -le 6 ]]; then - __LLVM_MinorVersion=0; + version="$(echo "$lowerI" | tr -d '[:alpha:]-=')" + __LLVM_MajorVersion="${version%%.*}" + + [ -z "${version##*.*}" ] && __LLVM_MinorVersion="${version#*.}" + if [ -z "$__LLVM_MinorVersion" ]; then + __LLVM_MinorVersion=0 + fi + + # for versions > 6.0, lldb has dropped the minor version + if [ "$__LLVM_MajorVersion" -gt 6 ]; then + __LLVM_MinorVersion= fi + ;; xenial) # Ubuntu 16.04 if [[ "$__CodeName" != "jessie" ]]; then @@ -278,8 +288,17 @@ while :; do __CodeName=jammy fi ;; + noble) # Ubuntu 24.04 + if [[ "$__CodeName" != "jessie" ]]; then + __CodeName=noble + fi + if [[ -n "$__LLDB_Package" ]]; then + __LLDB_Package="liblldb-18-dev" + fi + ;; jessie) # Debian 8 __CodeName=jessie + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -288,6 +307,7 @@ while :; do stretch) # Debian 9 __CodeName=stretch __LLDB_Package="liblldb-6.0-dev" + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -296,6 +316,7 @@ while :; do buster) # Debian 10 __CodeName=buster __LLDB_Package="liblldb-6.0-dev" + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -303,6 +324,15 @@ while :; do ;; bullseye) # Debian 11 __CodeName=bullseye + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" + + if [[ -z "$__UbuntuRepo" ]]; then + __UbuntuRepo="http://ftp.debian.org/debian/" + fi + ;; + bookworm) # Debian 12 + __CodeName=bookworm + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -310,6 +340,7 @@ while :; do ;; sid) # Debian sid __CodeName=sid + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -323,25 +354,24 @@ while :; do alpine*) __CodeName=alpine __UbuntuRepo= - version="${lowerI/alpine/}" - if [[ "$version" == "edge" ]]; then + if [[ "$lowerI" == "alpineedge" ]]; then __AlpineVersion=edge else - parts=(${version//./ }) - __AlpineMajorVersion="${parts[0]}" - __AlpineMinoVersion="${parts[1]}" - __AlpineVersion="$__AlpineMajorVersion.$__AlpineMinoVersion" + version="$(echo "$lowerI" | tr -d '[:alpha:]-=')" + __AlpineMajorVersion="${version%%.*}" + __AlpineMinorVersion="${version#*.}" + __AlpineVersion="$__AlpineMajorVersion.$__AlpineMinorVersion" fi ;; - freebsd12) + freebsd13) __CodeName=freebsd __SkipUnmount=1 ;; - freebsd13) + freebsd14) __CodeName=freebsd - __FreeBSDBase="13.2-RELEASE" - __FreeBSDABI="13" + __FreeBSDBase="14.0-RELEASE" + __FreeBSDABI="14" __SkipUnmount=1 ;; illumos) @@ -420,6 +450,10 @@ fi __UbuntuPackages+=" ${__LLDB_Package:-}" +if [[ -z "$__UbuntuRepo" ]]; then + __UbuntuRepo="http://ports.ubuntu.com/" +fi + if [[ -n "$__LLVM_MajorVersion" ]]; then __UbuntuPackages+=" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev" fi @@ -442,13 +476,39 @@ fi mkdir -p "$__RootfsDir" __RootfsDir="$( cd "$__RootfsDir" && pwd )" +__hasWget= +ensureDownloadTool() +{ + if command -v wget &> /dev/null; then + __hasWget=1 + elif command -v curl &> /dev/null; then + __hasWget=0 + else + >&2 echo "ERROR: either wget or curl is required by this script." + exit 1 + fi +} + if [[ "$__CodeName" == "alpine" ]]; then __ApkToolsVersion=2.12.11 - __ApkToolsSHA512SUM=53e57b49230da07ef44ee0765b9592580308c407a8d4da7125550957bb72cb59638e04f8892a18b584451c8d841d1c7cb0f0ab680cc323a3015776affaa3be33 __ApkToolsDir="$(mktemp -d)" __ApkKeysDir="$(mktemp -d)" + arch="$(uname -m)" - wget "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//v$__ApkToolsVersion/x86_64/apk.static" -P "$__ApkToolsDir" + ensureDownloadTool + + if [[ "$__hasWget" == 1 ]]; then + wget -P "$__ApkToolsDir" "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v$__ApkToolsVersion/$arch/apk.static" + else + curl -SLO --create-dirs --output-dir "$__ApkToolsDir" "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v$__ApkToolsVersion/$arch/apk.static" + fi + if [[ "$arch" == "x86_64" ]]; then + __ApkToolsSHA512SUM="53e57b49230da07ef44ee0765b9592580308c407a8d4da7125550957bb72cb59638e04f8892a18b584451c8d841d1c7cb0f0ab680cc323a3015776affaa3be33" + elif [[ "$arch" == "aarch64" ]]; then + __ApkToolsSHA512SUM="9e2b37ecb2b56c05dad23d379be84fd494c14bd730b620d0d576bda760588e1f2f59a7fcb2f2080577e0085f23a0ca8eadd993b4e61c2ab29549fdb71969afd0" + else + echo "WARNING: add missing hash for your host architecture. To find the value, use: 'find /tmp -name apk.static -exec sha512sum {} \;'" + fi echo "$__ApkToolsSHA512SUM $__ApkToolsDir/apk.static" | sha512sum -c chmod +x "$__ApkToolsDir/apk.static" @@ -477,20 +537,23 @@ if [[ "$__CodeName" == "alpine" ]]; then fi # initialize DB + # shellcheck disable=SC2086 "$__ApkToolsDir/apk.static" \ -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \ -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \ -U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" --initdb add if [[ "$__AlpineLlvmLibsLookup" == 1 ]]; then + # shellcheck disable=SC2086 __AlpinePackages+=" $("$__ApkToolsDir/apk.static" \ -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \ -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \ -U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" \ - search 'llvm*-libs' | sort | tail -1 | sed 's/-[^-]*//2g')" + search 'llvm*-libs' | grep -E '^llvm' | sort | tail -1 | sed 's/-[^-]*//2g')" fi # install all packages in one go + # shellcheck disable=SC2086 "$__ApkToolsDir/apk.static" \ -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \ -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \ @@ -501,12 +564,23 @@ if [[ "$__CodeName" == "alpine" ]]; then elif [[ "$__CodeName" == "freebsd" ]]; then mkdir -p "$__RootfsDir"/usr/local/etc JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} - wget -O - "https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz" | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version + + ensureDownloadTool + + if [[ "$__hasWget" == 1 ]]; then + wget -O- "https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz" | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version + else + curl -SL "https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz" | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version + fi echo "ABI = \"FreeBSD:${__FreeBSDABI}:${__FreeBSDMachineArch}\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > "${__RootfsDir}"/usr/local/etc/pkg.conf echo "FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly\", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > "${__RootfsDir}"/etc/pkg/FreeBSD.conf mkdir -p "$__RootfsDir"/tmp # get and build package manager - wget -O - "https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz" | tar -C "$__RootfsDir"/tmp -zxf - + if [[ "$__hasWget" == 1 ]]; then + wget -O- "https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz" | tar -C "$__RootfsDir"/tmp -zxf - + else + curl -SL "https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz" | tar -C "$__RootfsDir"/tmp -zxf - + fi cd "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}" # needed for install to succeed mkdir -p "$__RootfsDir"/host/etc @@ -514,27 +588,43 @@ elif [[ "$__CodeName" == "freebsd" ]]; then rm -rf "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}" # install packages we need. INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf update + # shellcheck disable=SC2086 INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages elif [[ "$__CodeName" == "illumos" ]]; then mkdir "$__RootfsDir/tmp" pushd "$__RootfsDir/tmp" JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} + + ensureDownloadTool + echo "Downloading sysroot." - wget -O - https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C "$__RootfsDir" -xzf - + if [[ "$__hasWget" == 1 ]]; then + wget -O- https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C "$__RootfsDir" -xzf - + else + curl -SL https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C "$__RootfsDir" -xzf - + fi echo "Building binutils. Please wait.." - wget -O - https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.bz2 | tar -xjf - + if [[ "$__hasWget" == 1 ]]; then + wget -O- https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz | tar -xJf - + else + curl -SL https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz | tar -xJf - + fi mkdir build-binutils && cd build-binutils - ../binutils-2.33.1/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" + ../binutils-2.42/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.11" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" make -j "$JOBS" && make install && cd .. echo "Building gcc. Please wait.." - wget -O - https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz | tar -xJf - + if [[ "$__hasWget" == 1 ]]; then + wget -O- https://ftp.gnu.org/gnu/gcc/gcc-13.3.0/gcc-13.3.0.tar.xz | tar -xJf - + else + curl -SL https://ftp.gnu.org/gnu/gcc/gcc-13.3.0/gcc-13.3.0.tar.xz | tar -xJf - + fi CFLAGS="-fPIC" CXXFLAGS="-fPIC" CXXFLAGS_FOR_TARGET="-fPIC" CFLAGS_FOR_TARGET="-fPIC" export CFLAGS CXXFLAGS CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET mkdir build-gcc && cd build-gcc - ../gcc-8.4.0/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \ + ../gcc-13.3.0/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.11" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \ --with-gnu-ld --disable-nls --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libada --disable-libsanitizer \ --disable-libquadmath-support --disable-shared --enable-tls make -j "$JOBS" && make install && cd .. @@ -542,9 +632,13 @@ elif [[ "$__CodeName" == "illumos" ]]; then if [[ "$__UseMirror" == 1 ]]; then BaseUrl=https://pkgsrc.smartos.skylime.net fi - BaseUrl="$BaseUrl/packages/SmartOS/trunk/${__illumosArch}/All" + BaseUrl="$BaseUrl/packages/SmartOS/2019Q4/${__illumosArch}/All" echo "Downloading manifest" - wget "$BaseUrl" + if [[ "$__hasWget" == 1 ]]; then + wget "$BaseUrl" + else + curl -SLO "$BaseUrl" + fi echo "Downloading dependencies." read -ra array <<<"$__IllumosPackages" for package in "${array[@]}"; do @@ -552,7 +646,11 @@ elif [[ "$__CodeName" == "illumos" ]]; then # find last occurrence of package in listing and extract its name package="$(sed -En '/.*href="('"$package"'-[0-9].*).tgz".*/h;$!d;g;s//\1/p' All)" echo "Resolved name '$package'" - wget "$BaseUrl"/"$package".tgz + if [[ "$__hasWget" == 1 ]]; then + wget "$BaseUrl"/"$package".tgz + else + curl -SLO "$BaseUrl"/"$package".tgz + fi ar -x "$package".tgz tar --skip-old-files -xzf "$package".tmp.tg* -C "$__RootfsDir" 2>/dev/null done @@ -561,10 +659,17 @@ elif [[ "$__CodeName" == "illumos" ]]; then rm -rf "$__RootfsDir"/{tmp,+*} mkdir -p "$__RootfsDir"/usr/include/net mkdir -p "$__RootfsDir"/usr/include/netpacket - wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/bpf.h - wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h - wget -P "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h - wget -P "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h + if [[ "$__hasWget" == 1 ]]; then + wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/bpf.h + wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h + wget -P "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h + wget -P "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h + else + curl -SLO --create-dirs --output-dir "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/bpf.h + curl -SLO --create-dirs --output-dir "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h + curl -SLO --create-dirs --output-dir "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h + curl -SLO --create-dirs --output-dir "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h + fi elif [[ "$__CodeName" == "haiku" ]]; then JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} @@ -574,9 +679,16 @@ elif [[ "$__CodeName" == "haiku" ]]; then mkdir "$__RootfsDir/tmp/download" + ensureDownloadTool + echo "Downloading Haiku package tool" - git clone https://github.com/haiku/haiku-toolchains-ubuntu --depth 1 $__RootfsDir/tmp/script - wget -O "$__RootfsDir/tmp/download/hosttools.zip" $($__RootfsDir/tmp/script/fetch.sh --hosttools) + git clone https://github.com/haiku/haiku-toolchains-ubuntu --depth 1 "$__RootfsDir/tmp/script" + if [[ "$__hasWget" == 1 ]]; then + wget -O "$__RootfsDir/tmp/download/hosttools.zip" "$("$__RootfsDir/tmp/script/fetch.sh" --hosttools)" + else + curl -SLo "$__RootfsDir/tmp/download/hosttools.zip" "$("$__RootfsDir/tmp/script/fetch.sh" --hosttools)" + fi + unzip -o "$__RootfsDir/tmp/download/hosttools.zip" -d "$__RootfsDir/tmp/bin" DepotBaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg" @@ -589,14 +701,25 @@ elif [[ "$__CodeName" == "haiku" ]]; then echo "Downloading $package..." # API documented here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L60 # The schema here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L598 - hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_'$__HaikuArch'","versionType":"LATEST","naturalLanguageCode":"en"}' \ - --header='Content-Type:application/json' "$DepotBaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')" - wget -P "$__RootfsDir/tmp/download" "$hpkgDownloadUrl" + if [[ "$__hasWget" == 1 ]]; then + hpkgDownloadUrl="$(wget -qO- --post-data '{"name":"'"$package"'","repositorySourceCode":"haikuports_'$__HaikuArch'","versionType":"LATEST","naturalLanguageCode":"en"}' \ + --header 'Content-Type:application/json' "$DepotBaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')" + wget -P "$__RootfsDir/tmp/download" "$hpkgDownloadUrl" + else + hpkgDownloadUrl="$(curl -sSL -XPOST --data '{"name":"'"$package"'","repositorySourceCode":"haikuports_'$__HaikuArch'","versionType":"LATEST","naturalLanguageCode":"en"}' \ + --header 'Content-Type:application/json' "$DepotBaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')" + curl -SLO --create-dirs --output-dir "$__RootfsDir/tmp/download" "$hpkgDownloadUrl" + fi done for package in haiku haiku_devel; do echo "Downloading $package..." - hpkgVersion="$(wget -qO- $HpkgBaseUrl | sed -n 's/^.*version: "\([^"]*\)".*$/\1/p')" - wget -P "$__RootfsDir/tmp/download" "$HpkgBaseUrl/packages/$package-$hpkgVersion-1-$__HaikuArch.hpkg" + if [[ "$__hasWget" == 1 ]]; then + hpkgVersion="$(wget -qO- "$HpkgBaseUrl" | sed -n 's/^.*version: "\([^"]*\)".*$/\1/p')" + wget -P "$__RootfsDir/tmp/download" "$HpkgBaseUrl/packages/$package-$hpkgVersion-1-$__HaikuArch.hpkg" + else + hpkgVersion="$(curl -sSL "$HpkgBaseUrl" | sed -n 's/^.*version: "\([^"]*\)".*$/\1/p')" + curl -SLO --create-dirs --output-dir "$__RootfsDir/tmp/download" "$HpkgBaseUrl/packages/$package-$hpkgVersion-1-$__HaikuArch.hpkg" + fi done # Set up the sysroot @@ -609,7 +732,11 @@ elif [[ "$__CodeName" == "haiku" ]]; then # Download buildtools echo "Downloading Haiku buildtools" - wget -O "$__RootfsDir/tmp/download/buildtools.zip" $($__RootfsDir/tmp/script/fetch.sh --buildtools --arch=$__HaikuArch) + if [[ "$__hasWget" == 1 ]]; then + wget -O "$__RootfsDir/tmp/download/buildtools.zip" "$("$__RootfsDir/tmp/script/fetch.sh" --buildtools --arch=$__HaikuArch)" + else + curl -SLo "$__RootfsDir/tmp/download/buildtools.zip" "$("$__RootfsDir/tmp/script/fetch.sh" --buildtools --arch=$__HaikuArch)" + fi unzip -o "$__RootfsDir/tmp/download/buildtools.zip" -d "$__RootfsDir" # Cleaning up temporary files @@ -622,10 +749,22 @@ elif [[ -n "$__CodeName" ]]; then __Keyring="$__Keyring --force-check-gpg" fi + # shellcheck disable=SC2086 + echo running debootstrap "--variant=minbase" $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo" debootstrap "--variant=minbase" $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo" - cp "$__CrossDir/$__BuildArch/sources.list.$__CodeName" "$__RootfsDir/etc/apt/sources.list" + + mkdir -p "$__RootfsDir/etc/apt/sources.list.d/" + cat > "$__RootfsDir/etc/apt/sources.list.d/$__CodeName.sources" <>Start configuring Tizen rootfs" ln -sfn asm-${LINK_ARCH} ./usr/include/asm patch -p1 < $__TIZEN_CROSSDIR/tizen.patch +if [[ "$TIZEN_ARCH" == "riscv64" ]]; then + echo "Fixing broken symlinks in $PWD" + rm ./usr/lib64/libresolv.so + ln -s ../../lib64/libresolv.so.2 ./usr/lib64/libresolv.so + rm ./usr/lib64/libpthread.so + ln -s ../../lib64/libpthread.so.0 ./usr/lib64/libpthread.so + rm ./usr/lib64/libdl.so + ln -s ../../lib64/libdl.so.2 ./usr/lib64/libdl.so + rm ./usr/lib64/libutil.so + ln -s ../../lib64/libutil.so.1 ./usr/lib64/libutil.so + rm ./usr/lib64/libm.so + ln -s ../../lib64/libm.so.6 ./usr/lib64/libm.so + rm ./usr/lib64/librt.so + ln -s ../../lib64/librt.so.1 ./usr/lib64/librt.so + rm ./lib/ld-linux-riscv64-lp64d.so.1 + ln -s ../lib64/ld-linux-riscv64-lp64d.so.1 ./lib/ld-linux-riscv64-lp64d.so.1 +fi echo "<:--stdlib=${CLR_CMAKE_CXX_STANDARD_LIBRARY}>) + add_link_options($<$:--stdlib=${CLR_CMAKE_CXX_STANDARD_LIBRARY}>) +endif() + +option(CLR_CMAKE_CXX_STANDARD_LIBRARY_STATIC "Statically link against the C++ standard library" OFF) +if(CLR_CMAKE_CXX_STANDARD_LIBRARY_STATIC) + add_link_options($<$:-static-libstdc++>) +endif() + +set(CLR_CMAKE_CXX_ABI_LIBRARY "" CACHE STRING "C++ ABI implementation library to link against. Only supported with the Clang compiler.") +if (CLR_CMAKE_CXX_ABI_LIBRARY) + # The user may specify the ABI library with the 'lib' prefix, like 'libstdc++'. Strip the prefix here so the linker finds the right library. + string(REGEX REPLACE "^lib(.+)" "\\1" CLR_CMAKE_CXX_ABI_LIBRARY ${CLR_CMAKE_CXX_ABI_LIBRARY}) + # We need to specify this as a linker-backend option as Clang will filter this option out when linking to libc++. + add_link_options("LINKER:-l${CLR_CMAKE_CXX_ABI_LIBRARY}") +endif() + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1 index 8fda30bdce2b..e33743105635 100644 --- a/eng/common/darc-init.ps1 +++ b/eng/common/darc-init.ps1 @@ -1,6 +1,6 @@ param ( $darcVersion = $null, - $versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16', + $versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20', $verbosity = 'minimal', $toolpath = $null ) diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index c305ae6bd771..36dbd45e1ce8 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -2,7 +2,7 @@ source="${BASH_SOURCE[0]}" darcVersion='' -versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16' +versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20' verbosity='minimal' while [[ $# > 0 ]]; do diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh index 7e69e3a9e24a..7b9d97e3bd4d 100755 --- a/eng/common/dotnet-install.sh +++ b/eng/common/dotnet-install.sh @@ -71,6 +71,9 @@ case $cpuname in i[3-6]86) buildarch=x86 ;; + riscv64) + buildarch=riscv64 + ;; *) echo "Unknown CPU $cpuname detected, treating it as x64" buildarch=x64 @@ -82,7 +85,7 @@ if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then dotnetRoot="$dotnetRoot/$architecture" fi -InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { +InstallDotNet "$dotnetRoot" $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { local exit_code=$? Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2 ExitWithExitCode $exit_code diff --git a/eng/common/generate-sbom-prep.sh b/eng/common/generate-sbom-prep.sh index bbb4922151e6..b8ecca72bbf5 100644 --- a/eng/common/generate-sbom-prep.sh +++ b/eng/common/generate-sbom-prep.sh @@ -14,10 +14,10 @@ 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 diff --git a/eng/common/helixpublish.proj b/eng/common/helixpublish.proj index d7f185856e79..c1323bf41210 100644 --- a/eng/common/helixpublish.proj +++ b/eng/common/helixpublish.proj @@ -1,3 +1,4 @@ + diff --git a/eng/common/internal/Directory.Build.props b/eng/common/internal/Directory.Build.props index dbf99d82a5c2..f1d041c33da5 100644 --- a/eng/common/internal/Directory.Build.props +++ b/eng/common/internal/Directory.Build.props @@ -1,4 +1,11 @@ + + + false + false + + + diff --git a/eng/common/internal/NuGet.config b/eng/common/internal/NuGet.config index 19d3d311b166..f70261ed689b 100644 --- a/eng/common/internal/NuGet.config +++ b/eng/common/internal/NuGet.config @@ -4,4 +4,7 @@ + + + diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj index 7f5ce6d60813..feaa6d20812d 100644 --- a/eng/common/internal/Tools.csproj +++ b/eng/common/internal/Tools.csproj @@ -1,9 +1,10 @@ + net472 - false false + false @@ -14,17 +15,8 @@ - - - - https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json; - - - $(RestoreSources); - https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json; - - + diff --git a/eng/common/native/CommonLibrary.psm1 b/eng/common/native/CommonLibrary.psm1 index ca38268c44d8..f71f6af6cdbc 100644 --- a/eng/common/native/CommonLibrary.psm1 +++ b/eng/common/native/CommonLibrary.psm1 @@ -277,7 +277,8 @@ function Get-MachineArchitecture { if (($ProcessorArchitecture -Eq "AMD64") -Or ($ProcessorArchitecture -Eq "IA64") -Or ($ProcessorArchitecture -Eq "ARM64") -Or - ($ProcessorArchitecture -Eq "LOONGARCH64")) { + ($ProcessorArchitecture -Eq "LOONGARCH64") -Or + ($ProcessorArchitecture -Eq "RISCV64")) { return "x64" } return "x86" diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh index 2d5660642b8d..9a0e1f2b4567 100644 --- a/eng/common/native/init-compiler.sh +++ b/eng/common/native/init-compiler.sh @@ -2,7 +2,9 @@ # # This file detects the C/C++ compiler and exports it to the CC/CXX environment variables # -# NOTE: some scripts source this file and rely on stdout being empty, make sure to not output anything here! +# NOTE: some scripts source this file and rely on stdout being empty, make sure +# to not output *anything* here, unless it is an error message that fails the +# build. if [ -z "$build_arch" ] || [ -z "$compiler" ]; then echo "Usage..." @@ -17,11 +19,9 @@ case "$compiler" in # clangx.y or clang-x.y version="$(echo "$compiler" | tr -d '[:alpha:]-=')" majorVersion="${version%%.*}" - [ -z "${version##*.*}" ] && minorVersion="${version#*.}" - if [ -z "$minorVersion" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -le 6 ]; then - minorVersion=0; - fi + # LLVM based on v18 released in early 2024, with two releases per year + maxVersion="$((18 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 6)))" compiler=clang ;; @@ -29,7 +29,9 @@ case "$compiler" in # gccx.y or gcc-x.y version="$(echo "$compiler" | tr -d '[:alpha:]-=')" majorVersion="${version%%.*}" - [ -z "${version##*.*}" ] && minorVersion="${version#*.}" + + # GCC based on v14 released in early 2024, with one release per year + maxVersion="$((14 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 12)))" compiler=gcc ;; esac @@ -47,91 +49,98 @@ check_version_exists() { desired_version=-1 # Set up the environment to be used for building with the desired compiler. - if command -v "$compiler-$1.$2" > /dev/null; then - desired_version="-$1.$2" - elif command -v "$compiler$1$2" > /dev/null; then - desired_version="$1$2" - elif command -v "$compiler-$1$2" > /dev/null; then - desired_version="-$1$2" + if command -v "$compiler-$1" > /dev/null; then + desired_version="-$1" + elif command -v "$compiler$1" > /dev/null; then + desired_version="$1" fi echo "$desired_version" } +__baseOS="$(uname)" +set_compiler_version_from_CC() { + if [ "$__baseOS" = "Darwin" ]; then + # On Darwin, the versions from -version/-dumpversion refer to Xcode + # versions, not llvm versions, so we can't rely on them. + return + fi + + version="$("$CC" -dumpversion)" + if [ -z "$version" ]; then + echo "Error: $CC -dumpversion didn't provide a version" + exit 1 + fi + + # gcc and clang often display 3 part versions. However, gcc can show only 1 part in some environments. + IFS=. read -r majorVersion _ < /dev/null; then - if [ "$(uname)" != "Darwin" ]; then - echo "Warning: Specific version of $compiler not found, falling back to use the one in PATH." - fi - CC="$(command -v "$compiler")" - CXX="$(command -v "$cxxCompiler")" - else - echo "No usable version of $compiler found." + if ! command -v "$compiler" > /dev/null; then + echo "Error: No compatible version of $compiler was found within the range of $minVersion to $maxVersion. Please upgrade your toolchain or specify the compiler explicitly using CLR_CC and CLR_CXX environment variables." exit 1 fi - else - if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then - if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then - if command -v "$compiler" > /dev/null; then - echo "Warning: Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH." - CC="$(command -v "$compiler")" - CXX="$(command -v "$cxxCompiler")" - else - echo "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH." - exit 1 - fi - fi - fi + + CC="$(command -v "$compiler" 2> /dev/null)" + CXX="$(command -v "$cxxCompiler" 2> /dev/null)" + set_compiler_version_from_CC fi else - desired_version="$(check_version_exists "$majorVersion" "$minorVersion")" + desired_version="$(check_version_exists "$majorVersion")" if [ "$desired_version" = "-1" ]; then - echo "Could not find specific version of $compiler: $majorVersion $minorVersion." + echo "Error: Could not find specific version of $compiler: $majorVersion." exit 1 fi fi if [ -z "$CC" ]; then - CC="$(command -v "$compiler$desired_version")" - CXX="$(command -v "$cxxCompiler$desired_version")" - if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler")"; fi + CC="$(command -v "$compiler$desired_version" 2> /dev/null)" + CXX="$(command -v "$cxxCompiler$desired_version" 2> /dev/null)" + if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler" 2> /dev/null)"; fi + set_compiler_version_from_CC fi else if [ ! -f "$CLR_CC" ]; then - echo "CLR_CC is set but path '$CLR_CC' does not exist" + echo "Error: CLR_CC is set but path '$CLR_CC' does not exist" exit 1 fi CC="$CLR_CC" CXX="$CLR_CXX" + set_compiler_version_from_CC fi if [ -z "$CC" ]; then - echo "Unable to find $compiler." + echo "Error: Unable to find $compiler." exit 1 fi -# Only lld version >= 9 can be considered stable. lld doesn't support s390x. -if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && [ "$build_arch" != "s390x" ]; then - if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then - LDFLAGS="-fuse-ld=lld" +if [ "$__baseOS" != "Darwin" ]; then + # On Darwin, we always want to use the Apple linker. + + # Only lld version >= 9 can be considered stable. lld supports s390x starting from 18.0. + if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && { [ "$build_arch" != "s390x" ] || [ "$majorVersion" -ge 18 ]; }; then + if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then + LDFLAGS="-fuse-ld=lld" + fi fi fi -SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")" +SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version" 2> /dev/null)" export CC CXX LDFLAGS SCAN_BUILD_COMMAND diff --git a/eng/common/native/init-distro-rid.sh b/eng/common/native/init-distro-rid.sh index de1687b2ccbe..83ea7aab0e08 100644 --- a/eng/common/native/init-distro-rid.sh +++ b/eng/common/native/init-distro-rid.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # getNonPortableDistroRid # @@ -11,21 +11,16 @@ # non-portable rid getNonPortableDistroRid() { - local targetOs="$1" - local targetArch="$2" - local rootfsDir="$3" - local nonPortableRid="" + targetOs="$1" + targetArch="$2" + rootfsDir="$3" + nonPortableRid="" if [ "$targetOs" = "linux" ]; then + # shellcheck disable=SC1091 if [ -e "${rootfsDir}/etc/os-release" ]; then - source "${rootfsDir}/etc/os-release" - - if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" ]]; then - # remove the last version digit - VERSION_ID="${VERSION_ID%.*}" - fi - - if [[ "${VERSION_ID:-}" =~ ^([[:digit:]]|\.)+$ ]]; then + . "${rootfsDir}/etc/os-release" + if echo "${VERSION_ID:-}" | grep -qE '^([[:digit:]]|\.)+$'; then nonPortableRid="${ID}.${VERSION_ID}-${targetArch}" else # Rolling release distros either do not set VERSION_ID, set it as blank or @@ -33,45 +28,33 @@ getNonPortableDistroRid() # so omit it here to be consistent with everything else. nonPortableRid="${ID}-${targetArch}" fi - elif [ -e "${rootfsDir}/android_platform" ]; then - source "$rootfsDir"/android_platform + # shellcheck disable=SC1091 + . "${rootfsDir}/android_platform" nonPortableRid="$RID" fi fi if [ "$targetOs" = "freebsd" ]; then - # $rootfsDir can be empty. freebsd-version is shell script and it should always work. - __freebsd_major_version=$($rootfsDir/bin/freebsd-version | { read v; echo "${v%%.*}"; }) + # $rootfsDir can be empty. freebsd-version is a shell script and should always work. + __freebsd_major_version=$("$rootfsDir"/bin/freebsd-version | cut -d'.' -f1) nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}" - elif command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then + elif command -v getprop >/dev/null && getprop ro.product.system.model | grep -qi android; then __android_sdk_version=$(getprop ro.build.version.sdk) nonPortableRid="android.$__android_sdk_version-${targetArch}" elif [ "$targetOs" = "illumos" ]; then __uname_version=$(uname -v) - case "$__uname_version" in - omnios-*) - __omnios_major_version=$(echo "${__uname_version:8:2}") - nonPortableRid=omnios."$__omnios_major_version"-"$targetArch" - ;; - joyent_*) - __smartos_major_version=$(echo "${__uname_version:7:4}") - nonPortableRid=smartos."$__smartos_major_version"-"$targetArch" - ;; - illumos_*) - nonPortableRid=openindiana-"$targetArch" - ;; - esac + nonPortableRid="illumos-${targetArch}" elif [ "$targetOs" = "solaris" ]; then __uname_version=$(uname -v) - __solaris_major_version=$(echo "${__uname_version%.*}") - nonPortableRid=solaris."$__solaris_major_version"-"$targetArch" + __solaris_major_version=$(echo "$__uname_version" | cut -d'.' -f1) + nonPortableRid="solaris.$__solaris_major_version-${targetArch}" elif [ "$targetOs" = "haiku" ]; then - __uname_release=$(uname -r) + __uname_release="$(uname -r)" nonPortableRid=haiku.r"$__uname_release"-"$targetArch" fi - echo "$(echo $nonPortableRid | tr '[:upper:]' '[:lower:]')" + echo "$nonPortableRid" | tr '[:upper:]' '[:lower:]' } # initDistroRidGlobal @@ -85,26 +68,23 @@ getNonPortableDistroRid() # None # # Notes: -# -# It is important to note that the function does not return anything, but it -# exports the following variables on success: -# -# __DistroRid : Non-portable rid of the target platform. -# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform. -# +# It is important to note that the function does not return anything, but it +# exports the following variables on success: +# __DistroRid : Non-portable rid of the target platform. +# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform. initDistroRidGlobal() { - local targetOs="$1" - local targetArch="$2" - local rootfsDir="" - if [ "$#" -ge 3 ]; then + targetOs="$1" + targetArch="$2" + rootfsDir="" + if [ $# -ge 3 ]; then rootfsDir="$3" fi if [ -n "${rootfsDir}" ]; then # We may have a cross build. Check for the existence of the rootfsDir if [ ! -e "${rootfsDir}" ]; then - echo "Error rootfsDir has been passed, but the location is not valid." + echo "Error: rootfsDir has been passed, but the location is not valid." exit 1 fi fi @@ -119,7 +99,7 @@ initDistroRidGlobal() STRINGS="$(command -v llvm-strings || true)" fi - # Check for musl-based distros (e.g Alpine Linux, Void Linux). + # Check for musl-based distros (e.g. Alpine Linux, Void Linux). if "${rootfsDir}/usr/bin/ldd" --version 2>&1 | grep -q musl || ( [ -n "$STRINGS" ] && "$STRINGS" "${rootfsDir}/usr/bin/ldd" 2>&1 | grep -q musl ); then __PortableTargetOS="linux-musl" diff --git a/eng/common/native/init-os-and-arch.sh b/eng/common/native/init-os-and-arch.sh index e693617a6c2b..38921d4338f7 100644 --- a/eng/common/native/init-os-and-arch.sh +++ b/eng/common/native/init-os-and-arch.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # Use uname to determine what the OS is. OSName=$(uname -s | tr '[:upper:]' '[:lower:]') @@ -35,6 +35,10 @@ fi case "$CPUName" in arm64|aarch64) arch=arm64 + if [ "$(getconf LONG_BIT)" -lt 64 ]; then + # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS) + arch=arm + fi ;; loongarch64) @@ -50,6 +54,7 @@ case "$CPUName" in ;; armv7l|armv8l) + # shellcheck disable=SC1091 if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then arch=armel else diff --git a/eng/common/post-build/check-channel-consistency.ps1 b/eng/common/post-build/check-channel-consistency.ps1 index 63f3464c986a..61208d2d1351 100644 --- a/eng/common/post-build/check-channel-consistency.ps1 +++ b/eng/common/post-build/check-channel-consistency.ps1 @@ -4,10 +4,18 @@ param( ) try { - . $PSScriptRoot\post-build-utils.ps1 + $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 if ($PromoteToChannels -eq "") { - Write-PipelineTaskError -Type 'warning' -Message "This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info." + Write-PipelineTaskError -Type 'warning' -Message "This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info." ExitWithExitCode 0 } diff --git a/eng/common/post-build/nuget-validation.ps1 b/eng/common/post-build/nuget-validation.ps1 index 22b1c4dfe4a7..e5de00c89836 100644 --- a/eng/common/post-build/nuget-validation.ps1 +++ b/eng/common/post-build/nuget-validation.ps1 @@ -5,9 +5,14 @@ param( [Parameter(Mandatory=$true)][string] $PackagesPath # Path to where the packages to be validated are ) -try { - . $PSScriptRoot\post-build-utils.ps1 +# `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 +try { & $PSScriptRoot\nuget-verification.ps1 ${PackagesPath}\*.nupkg } catch { diff --git a/eng/common/post-build/nuget-verification.ps1 b/eng/common/post-build/nuget-verification.ps1 index 6cbbcafade26..eea88e653c91 100644 --- a/eng/common/post-build/nuget-verification.ps1 +++ b/eng/common/post-build/nuget-verification.ps1 @@ -118,4 +118,4 @@ if ($LASTEXITCODE -ne 0) { Write-Error "The verify tool found some problems." } else { Write-Output "The verify tool succeeded." -} \ No newline at end of file +} diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 238945cb5ab4..a261517ef906 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -5,11 +5,17 @@ param( [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, - [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters + [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters, + [Parameter(Mandatory=$false)][string] $RequireDefaultChannels ) try { - . $PSScriptRoot\post-build-utils.ps1 + # `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 $darc = Get-Darc @@ -28,6 +34,10 @@ try { if ("false" -eq $WaitPublishingFinish) { $optionalParams.Add("--no-wait") | Out-Null } + + if ("true" -eq $RequireDefaultChannels) { + $optionalParams.Add("--default-channels-required") | Out-Null + } & $darc add-build-to-channel ` --id $buildId ` @@ -37,6 +47,7 @@ try { --azdev-pat "$AzdoToken" ` --bar-uri "$MaestroApiEndPoint" ` --ci ` + --verbose ` @optionalParams if ($LastExitCode -ne 0) { diff --git a/eng/common/post-build/redact-logs.ps1 b/eng/common/post-build/redact-logs.ps1 new file mode 100644 index 000000000000..b7fc19591507 --- /dev/null +++ b/eng/common/post-build/redact-logs.ps1 @@ -0,0 +1,89 @@ +[CmdletBinding(PositionalBinding=$False)] +param( + [Parameter(Mandatory=$true, Position=0)][string] $InputPath, + [Parameter(Mandatory=$true)][string] $BinlogToolVersion, + [Parameter(Mandatory=$false)][string] $DotnetPath, + [Parameter(Mandatory=$false)][string] $PackageFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json', + # File with strings to redact - separated by newlines. + # For comments start the line with '# ' - such lines are ignored + [Parameter(Mandatory=$false)][string] $TokensFilePath, + [Parameter(ValueFromRemainingArguments=$true)][String[]]$TokensToRedact +) + +try { + $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 + + $packageName = 'binlogtool' + + $dotnet = $DotnetPath + + if (!$dotnet) { + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + } + + $toolList = & "$dotnet" tool list -g + + if ($toolList -like "*$packageName*") { + & "$dotnet" tool uninstall $packageName -g + } + + $toolPath = "$PSScriptRoot\..\..\..\.tools" + $verbosity = 'minimal' + + New-Item -ItemType Directory -Force -Path $toolPath + + Push-Location -Path $toolPath + + 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 + + if (Test-Path $TokensFilePath) { + Write-Host "Adding additional sensitive data for redaction from file: " $TokensFilePath + $TokensToRedact += Get-Content -Path $TokensFilePath | Foreach {$_.Trim()} | Where { $_ -notmatch "^# " } + } + + $optionalParams = [System.Collections.ArrayList]::new() + + Foreach ($p in $TokensToRedact) + { + if($p -match '^\$\(.*\)$') + { + Write-Host ("Ignoring token {0} as it is probably unexpanded AzDO variable" -f $p) + } + elseif($p) + { + $optionalParams.Add("-p:" + $p) | Out-Null + } + } + + & $dotnet binlogtool redact --input:$InputPath --recurse --in-place ` + @optionalParams + + if ($LastExitCode -ne 0) { + Write-PipelineTelemetryError -Category 'Redactor' -Type 'warning' -Message "Problems using Redactor tool (exit code: $LastExitCode). But ignoring them now." + } + } + finally { + Pop-Location + } + + Write-Host 'done.' +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Category 'Redactor' -Message "There was an error while trying to redact logs. Error: $_" + ExitWithExitCode 1 +} diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1 index 4011d324e739..1976ef70fb85 100644 --- a/eng/common/post-build/sourcelink-validation.ps1 +++ b/eng/common/post-build/sourcelink-validation.ps1 @@ -6,7 +6,15 @@ param( [Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use ) -. $PSScriptRoot\post-build-utils.ps1 +$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 diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1 index cd2181bafa05..7146e593ffae 100644 --- a/eng/common/post-build/symbols-validation.ps1 +++ b/eng/common/post-build/symbols-validation.ps1 @@ -322,8 +322,6 @@ function InstallDotnetSymbol { } try { - . $PSScriptRoot\post-build-utils.ps1 - InstallDotnetSymbol foreach ($Job in @(Get-Job)) { diff --git a/eng/common/sdl/NuGet.config b/eng/common/sdl/NuGet.config index 5bfbb02ef043..3849bdb3cf51 100644 --- a/eng/common/sdl/NuGet.config +++ b/eng/common/sdl/NuGet.config @@ -5,11 +5,11 @@ - + - + diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1 index 81ded5b7f477..4715d75e974d 100644 --- a/eng/common/sdl/execute-all-sdl-tools.ps1 +++ b/eng/common/sdl/execute-all-sdl-tools.ps1 @@ -6,6 +6,7 @@ Param( [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located + [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault # Optional: list of SDL tools to run on source code. See 'configure-sdl-tool.ps1' for tools list # format. @@ -74,7 +75,7 @@ try { } Exec-BlockVerbosely { - & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -GuardianLoggerLevel $GuardianLoggerLevel + & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel } $gdnFolder = Join-Path $workingDirectory '.gdn' @@ -103,6 +104,7 @@ try { -TargetDirectory $targetDirectory ` -GdnFolder $gdnFolder ` -ToolsList $tools ` + -AzureDevOpsAccessToken $AzureDevOpsAccessToken ` -GuardianLoggerLevel $GuardianLoggerLevel ` -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams ` -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams ` diff --git a/eng/common/sdl/init-sdl.ps1 b/eng/common/sdl/init-sdl.ps1 index 588ff8e22fbe..3ac1d92b3700 100644 --- a/eng/common/sdl/init-sdl.ps1 +++ b/eng/common/sdl/init-sdl.ps1 @@ -3,6 +3,7 @@ Param( [string] $Repository, [string] $BranchName='master', [string] $WorkingDirectory, + [string] $AzureDevOpsAccessToken, [string] $GuardianLoggerLevel='Standard' ) @@ -20,7 +21,14 @@ $ci = $true # Don't display the console progress UI - it's a huge perf hit $ProgressPreference = 'SilentlyContinue' +# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file +$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken")) +$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn") +$uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cfg/Items?path=$escapedRepository&versionDescriptor[versionOptions]=0&`$format=zip&api-version=5.0" +$zipFile = "$WorkingDirectory/gdn.zip" + Add-Type -AssemblyName System.IO.Compression.FileSystem +$gdnFolder = (Join-Path $WorkingDirectory '.gdn') try { # if the folder does not exist, we'll do a guardian init and push it to the remote repository diff --git a/eng/common/sdl/packages.config b/eng/common/sdl/packages.config index e5f543ea68c2..4585cfd6bba1 100644 --- a/eng/common/sdl/packages.config +++ b/eng/common/sdl/packages.config @@ -1,4 +1,4 @@ - + diff --git a/eng/common/sdl/sdl.ps1 b/eng/common/sdl/sdl.ps1 index 7fe603fe995d..648c5068d7d6 100644 --- a/eng/common/sdl/sdl.ps1 +++ b/eng/common/sdl/sdl.ps1 @@ -4,8 +4,6 @@ function Install-Gdn { [Parameter(Mandatory=$true)] [string]$Path, - [string]$Source = "https://pkgs.dev.azure.com/dnceng/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json", - # If omitted, install the latest version of Guardian, otherwise install that specific version. [string]$Version ) @@ -21,7 +19,7 @@ function Install-Gdn { $ci = $true . $PSScriptRoot\..\tools.ps1 - $argumentList = @("install", "Microsoft.Guardian.Cli.win-x64", "-Source $Source", "-OutputDirectory $Path", "-NonInteractive", "-NoCache") + $argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache") if ($Version) { $argumentList += "-Version $Version" diff --git a/eng/common/sdl/trim-assets-version.ps1 b/eng/common/sdl/trim-assets-version.ps1 index a2e004877045..0daa2a9e9462 100644 --- a/eng/common/sdl/trim-assets-version.ps1 +++ b/eng/common/sdl/trim-assets-version.ps1 @@ -72,4 +72,4 @@ catch { Write-Host $_ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ ExitWithExitCode 1 -} \ No newline at end of file +} diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md new file mode 100644 index 000000000000..4bf4cf41bd7c --- /dev/null +++ b/eng/common/template-guidance.md @@ -0,0 +1,133 @@ +# Overview + +Arcade provides templates for public (`/templates`) and 1ES pipeline templates (`/templates-official`) scenarios. Pipelines which are required to be managed by 1ES pipeline templates should reference `/templates-offical`, all other pipelines may reference `/templates`. + +## How to use + +Basic guidance is: + +- 1ES Pipeline Template or 1ES Microbuild template runs should reference `eng/common/templates-official`. Any internal production-graded pipeline should use these templates. + +- All other runs should reference `eng/common/templates`. + +See [azure-pipelines.yml](../../azure-pipelines.yml) (templates-official example) or [azure-pipelines-pr.yml](../../azure-pipelines-pr.yml) (templates example) for examples. + +#### The `templateIs1ESManaged` parameter + +The `templateIs1ESManaged` is available on most templates and affects which of the variants is used for nested templates. See [Development Notes](#development-notes) below for more information on the `templateIs1ESManaged1 parameter. + +- For templates under `job/`, `jobs/`, `steps`, or `post-build/`, this parameter must be explicitly set. + +## Multiple outputs + +1ES pipeline templates impose a policy where every publish artifact execution results in additional security scans being injected into your pipeline. When using `templates-official/jobs/jobs.yml`, Arcade reduces the number of additional security injections by gathering all publishing outputs into the [Build.ArtifactStagingDirectory](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services), and utilizing the [outputParentDirectory](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs#multiple-outputs) feature of 1ES pipeline templates. When implementing your pipeline, if you ensure publish artifacts are located in the `$(Build.ArtifactStagingDirectory)`, and utilize the 1ES provided template context, then you can reduce the number of security scans for your pipeline. + +Example: +``` yaml +# azure-pipelines.yml +extends: + template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate + parameters: + stages: + - stage: build + jobs: + - template: /eng/common/templates-official/jobs/jobs.yml@self + parameters: + # 1ES makes use of outputs to reduce security task injection overhead + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish logs from source' + continueOnError: true + condition: always() + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/log + artifactName: Logs + jobs: + - job: Windows + steps: + - script: echo "friendly neighborhood" > artifacts/marvel/spiderman.txt + # copy build outputs to artifact staging directory for publishing + - task: CopyFiles@2 + displayName: Gather build output + inputs: + SourceFolder: '$(System.DefaultWorkingDirectory)/artifacts/marvel' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel' +``` + +Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`). + +## Development notes + +**Folder / file structure** + +``` text +eng\common\ + [templates || templates-official]\ + job\ + job.yml (shim + artifact publishing logic) + onelocbuild.yml (shim) + publish-build-assets.yml (shim) + source-build.yml (shim) + source-index-stage1.yml (shim) + jobs\ + codeql-build.yml (shim) + jobs.yml (shim) + source-build.yml (shim) + post-build\ + post-build.yml (shim) + common-variabls.yml (shim) + setup-maestro-vars.yml (shim) + steps\ + 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) + source-build.yml (shim) + variables\ + pool-providers.yml (logic + redirect) # templates/variables/pool-providers.yml will redirect to templates-official/variables/pool-providers.yml if you are running in the internal project + sdl-variables.yml (logic) + core-templates\ + job\ + job.yml (logic) + onelocbuild.yml (logic) + publish-build-assets.yml (logic) + source-build.yml (logic) + source-index-stage1.yml (logic) + jobs\ + codeql-build.yml (logic) + jobs.yml (logic) + source-build.yml (logic) + post-build\ + common-variabls.yml (logic) + post-build.yml (logic) + 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) + retain-build.yml (logic) + send-to-helix.yml (logic) + source-build.yml (logic) + variables\ + pool-providers.yml (redirect) +``` + +In the table above, a file is designated as "shim", "logic", or "redirect". + +- shim - represents a yaml file which is an intermediate step between pipeline logic and .Net Core Engineering's templates (`core-templates`) and defines the `is1ESPipeline` parameter value. + +- logic - represents actual base template logic. + +- redirect- represents a file in `core-templates` which redirects to the "logic" file in either `templates` or `templates-official`. + +Logic for Arcade's templates live **primarily** in the `core-templates` folder. The exceptions to the location of the logic files are around artifact publishing, which is handled differently between 1es pipeline templates and standard templates. `templates` and `templates-official` provide shim entry points which redirect to `core-templates` while also defining the `is1ESPipeline` parameter. If a shim is referenced in `templates`, then `is1ESPipeline` is set to `false`. If a shim is referenced in `templates-official`, then `is1ESPipeline` is set to `true`. + +Within `templates` and `templates-official`, the templates at the "stages", and "jobs" / "job" level have been replaced with shims. Templates at the "steps" and "variables" level are typically too granular to be replaced with shims and instead persist logic which is directly applicable to either scenario. + +Within `core-templates`, there are a handful of places where logic is dependent on which shim entry point was used. In those places, we redirect back to the respective logic file in `templates` or `templates-official`. diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index 4cca1114fcca..81ea7a261f2d 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -1,271 +1,81 @@ -# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, -# and some (Microbuild) should only be applied to non-PR cases for internal builds. - parameters: -# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job - cancelTimeoutInMinutes: '' - condition: '' - container: '' - continueOnError: false - dependsOn: '' - displayName: '' - pool: '' - steps: [] - strategy: '' - timeoutInMinutes: '' - variables: [] - workspace: '' - templateContext: '' - -# Job base template specific parameters - # See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md - artifacts: '' - enableMicrobuild: false - microbuildUseESRP: true - enablePublishBuildArtifacts: false - enablePublishBuildAssets: false - enablePublishTestResults: false - enablePublishUsingPipelines: false - enableBuildRetry: false - disableComponentGovernance: '' - componentGovernanceIgnoreDirectories: '' - mergeTestResults: false - testRunTitle: '' - testResultsFormat: '' - name: '' - preSteps: [] - runAsPublic: false # Sbom related params enableSbom: true - PackageVersion: 7.0.0 + runAsPublic: false + PackageVersion: 9.0.0 BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' - ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom jobs: -- job: ${{ parameters.name }} - - ${{ if ne(parameters.cancelTimeoutInMinutes, '') }}: - cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }} - - ${{ if ne(parameters.condition, '') }}: - condition: ${{ parameters.condition }} - - ${{ if ne(parameters.container, '') }}: - container: ${{ parameters.container }} - - ${{ if ne(parameters.continueOnError, '') }}: - continueOnError: ${{ parameters.continueOnError }} - - ${{ if ne(parameters.dependsOn, '') }}: - dependsOn: ${{ parameters.dependsOn }} - - ${{ if ne(parameters.displayName, '') }}: - displayName: ${{ parameters.displayName }} - - ${{ if ne(parameters.pool, '') }}: - pool: ${{ parameters.pool }} - - ${{ if ne(parameters.strategy, '') }}: - strategy: ${{ parameters.strategy }} - - ${{ if ne(parameters.timeoutInMinutes, '') }}: - timeoutInMinutes: ${{ parameters.timeoutInMinutes }} - - ${{ if ne(parameters.templateContext, '') }}: - templateContext: ${{ parameters.templateContext }} - - variables: - - ${{ if ne(parameters.enableTelemetry, 'false') }}: - - name: DOTNET_CLI_TELEMETRY_PROFILE - value: '$(Build.Repository.Uri)' - - ${{ if eq(parameters.enableRichCodeNavigation, 'true') }}: - - name: EnableRichCodeNavigation - value: 'true' - # Retry signature validation up to three times, waiting 2 seconds between attempts. - # See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures - - name: NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY - value: 3,2000 - - ${{ each variable in parameters.variables }}: - # handle name-value variable syntax - # example: - # - name: [key] - # value: [value] - - ${{ if ne(variable.name, '') }}: - - name: ${{ variable.name }} - value: ${{ variable.value }} - - # handle variable groups - - ${{ if ne(variable.group, '') }}: - - group: ${{ variable.group }} - - # handle template variable syntax - # example: - # - template: path/to/template.yml - # parameters: - # [key]: [value] - - ${{ if ne(variable.template, '') }}: - - template: ${{ variable.template }} - ${{ if ne(variable.parameters, '') }}: - parameters: ${{ variable.parameters }} - - # handle key-value variable syntax. - # example: - # - [key]: [value] - - ${{ if and(eq(variable.name, ''), eq(variable.group, ''), eq(variable.template, '')) }}: - - ${{ each pair in variable }}: - - name: ${{ pair.key }} - value: ${{ pair.value }} - - # DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds - - ${{ if and(eq(parameters.enableTelemetry, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-HelixApi-Access - - ${{ if ne(parameters.workspace, '') }}: - workspace: ${{ parameters.workspace }} - - steps: - - ${{ if ne(parameters.preSteps, '') }}: - - ${{ each preStep in parameters.preSteps }}: - - ${{ preStep }} - - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - - task: MicroBuildSigningPlugin@4 - displayName: Install MicroBuild plugin - inputs: - signType: $(_SignType) - zipSources: false - feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - ${{ if eq(parameters.microbuildUseESRP, true) }}: - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea - ${{ else }}: - ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca - env: - TeamName: $(_TeamName) - MicroBuildOutputFolderOverride: '$(Agent.TempDirectory)' - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) - - - ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}: - - task: NuGetAuthenticate@1 - - - ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}: - - task: DownloadPipelineArtifact@2 - inputs: - buildType: current - artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }} - targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }} - itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }} - - - ${{ each step in parameters.steps }}: - - ${{ step }} - - - ${{ if eq(parameters.enableRichCodeNavigation, true) }}: - - task: RichCodeNavIndexer@0 - displayName: RichCodeNav Upload - inputs: - languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }} - environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'production') }} - richNavLogOutputDirectory: $(System.DefaultWorkingDirectory)/artifacts/bin - uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} - continueOnError: true - - - template: /eng/common/templates-official/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 }} - - - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: MicroBuildCleanup@1 - displayName: Execute Microbuild cleanup tasks - condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) - continueOnError: ${{ parameters.continueOnError }} - env: - TeamName: $(_TeamName) - - - ${{ if ne(parameters.artifacts.publish, '') }}: - - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: - - task: CopyFiles@2 - displayName: Gather binaries for publish to artifacts - inputs: - SourceFolder: 'artifacts/bin' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin' - - task: CopyFiles@2 - displayName: Gather packages for publish to artifacts - inputs: - SourceFolder: 'artifacts/packages' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages' - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish pipeline artifacts - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts' - PublishLocation: Container - ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} - continueOnError: true - condition: always() - - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: - - task: 1ES.PublishPipelineArtifact@1 - inputs: - targetPath: 'artifacts/log' - artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} - displayName: 'Publish logs' - continueOnError: true - condition: always() - - - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs - inputs: - PathtoPublish: '$(System.DefaultWorkingDirectory)/artifacts/log/$(_BuildConfig)' - PublishLocation: Container - ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} - continueOnError: true - condition: always() - - - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'xunit')) }}: - - task: PublishTestResults@2 - displayName: Publish XUnit Test Results - inputs: - testResultsFormat: 'xUnit' - testResultsFiles: '*.xml' - searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' - testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit - mergeTestResults: ${{ parameters.mergeTestResults }} - continueOnError: true - condition: always() - - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'vstest')) }}: - - task: PublishTestResults@2 - displayName: Publish TRX Test Results - inputs: - testResultsFormat: 'VSTest' - testResultsFiles: '*.trx' - searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' - testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx - mergeTestResults: ${{ parameters.mergeTestResults }} - continueOnError: true - condition: always() - - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: - - template: /eng/common/templates-official/steps/generate-sbom.yml - parameters: - PackageVersion: ${{ parameters.packageVersion}} - BuildDropPath: ${{ parameters.buildDropPath }} - IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} - - - ${{ if eq(parameters.enableBuildRetry, 'true') }}: - - task: 1ES.PublishPipelineArtifact@1 - inputs: - targetPath: '$(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration' - artifactName: 'BuildConfiguration' - displayName: 'Publish build retry configuration' - continueOnError: true +- 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: + outputParentDirectory: $(Build.ArtifactStagingDirectory) + outputs: + - ${{ if ne(parameters.artifacts.publish, '') }}: + - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: + - output: buildArtifacts + displayName: Publish pipeline artifacts + PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts' + ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} + condition: always() + continueOnError: true + - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log' + artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)_Attempt$(System.JobAttempt)') }} + displayName: 'Publish logs' + continueOnError: true + condition: always() + sbomEnabled: false # we don't need SBOM for logs + + - ${{ if eq(parameters.enablePublishBuildArtifacts, true) }}: + - output: buildArtifacts + displayName: Publish Logs + PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' + publishLocation: Container + ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} + continueOnError: true + condition: always() + sbomEnabled: false # we don't need SBOM for logs + + - ${{ if eq(parameters.enableBuildRetry, 'true') }}: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/eng/common/BuildConfiguration' + artifactName: 'BuildConfiguration' + displayName: 'Publish build retry configuration' + continueOnError: true + sbomEnabled: false # we don't need SBOM for BuildConfiguration + + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: + - output: pipelineArtifact + displayName: Publish SBOM manifest + continueOnError: true + targetPath: $(Build.ArtifactStagingDirectory)/sbom + artifactName: $(ARTIFACT_NAME) + + # add any outputs provided via root yaml + - ${{ if ne(parameters.templateContext.outputs, '') }}: + - ${{ each output in parameters.templateContext.outputs }}: + - ${{ output }} + + # add any remaining templateContext properties + ${{ each context in parameters.templateContext }}: + ${{ if and(ne(context.key, 'outputParentDirectory'), ne(context.key, 'outputs')) }}: + ${{ context.key }}: ${{ context.value }} + + ${{ each parameter in parameters }}: + ${{ if and(ne(parameter.key, 'templateContext'), ne(parameter.key, 'is1ESPipeline')) }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/job/onelocbuild.yml b/eng/common/templates-official/job/onelocbuild.yml index 68e7a65605c5..0f0c514b912d 100644 --- a/eng/common/templates-official/job/onelocbuild.yml +++ b/eng/common/templates-official/job/onelocbuild.yml @@ -1,112 +1,7 @@ -parameters: - # Optional: dependencies of the job - dependsOn: '' - - # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool - pool: '' - - CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex - GithubPat: $(BotAccount-dotnet-bot-repo-PAT) - - SourcesDirectory: $(System.DefaultWorkingDirectory) - CreatePr: true - AutoCompletePr: false - ReusePr: true - UseLfLineEndings: true - UseCheckedInLocProjectJson: false - SkipLocProjectJsonGeneration: false - LanguageSet: VS_Main_Languages - LclSource: lclFilesInRepo - LclPackageId: '' - RepoType: gitHub - GitHubOrg: dotnet - MirrorRepo: '' - MirrorBranch: main - condition: '' - JobNameSuffix: '' - jobs: -- job: OneLocBuild${{ parameters.JobNameSuffix }} - - dependsOn: ${{ parameters.dependsOn }} - - displayName: OneLocBuild${{ parameters.JobNameSuffix }} - - variables: - - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat - - name: _GenerateLocProjectArguments - value: -SourcesDirectory ${{ parameters.SourcesDirectory }} - -LanguageSet "${{ parameters.LanguageSet }}" - -CreateNeutralXlfs - - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: - - name: _GenerateLocProjectArguments - value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson - - template: /eng/common/templates-official/variables/pool-providers.yml - - ${{ if ne(parameters.pool, '') }}: - pool: ${{ parameters.pool }} - ${{ if eq(parameters.pool, '') }}: - 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 - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2022 - os: windows - - steps: - - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: - - task: Powershell@2 - inputs: - filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1 - arguments: $(_GenerateLocProjectArguments) - displayName: Generate LocProject.json - condition: ${{ parameters.condition }} - - - task: OneLocBuild@2 - displayName: OneLocBuild - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - inputs: - locProj: eng/Localize/LocProject.json - outDir: $(Build.ArtifactStagingDirectory) - lclSource: ${{ parameters.LclSource }} - lclPackageId: ${{ parameters.LclPackageId }} - isCreatePrSelected: ${{ parameters.CreatePr }} - isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} - ${{ if eq(parameters.CreatePr, true) }}: - isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} - ${{ if eq(parameters.RepoType, 'gitHub') }}: - isShouldReusePrSelected: ${{ parameters.ReusePr }} - packageSourceAuth: patAuth - patVariable: ${{ parameters.CeapexPat }} - ${{ if eq(parameters.RepoType, 'gitHub') }}: - repoType: ${{ parameters.RepoType }} - gitHubPatVariable: "${{ parameters.GithubPat }}" - ${{ if ne(parameters.MirrorRepo, '') }}: - isMirrorRepoSelected: true - gitHubOrganization: ${{ parameters.GitHubOrg }} - mirrorRepo: ${{ parameters.MirrorRepo }} - mirrorBranch: ${{ parameters.MirrorBranch }} - condition: ${{ parameters.condition }} - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Localization Files - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/loc' - PublishLocation: Container - ArtifactName: Loc - condition: ${{ parameters.condition }} +- template: /eng/common/core-templates/job/onelocbuild.yml + parameters: + is1ESPipeline: true - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish LocProject.json - inputs: - PathtoPublish: '$(System.DefaultWorkingDirectory)/eng/Localize/' - PublishLocation: Container - ArtifactName: Loc - condition: ${{ parameters.condition }} \ No newline at end of file + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/job/publish-build-assets.yml b/eng/common/templates-official/job/publish-build-assets.yml index 53109246d948..d667a70e8de7 100644 --- a/eng/common/templates-official/job/publish-build-assets.yml +++ b/eng/common/templates-official/job/publish-build-assets.yml @@ -1,177 +1,7 @@ -parameters: - configuration: 'Debug' - - # Optional: condition for the job to run - condition: '' - - # Optional: 'true' if future jobs should run even if this job fails - continueOnError: false - - # Optional: dependencies of the job - dependsOn: '' - - # Optional: Include PublishBuildArtifacts task - enablePublishBuildArtifacts: false - - # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool - pool: {} - - # Optional: should run as a public build even in the internal project - # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. - runAsPublic: false - - # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing - publishUsingPipelines: false - - # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing - publishAssetsImmediately: false - - artifactsPublishingAdditionalParameters: '' - - signingValidationAdditionalParameters: '' - - repositoryAlias: self - - officialBuildId: '' - jobs: -- job: Asset_Registry_Publish - - dependsOn: ${{ parameters.dependsOn }} - timeoutInMinutes: 150 - - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: - displayName: Publish Assets - ${{ else }}: - displayName: Publish to Build Asset Registry - - variables: - - template: /eng/common/templates-official/variables/pool-providers.yml - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: Publish-Build-Assets - - group: AzureDevOps-Artifact-Feeds-Pats - - name: runCodesignValidationInjection - value: false - - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: - - template: /eng/common/templates-official/post-build/common-variables.yml - - name: OfficialBuildId - ${{ if ne(parameters.officialBuildId, '') }}: - value: ${{ parameters.officialBuildId }} - ${{ else }}: - value: $(Build.BuildNumber) - - 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 - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Publishing-Internal - image: windows.vs2019.amd64 - os: windows - steps: - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - checkout: ${{ parameters.repositoryAlias }} - fetchDepth: 3 - clean: true - - task: DownloadBuildArtifacts@0 - displayName: Download artifact - inputs: - artifactName: AssetManifests - downloadPath: '$(Build.StagingDirectory)/Download' - checkDownloadedFiles: true - condition: ${{ parameters.condition }} - continueOnError: ${{ parameters.continueOnError }} - - - task: NuGetAuthenticate@1 - - - task: AzureCLI@2 - displayName: Publish Build Assets - inputs: - azureSubscription: "Darc: Maestro Production" - scriptType: ps - scriptLocation: scriptPath - scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1 - arguments: > - -task PublishBuildAssets -restore -msbuildEngine dotnet - /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:MaestroApiEndpoint=https://maestro.dot.net - /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} - /p:OfficialBuildId=$(OfficialBuildId) - condition: ${{ parameters.condition }} - continueOnError: ${{ parameters.continueOnError }} - - - task: powershell@2 - displayName: Create ReleaseConfigs Artifact - inputs: - targetType: inline - script: | - New-Item -Path "$(Build.StagingDirectory)/ReleaseConfigs" -ItemType Directory -Force - $filePath = "$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt" - Add-Content -Path $filePath -Value $(BARBuildId) - Add-Content -Path $filePath -Value "$(DefaultChannels)" - Add-Content -Path $filePath -Value $(IsStableBuild) - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish ReleaseConfigs Artifact - inputs: - PathtoPublish: '$(Build.StagingDirectory)/ReleaseConfigs' - PublishLocation: Container - ArtifactName: ReleaseConfigs - - - task: powershell@2 - displayName: Check if SymbolPublishingExclusionsFile.txt exists - inputs: - targetType: inline - script: | - $symbolExclusionfile = "$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt" - if(Test-Path -Path $symbolExclusionfile) - { - Write-Host "SymbolExclusionFile exists" - Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]true" - } - else{ - Write-Host "Symbols Exclusion file does not exists" - Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]false" - } - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish SymbolPublishingExclusionsFile Artifact - condition: eq(variables['SymbolExclusionFile'], 'true') - inputs: - PathtoPublish: '$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt' - PublishLocation: Container - ArtifactName: ReleaseConfigs - - - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: - - template: /eng/common/templates-official/post-build/setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - # Darc is targeting 8.0, so make sure it's installed - - task: UseDotNet@2 - inputs: - version: 8.0.x - - - task: AzureCLI@2 - displayName: Publish Using Darc - inputs: - azureSubscription: "Darc: Maestro Production" - scriptType: ps - scriptLocation: scriptPath - scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) - -PublishingInfraVersion 3 - -AzdoToken '$(System.AccessToken)' - -WaitPublishingFinish true - -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' - -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' +- template: /eng/common/core-templates/job/publish-build-assets.yml + parameters: + is1ESPipeline: true - - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: - - template: /eng/common/templates-official/steps/publish-logs.yml - parameters: - JobLabel: 'Publish_Artifacts_Logs' + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/job/source-build.yml b/eng/common/templates-official/job/source-build.yml index f75400757d1e..1a480034b678 100644 --- a/eng/common/templates-official/job/source-build.yml +++ b/eng/common/templates-official/job/source-build.yml @@ -1,79 +1,7 @@ -parameters: - # This template adds arcade-powered source-build to CI. The template produces a server job with a - # default ID 'Source_Build_Complete' to put in a dependency list if necessary. - - # Specifies the prefix for source-build jobs added to pipeline. Use this if disambiguation needed. - jobNamePrefix: 'Source_Build' - - # Defines the platform on which to run the job. By default, a linux-x64 machine, suitable for - # managed-only repositories. This is an object with these properties: - # - # name: '' - # The name of the job. This is included in the job ID. - # targetRID: '' - # The name of the target RID to use, instead of the one auto-detected by Arcade. - # nonPortable: false - # Enables non-portable mode. This means a more specific RID (e.g. fedora.32-x64 rather than - # linux-x64), and compiling against distro-provided packages rather than portable ones. - # skipPublishValidation: false - # Disables publishing validation. By default, a check is performed to ensure no packages are - # published by source-build. - # container: '' - # A container to use. Runs in docker. - # pool: {} - # A pool to use. Runs directly on an agent. - # buildScript: '' - # Specifies the build script to invoke to perform the build in the repo. The default - # './build.sh' should work for typical Arcade repositories, but this is customizable for - # difficult situations. - # jobProperties: {} - # A list of job properties to inject at the top level, for potential extensibility beyond - # container and pool. - platform: {} - - # Optional list of directories to ignore for component governance scans. - cgIgnoreDirectories: [] - - # If set to true and running on a non-public project, - # Internal blob storage locations will be enabled. - # This is not enabled by default because many repositories do not need internal sources - # and do not need to have the required service connections approved in the pipeline. - enableInternalSources: false - jobs: -- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} - displayName: Source-Build (${{ parameters.platform.name }}) - - ${{ each property in parameters.platform.jobProperties }}: - ${{ property.key }}: ${{ property.value }} - - ${{ if ne(parameters.platform.container, '') }}: - container: ${{ parameters.platform.container }} - - ${{ if eq(parameters.platform.pool, '') }}: - # The default VM host AzDO pool. This should be capable of running Docker containers: almost all - # source-build builds run in Docker, including the default managed platform. - # /eng/common/templates-official/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')] - demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] - image: 1es-azurelinux-3 - os: linux - - ${{ if ne(parameters.platform.pool, '') }}: - pool: ${{ parameters.platform.pool }} - - workspace: - clean: all +- template: /eng/common/core-templates/job/source-build.yml + parameters: + is1ESPipeline: true - steps: - - ${{ if eq(parameters.enableInternalSources, true) }}: - - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - - template: /eng/common/templates-official/steps/source-build.yml - parameters: - platform: ${{ parameters.platform }} - cgIgnoreDirectories: ${{ parameters.cgIgnoreDirectories }} + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/job/source-index-stage1.yml b/eng/common/templates-official/job/source-index-stage1.yml index 8de0dfaf3494..6d5ead316f92 100644 --- a/eng/common/templates-official/job/source-index-stage1.yml +++ b/eng/common/templates-official/job/source-index-stage1.yml @@ -1,83 +1,7 @@ -parameters: - runAsPublic: false - sourceIndexUploadPackageVersion: 2.0.0-20250425.2 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 - sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json - sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" - preSteps: [] - binlogPath: artifacts/log/Debug/Build.binlog - condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') - dependsOn: '' - pool: '' - jobs: -- job: SourceIndexStage1 - dependsOn: ${{ parameters.dependsOn }} - condition: ${{ parameters.condition }} - variables: - - name: SourceIndexUploadPackageVersion - value: ${{ parameters.sourceIndexUploadPackageVersion }} - - name: SourceIndexProcessBinlogPackageVersion - value: ${{ parameters.sourceIndexProcessBinlogPackageVersion }} - - name: SourceIndexPackageSource - value: ${{ parameters.sourceIndexPackageSource }} - - name: BinlogPath - value: ${{ parameters.binlogPath }} - - template: /eng/common/templates-official/variables/pool-providers.yml - - ${{ if ne(parameters.pool, '') }}: - pool: ${{ parameters.pool }} - ${{ if eq(parameters.pool, '') }}: - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64.open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: $(DncEngInternalBuildPool) - image: windows.vs2022.amd64 - os: windows - - steps: - - ${{ each preStep in parameters.preSteps }}: - - ${{ preStep }} - - - task: UseDotNet@2 - displayName: Use .NET 8 SDK - inputs: - packageType: sdk - version: 8.0.x - installationPath: $(Agent.TempDirectory)/dotnet - workingDirectory: $(Agent.TempDirectory) - - - script: | - $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(sourceIndexProcessBinlogPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools - $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(sourceIndexUploadPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools - displayName: Download Tools - # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk. - workingDirectory: $(Agent.TempDirectory) - - - script: ${{ parameters.sourceIndexBuildCommand }} - displayName: Build Repository - - - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output - displayName: Process Binlog into indexable sln - - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: AzureCLI@2 - displayName: Get stage 1 auth token - inputs: - azureSubscription: 'SourceDotNet Stage1 Publish' - addSpnToEnvironment: true - scriptType: 'ps' - scriptLocation: 'inlineScript' - inlineScript: | - echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId" - echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken" - echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId" - - - script: | - az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN) - displayName: "Login to Azure" +- template: /eng/common/core-templates/job/source-index-stage1.yml + parameters: + is1ESPipeline: true - - script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 - displayName: Upload stage1 artifacts to source index + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/jobs/codeql-build.yml b/eng/common/templates-official/jobs/codeql-build.yml index f6476912a861..a726322ecfe0 100644 --- a/eng/common/templates-official/jobs/codeql-build.yml +++ b/eng/common/templates-official/jobs/codeql-build.yml @@ -1,31 +1,7 @@ -parameters: - # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md - continueOnError: false - # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job - jobs: [] - # Optional: if specified, restore and use this version of Guardian instead of the default. - overrideGuardianVersion: '' - jobs: -- template: /eng/common/templates-official/jobs/jobs.yml +- template: /eng/common/core-templates/jobs/codeql-build.yml parameters: - enableMicrobuild: false - enablePublishBuildArtifacts: false - enablePublishTestResults: false - enablePublishBuildAssets: false - enablePublishUsingPipelines: false - enableTelemetry: true + is1ESPipeline: true - variables: - - group: Publish-Build-Assets - # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in - # sync with the packages.config file. - - name: DefaultGuardianVersion - value: 0.109.0 - - name: GuardianPackagesConfigFile - value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config - - name: GuardianVersion - value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} - - jobs: ${{ parameters.jobs }} - + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/jobs/jobs.yml b/eng/common/templates-official/jobs/jobs.yml index 03aa64e1741f..007deddaea0f 100644 --- a/eng/common/templates-official/jobs/jobs.yml +++ b/eng/common/templates-official/jobs/jobs.yml @@ -1,101 +1,7 @@ -parameters: - # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md - continueOnError: false - - # Optional: Include PublishBuildArtifacts task - enablePublishBuildArtifacts: false - - # Optional: Enable publishing using release pipelines - enablePublishUsingPipelines: false - - # Optional: Enable running the source-build jobs to build repo from source - enableSourceBuild: false - - # Optional: Parameters for source-build template. - # See /eng/common/templates-official/jobs/source-build.yml for options - sourceBuildParameters: [] - - graphFileGeneration: - # Optional: Enable generating the graph files at the end of the build - enabled: false - # Optional: Include toolset dependencies in the generated graph files - includeToolset: false - - # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job - jobs: [] - - # Optional: Override automatically derived dependsOn value for "publish build assets" job - publishBuildAssetsDependsOn: '' - - # Optional: Publish the assets as soon as the publish to BAR stage is complete, rather doing so in a separate stage. - publishAssetsImmediately: false - - # Optional: If using publishAssetsImmediately and additional parameters are needed, can be used to send along additional parameters (normally sent to post-build.yml) - artifactsPublishingAdditionalParameters: '' - signingValidationAdditionalParameters: '' - - # Optional: should run as a public build even in the internal project - # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. - runAsPublic: false - - enableSourceIndex: false - sourceIndexParams: {} - repositoryAlias: self - officialBuildId: '' - -# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, -# and some (Microbuild) should only be applied to non-PR cases for internal builds. - jobs: -- ${{ each job in parameters.jobs }}: - - template: ../job/job.yml - parameters: - # pass along parameters - ${{ each parameter in parameters }}: - ${{ if ne(parameter.key, 'jobs') }}: - ${{ parameter.key }}: ${{ parameter.value }} - - # pass along job properties - ${{ each property in job }}: - ${{ if ne(property.key, 'job') }}: - ${{ property.key }}: ${{ property.value }} - - name: ${{ job.job }} - -- ${{ if eq(parameters.enableSourceBuild, true) }}: - - template: /eng/common/templates-official/jobs/source-build.yml - parameters: - allCompletedJobId: Source_Build_Complete - ${{ each parameter in parameters.sourceBuildParameters }}: - ${{ parameter.key }}: ${{ parameter.value }} - -- ${{ if eq(parameters.enableSourceIndex, 'true') }}: - - template: ../job/source-index-stage1.yml - parameters: - runAsPublic: ${{ parameters.runAsPublic }} - ${{ each parameter in parameters.sourceIndexParams }}: - ${{ parameter.key }}: ${{ parameter.value }} - -- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: - - template: ../job/publish-build-assets.yml - parameters: - continueOnError: ${{ parameters.continueOnError }} - dependsOn: - - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}: - - ${{ each job in parameters.publishBuildAssetsDependsOn }}: - - ${{ job.job }} - - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}: - - ${{ each job in parameters.jobs }}: - - ${{ job.job }} - - ${{ if eq(parameters.enableSourceBuild, true) }}: - - Source_Build_Complete +- template: /eng/common/core-templates/jobs/jobs.yml + parameters: + is1ESPipeline: true - runAsPublic: ${{ parameters.runAsPublic }} - publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} - publishAssetsImmediately: ${{ parameters.publishAssetsImmediately }} - enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} - repositoryAlias: ${{ parameters.repositoryAlias }} - officialBuildId: ${{ parameters.officialBuildId }} + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/jobs/source-build.yml b/eng/common/templates-official/jobs/source-build.yml index 21a346fbd6c7..483e7b611f34 100644 --- a/eng/common/templates-official/jobs/source-build.yml +++ b/eng/common/templates-official/jobs/source-build.yml @@ -1,59 +1,7 @@ -parameters: - # This template adds arcade-powered source-build to CI. A job is created for each platform, as - # well as an optional server job that completes when all platform jobs complete. - - # The name of the "join" job for all source-build platforms. If set to empty string, the job is - # not included. Existing repo pipelines can use this job depend on all source-build jobs - # completing without maintaining a separate list of every single job ID: just depend on this one - # server job. By default, not included. Recommended name if used: 'Source_Build_Complete'. - allCompletedJobId: '' - - # See /eng/common/templates-official/job/source-build.yml - jobNamePrefix: 'Source_Build' - - # This is the default platform provided by Arcade, intended for use by a managed-only repo. - defaultManagedPlatform: - name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-9-amd64' - - # Defines the platforms on which to run build jobs. One job is created for each platform, and the - # object in this array is sent to the job template as 'platform'. If no platforms are specified, - # one job runs on 'defaultManagedPlatform'. - platforms: [] - - # Optional list of directories to ignore for component governance scans. - cgIgnoreDirectories: [] - - # If set to true and running on a non-public project, - # Internal nuget and blob storage locations will be enabled. - # This is not enabled by default because many repositories do not need internal sources - # and do not need to have the required service connections approved in the pipeline. - enableInternalSources: false - jobs: +- template: /eng/common/core-templates/jobs/source-build.yml + parameters: + is1ESPipeline: true -- ${{ if ne(parameters.allCompletedJobId, '') }}: - - job: ${{ parameters.allCompletedJobId }} - displayName: Source-Build Complete - pool: server - dependsOn: - - ${{ each platform in parameters.platforms }}: - - ${{ parameters.jobNamePrefix }}_${{ platform.name }} - - ${{ if eq(length(parameters.platforms), 0) }}: - - ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }} - -- ${{ each platform in parameters.platforms }}: - - template: /eng/common/templates-official/job/source-build.yml - parameters: - jobNamePrefix: ${{ parameters.jobNamePrefix }} - platform: ${{ platform }} - cgIgnoreDirectories: ${{ parameters.cgIgnoreDirectories }} - enableInternalSources: ${{ parameters.enableInternalSources }} - -- ${{ if eq(length(parameters.platforms), 0) }}: - - template: /eng/common/templates-official/job/source-build.yml - parameters: - jobNamePrefix: ${{ parameters.jobNamePrefix }} - platform: ${{ parameters.defaultManagedPlatform }} - cgIgnoreDirectories: ${{ parameters.cgIgnoreDirectories }} - enableInternalSources: ${{ parameters.enableInternalSources }} + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates-official/post-build/common-variables.yml b/eng/common/templates-official/post-build/common-variables.yml index 173914f2364a..c32fc49233f8 100644 --- a/eng/common/templates-official/post-build/common-variables.yml +++ b/eng/common/templates-official/post-build/common-variables.yml @@ -1,22 +1,8 @@ variables: - - group: Publish-Build-Assets +- template: /eng/common/core-templates/post-build/common-variables.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: true - # Whether the build is internal or not - - name: IsInternalBuild - value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} - - # Default Maestro++ API Endpoint and API Version - - name: MaestroApiEndPoint - value: "https://maestro.dot.net" - - name: MaestroApiAccessToken - value: $(MaestroAccessToken) - - name: MaestroApiVersion - value: "2020-02-20" - - - name: SourceLinkCLIVersion - value: 3.0.0 - - name: SymbolToolVersion - value: 1.0.1 - - - name: runCodesignValidationInjection - value: false + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates-official/post-build/post-build.yml b/eng/common/templates-official/post-build/post-build.yml index 07837055ee30..2364c0fd4a52 100644 --- a/eng/common/templates-official/post-build/post-build.yml +++ b/eng/common/templates-official/post-build/post-build.yml @@ -1,291 +1,8 @@ -parameters: - # Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST. - # Publishing V1 is no longer supported - # Publishing V2 is no longer supported - # Publishing V3 is the default - - name: publishingInfraVersion - displayName: Which version of publishing should be used to promote the build definition? - type: number - default: 3 - values: - - 3 - - - name: BARBuildId - displayName: BAR Build Id - type: number - default: 0 - - - name: PromoteToChannelIds - displayName: Channel to promote BARBuildId to - type: string - default: '' - - - name: enableSourceLinkValidation - displayName: Enable SourceLink validation - type: boolean - default: false - - - name: enableSigningValidation - displayName: Enable signing validation - type: boolean - default: true - - - name: enableSymbolValidation - displayName: Enable symbol validation - type: boolean - default: false - - - name: enableNugetValidation - displayName: Enable NuGet validation - type: boolean - default: true - - - name: publishInstallersAndChecksums - displayName: Publish installers and checksums - type: boolean - default: true - - - name: SDLValidationParameters - type: object - default: - enable: false - publishGdn: false - continueOnError: false - params: '' - artifactNames: '' - downloadArtifacts: true - - # These parameters let the user customize the call to sdk-task.ps1 for publishing - # symbols & general artifacts as well as for signing validation - - name: symbolPublishingAdditionalParameters - displayName: Symbol publishing additional parameters - type: string - default: '' - - - name: artifactsPublishingAdditionalParameters - displayName: Artifact publishing additional parameters - type: string - default: '' - - - name: signingValidationAdditionalParameters - displayName: Signing validation additional parameters - type: string - default: '' - - # Which stages should finish execution before post-build stages start - - name: validateDependsOn - type: object - default: - - build - - - name: publishDependsOn - type: object - default: - - Validate - - # Optional: Call asset publishing rather than running in a separate stage - - name: publishAssetsImmediately - type: boolean - default: false - stages: -- ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - - stage: Validate - dependsOn: ${{ parameters.validateDependsOn }} - displayName: Validate Build Assets - variables: - - template: common-variables.yml - - template: /eng/common/templates-official/variables/pool-providers.yml - jobs: - - job: - displayName: NuGet Validation - condition: and(succeededOrFailed(), eq( ${{ parameters.enableNugetValidation }}, '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 }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2022 - os: windows - - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts - checkDownloadedFiles: true - - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - - - job: - displayName: Signing Validation - condition: and( eq( ${{ parameters.enableSigningValidation }}, 'true'), ne( variables['PostBuildSign'], '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 }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2022 - os: windows - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts - checkDownloadedFiles: true - itemPattern: | - ** - !**/Microsoft.SourceBuild.Intermediate.*.nupkg - - # 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 - # otherwise it'll complain about accessing a private feed. - - task: NuGetAuthenticate@1 - displayName: 'Authenticate to AzDO Feeds' - - # Signing validation will optionally work with the buildmanifest file which is downloaded from - # Azure DevOps above. - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task SigningValidation -restore -msbuildEngine vs - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' - /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' - ${{ parameters.signingValidationAdditionalParameters }} - - - template: ../steps/publish-logs.yml - parameters: - StageLabel: 'Validation' - 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 }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2022 - os: windows - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - 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 - -- ${{ if ne(parameters.publishAssetsImmediately, 'true') }}: - - stage: publish_using_darc - ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - dependsOn: ${{ parameters.publishDependsOn }} - ${{ else }}: - dependsOn: ${{ parameters.validateDependsOn }} - displayName: Publish using Darc - variables: - - template: common-variables.yml - - template: /eng/common/templates-official/variables/pool-providers.yml - jobs: - - job: - displayName: Publish Using Darc - timeoutInMinutes: 120 - 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 }}: - name: NetCore1ESPool-Publishing-Internal - image: windows.vs2019.amd64 - os: windows - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - task: NuGetAuthenticate@1 - - # Darc is targeting 8.0, so make sure it's installed - - task: UseDotNet@2 - inputs: - version: 8.0.x +- template: /eng/common/core-templates/post-build/post-build.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: true - - task: AzureCLI@2 - displayName: Publish Using Darc - inputs: - azureSubscription: "Darc: Maestro Production" - scriptType: ps - scriptLocation: scriptPath - scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) - -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} - -AzdoToken '$(System.AccessToken)' - -WaitPublishingFinish true - -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' - -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/post-build/setup-maestro-vars.yml b/eng/common/templates-official/post-build/setup-maestro-vars.yml index 3a56abf8922e..024397d87864 100644 --- a/eng/common/templates-official/post-build/setup-maestro-vars.yml +++ b/eng/common/templates-official/post-build/setup-maestro-vars.yml @@ -1,70 +1,8 @@ -parameters: - BARBuildId: '' - PromoteToChannelIds: '' - steps: - - ${{ if eq(coalesce(parameters.PromoteToChannelIds, 0), 0) }}: - - task: DownloadBuildArtifacts@0 - displayName: Download Release Configs - inputs: - buildType: current - artifactName: ReleaseConfigs - checkDownloadedFiles: true - - - task: PowerShell@2 - name: setReleaseVars - displayName: Set Release Configs Vars - inputs: - targetType: inline - pwsh: true - script: | - try { - if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { - $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt - - $BarId = $Content | Select -Index 0 - $Channels = $Content | Select -Index 1 - $IsStableBuild = $Content | Select -Index 2 - - $AzureDevOpsProject = $Env:System_TeamProject - $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId - $AzureDevOpsBuildId = $Env:Build_BuildId - } - else { - $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" - - $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' - $apiHeaders.Add('Accept', 'application/json') - $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}") - - $buildInfo = try { Invoke-WebRequest -UseBasicParsing -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - - $BarId = $Env:BARBuildId - $Channels = $Env:PromoteToMaestroChannels -split "," - $Channels = $Channels -join "][" - $Channels = "[$Channels]" - - $IsStableBuild = $buildInfo.stable - $AzureDevOpsProject = $buildInfo.azureDevOpsProject - $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId - $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId - } - - Write-Host "##vso[task.setvariable variable=BARBuildId]$BarId" - Write-Host "##vso[task.setvariable variable=TargetChannels]$Channels" - Write-Host "##vso[task.setvariable variable=IsStableBuild]$IsStableBuild" +- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: true - Write-Host "##vso[task.setvariable variable=AzDOProjectName]$AzureDevOpsProject" - Write-Host "##vso[task.setvariable variable=AzDOPipelineId]$AzureDevOpsBuildDefinitionId" - Write-Host "##vso[task.setvariable variable=AzDOBuildId]$AzureDevOpsBuildId" - } - catch { - Write-Host $_ - Write-Host $_.Exception - Write-Host $_.ScriptStackTrace - exit 1 - } - env: - MAESTRO_API_TOKEN: $(MaestroApiAccessToken) - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates-official/steps/component-governance.yml b/eng/common/templates-official/steps/component-governance.yml index cbba0596709d..30bb3985ca2b 100644 --- a/eng/common/templates-official/steps/component-governance.yml +++ b/eng/common/templates-official/steps/component-governance.yml @@ -1,13 +1,7 @@ -parameters: - disableComponentGovernance: false - componentGovernanceIgnoreDirectories: '' - 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 - inputs: - ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} \ No newline at end of file +- 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/enable-internal-runtimes.yml b/eng/common/templates-official/steps/enable-internal-runtimes.yml index 93a8394a666b..f9dd238c6cd5 100644 --- a/eng/common/templates-official/steps/enable-internal-runtimes.yml +++ b/eng/common/templates-official/steps/enable-internal-runtimes.yml @@ -1,28 +1,9 @@ # Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' # variable with the base64-encoded SAS token, by default - -parameters: -- name: federatedServiceConnection - type: string - default: 'dotnetbuilds-internal-read' -- name: outputVariableName - type: string - default: 'dotnetbuilds-internal-container-read-token-base64' -- name: expiryInHours - type: number - default: 1 -- name: base64Encode - type: boolean - default: true - steps: -- ${{ if ne(variables['System.TeamProject'], 'public') }}: - - template: /eng/common/templates-official/steps/get-delegation-sas.yml - parameters: - federatedServiceConnection: ${{ parameters.federatedServiceConnection }} - outputVariableName: ${{ parameters.outputVariableName }} - expiryInHours: ${{ parameters.expiryInHours }} - base64Encode: ${{ parameters.base64Encode }} - storageAccount: dotnetbuilds - container: internal - permissions: rl +- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/steps/enable-internal-sources.yml b/eng/common/templates-official/steps/enable-internal-sources.yml new file mode 100644 index 000000000000..e6d57182284d --- /dev/null +++ b/eng/common/templates-official/steps/enable-internal-sources.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/enable-internal-sources.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates-official/steps/generate-sbom.yml b/eng/common/templates-official/steps/generate-sbom.yml index 1536353566c7..9a89a4706d94 100644 --- a/eng/common/templates-official/steps/generate-sbom.yml +++ b/eng/common/templates-official/steps/generate-sbom.yml @@ -1,48 +1,7 @@ -# 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: 8.0.0 - BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' - PackageName: '.NET' - ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom - IgnoreDirectories: '' - sbomContinueOnError: true - 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 }}' - -- task: 1ES.PublishPipelineArtifact@1 - displayName: Publish SBOM manifest - continueOnError: ${{parameters.sbomContinueOnError}} - inputs: - targetPath: '${{parameters.manifestDirPath}}' - artifactName: $(ARTIFACT_NAME) +- template: /eng/common/core-templates/steps/generate-sbom.yml + parameters: + is1ESPipeline: true + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/steps/get-delegation-sas.yml b/eng/common/templates-official/steps/get-delegation-sas.yml index c690cc0a070c..c5a9c1f8275c 100644 --- a/eng/common/templates-official/steps/get-delegation-sas.yml +++ b/eng/common/templates-official/steps/get-delegation-sas.yml @@ -1,52 +1,7 @@ -parameters: -- name: federatedServiceConnection - type: string -- name: outputVariableName - type: string -- name: expiryInHours - type: number - default: 1 -- name: base64Encode - type: boolean - default: false -- name: storageAccount - type: string -- name: container - type: string -- name: permissions - type: string - default: 'rl' - steps: -- task: AzureCLI@2 - displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' - inputs: - azureSubscription: ${{ parameters.federatedServiceConnection }} - scriptType: 'pscore' - scriptLocation: 'inlineScript' - inlineScript: | - # Calculate the expiration of the SAS token and convert to UTC - $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") - - # Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads - # of correlation payloads. https://github.com/dotnet/dnceng/issues/3484 - $sas = "" - do { - $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv - if ($LASTEXITCODE -ne 0) { - Write-Error "Failed to generate SAS token." - exit 1 - } - } while($sas.IndexOf('/') -ne -1) - - if ($LASTEXITCODE -ne 0) { - Write-Error "Failed to generate SAS token." - exit 1 - } - - if ('${{ parameters.base64Encode }}' -eq 'true') { - $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) - } +- template: /eng/common/core-templates/steps/get-delegation-sas.yml + parameters: + is1ESPipeline: true - Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" - Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/steps/get-federated-access-token.yml b/eng/common/templates-official/steps/get-federated-access-token.yml index 55e33bd38f71..c8dcf6b81392 100644 --- a/eng/common/templates-official/steps/get-federated-access-token.yml +++ b/eng/common/templates-official/steps/get-federated-access-token.yml @@ -1,40 +1,7 @@ -parameters: -- name: federatedServiceConnection - type: string -- name: outputVariableName - type: string -- name: stepName - type: string - default: 'getFederatedAccessToken' -- name: condition - type: string - default: '' -# Resource to get a token for. Common values include: -# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps -# - 'https://storage.azure.com/' for storage -# Defaults to Azure DevOps -- name: resource - type: string - default: '499b84ac-1321-427f-aa17-267ca6975798' -- name: isStepOutputVariable - type: boolean - default: false - steps: -- task: AzureCLI@2 - displayName: 'Getting federated access token for feeds' - name: ${{ parameters.stepName }} - ${{ if ne(parameters.condition, '') }}: - condition: ${{ parameters.condition }} - inputs: - azureSubscription: ${{ parameters.federatedServiceConnection }} - scriptType: 'pscore' - scriptLocation: 'inlineScript' - inlineScript: | - $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv - if ($LASTEXITCODE -ne 0) { - Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" - exit 1 - } - Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" - Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken" \ No newline at end of file +- template: /eng/common/core-templates/steps/get-federated-access-token.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates-official/steps/publish-build-artifacts.yml b/eng/common/templates-official/steps/publish-build-artifacts.yml new file mode 100644 index 000000000000..100a3fc98493 --- /dev/null +++ b/eng/common/templates-official/steps/publish-build-artifacts.yml @@ -0,0 +1,41 @@ +parameters: +- name: displayName + type: string + default: 'Publish to Build Artifact' + +- name: condition + type: string + default: succeeded() + +- name: artifactName + type: string + +- name: pathToPublish + type: string + +- name: continueOnError + type: boolean + default: false + +- name: publishLocation + type: string + default: 'Container' + +- name: is1ESPipeline + type: boolean + default: true + +steps: +- ${{ if ne(parameters.is1ESPipeline, true) }}: + - 'eng/common/templates-official cannot be referenced from a non-1ES managed template': error +- task: 1ES.PublishBuildArtifacts@1 + displayName: ${{ parameters.displayName }} + condition: ${{ parameters.condition }} + ${{ if parameters.continueOnError }}: + continueOnError: ${{ parameters.continueOnError }} + inputs: + PublishLocation: ${{ parameters.publishLocation }} + PathtoPublish: ${{ parameters.pathToPublish }} + ${{ if parameters.artifactName }}: + ArtifactName: ${{ parameters.artifactName }} + diff --git a/eng/common/templates-official/steps/publish-logs.yml b/eng/common/templates-official/steps/publish-logs.yml index af5a40b64c4b..579fd531e94c 100644 --- a/eng/common/templates-official/steps/publish-logs.yml +++ b/eng/common/templates-official/steps/publish-logs.yml @@ -1,23 +1,7 @@ -parameters: - StageLabel: '' - JobLabel: '' - steps: -- task: Powershell@2 - displayName: Prepare Binlogs to Upload - inputs: - targetType: inline - script: | - New-Item -ItemType Directory $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ - Move-Item -Path $(System.DefaultWorkingDirectory)/artifacts/log/Debug/* $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ - continueOnError: true - condition: always() +- template: /eng/common/core-templates/steps/publish-logs.yml + parameters: + is1ESPipeline: true -- task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs - inputs: - PathtoPublish: '$(System.DefaultWorkingDirectory)/PostBuildLogs' - PublishLocation: Container - ArtifactName: PostBuildLogs - continueOnError: true - condition: always() + ${{ 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 new file mode 100644 index 000000000000..172f9f0fdc97 --- /dev/null +++ b/eng/common/templates-official/steps/publish-pipeline-artifacts.yml @@ -0,0 +1,28 @@ +parameters: +- name: is1ESPipeline + type: boolean + default: true + +- name: args + type: object + default: {} + +steps: +- ${{ if ne(parameters.is1ESPipeline, true) }}: + - 'eng/common/templates-official cannot be referenced from a non-1ES managed template': error +- task: 1ES.PublishPipelineArtifact@1 + displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }} + ${{ if parameters.args.condition }}: + condition: ${{ parameters.args.condition }} + ${{ else }}: + condition: succeeded() + ${{ if parameters.args.continueOnError }}: + continueOnError: ${{ parameters.args.continueOnError }} + inputs: + targetPath: ${{ parameters.args.targetPath }} + ${{ if parameters.args.artifactName }}: + artifactName: ${{ parameters.args.artifactName }} + ${{ if parameters.args.properties }}: + properties: ${{ parameters.args.properties }} + ${{ if parameters.args.sbomEnabled }}: + sbomEnabled: ${{ parameters.args.sbomEnabled }} diff --git a/eng/common/templates-official/steps/retain-build.yml b/eng/common/templates-official/steps/retain-build.yml index 83d97a26a01f..5594551508a3 100644 --- a/eng/common/templates-official/steps/retain-build.yml +++ b/eng/common/templates-official/steps/retain-build.yml @@ -1,28 +1,7 @@ -parameters: - # Optional azure devops PAT with build execute permissions for the build's organization, - # only needed if the build that should be retained ran on a different organization than - # the pipeline where this template is executing from - Token: '' - # Optional BuildId to retain, defaults to the current running build - BuildId: '' - # Azure devops Organization URI for the build in the https://dev.azure.com/ format. - # Defaults to the organization the current pipeline is running on - AzdoOrgUri: '$(System.CollectionUri)' - # Azure devops project for the build. Defaults to the project the current pipeline is running on - AzdoProject: '$(System.TeamProject)' - steps: - - task: powershell@2 - inputs: - targetType: 'filePath' - filePath: eng/common/retain-build.ps1 - pwsh: true - arguments: > - -AzdoOrgUri: ${{parameters.AzdoOrgUri}} - -AzdoProject ${{parameters.AzdoProject}} - -Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }} - -BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}} - displayName: Enable permanent build retention - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - BUILD_ID: $(Build.BuildId) \ No newline at end of file +- template: /eng/common/core-templates/steps/retain-build.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/steps/send-to-helix.yml b/eng/common/templates-official/steps/send-to-helix.yml index 22f2501307d4..6500f21bf845 100644 --- a/eng/common/templates-official/steps/send-to-helix.yml +++ b/eng/common/templates-official/steps/send-to-helix.yml @@ -1,92 +1,7 @@ -# Please remember to update the documentation if you make changes to these parameters! -parameters: - HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ - HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' - HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number - HelixTargetQueues: '' # required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues - HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group - HelixConfiguration: '' # optional -- additional property attached to a job - HelixPreCommands: '' # optional -- commands to run before Helix work item execution - HelixPostCommands: '' # optional -- commands to run after Helix work item execution - HelixProjectArguments: '' # optional -- arguments passed to the build command for helixpublish.proj - WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects - WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects - WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects - CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload - XUnitProjects: '' # optional -- semicolon-delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true - XUnitWorkItemTimeout: '' # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects - XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects - XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner - XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects - IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion - DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json - DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json - WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." - IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set - HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net ) - Creator: '' # optional -- if the build is external, use this to specify who is sending the job - DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO - condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() - continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false - steps: - - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj ${{ parameters.HelixProjectArguments }} /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' - displayName: ${{ parameters.DisplayNamePrefix }} (Windows) - env: - BuildConfig: $(_BuildConfig) - HelixSource: ${{ parameters.HelixSource }} - HelixType: ${{ parameters.HelixType }} - HelixBuild: ${{ parameters.HelixBuild }} - HelixConfiguration: ${{ parameters.HelixConfiguration }} - HelixTargetQueues: ${{ parameters.HelixTargetQueues }} - HelixAccessToken: ${{ parameters.HelixAccessToken }} - HelixPreCommands: ${{ parameters.HelixPreCommands }} - HelixPostCommands: ${{ parameters.HelixPostCommands }} - WorkItemDirectory: ${{ parameters.WorkItemDirectory }} - WorkItemCommand: ${{ parameters.WorkItemCommand }} - WorkItemTimeout: ${{ parameters.WorkItemTimeout }} - CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} - XUnitProjects: ${{ parameters.XUnitProjects }} - XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} - XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} - XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} - XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} - IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} - DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} - DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} - HelixBaseUri: ${{ parameters.HelixBaseUri }} - Creator: ${{ parameters.Creator }} - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) - continueOnError: ${{ parameters.continueOnError }} - - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj ${{ parameters.HelixProjectArguments }} /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog - displayName: ${{ parameters.DisplayNamePrefix }} (Unix) - env: - BuildConfig: $(_BuildConfig) - HelixSource: ${{ parameters.HelixSource }} - HelixType: ${{ parameters.HelixType }} - HelixBuild: ${{ parameters.HelixBuild }} - HelixConfiguration: ${{ parameters.HelixConfiguration }} - HelixTargetQueues: ${{ parameters.HelixTargetQueues }} - HelixAccessToken: ${{ parameters.HelixAccessToken }} - HelixPreCommands: ${{ parameters.HelixPreCommands }} - HelixPostCommands: ${{ parameters.HelixPostCommands }} - WorkItemDirectory: ${{ parameters.WorkItemDirectory }} - WorkItemCommand: ${{ parameters.WorkItemCommand }} - WorkItemTimeout: ${{ parameters.WorkItemTimeout }} - CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} - XUnitProjects: ${{ parameters.XUnitProjects }} - XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} - XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} - XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} - XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} - IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} - DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} - DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} - HelixBaseUri: ${{ parameters.HelixBaseUri }} - Creator: ${{ parameters.Creator }} - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT')) - continueOnError: ${{ parameters.continueOnError }} +- template: /eng/common/core-templates/steps/send-to-helix.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/steps/source-build.yml b/eng/common/templates-official/steps/source-build.yml index c307825c9122..8f92c49e7b06 100644 --- a/eng/common/templates-official/steps/source-build.yml +++ b/eng/common/templates-official/steps/source-build.yml @@ -1,135 +1,7 @@ -parameters: - # This template adds arcade-powered source-build to CI. - - # This is a 'steps' template, and is intended for advanced scenarios where the existing build - # infra has a careful build methodology that must be followed. For example, a repo - # (dotnet/runtime) might choose to clone the GitHub repo only once and store it as a pipeline - # artifact for all subsequent jobs to use, to reduce dependence on a strong network connection to - # GitHub. Using this steps template leaves room for that infra to be included. - - # Defines the platform on which to run the steps. See 'eng/common/templates-official/job/source-build.yml' - # for details. The entire object is described in the 'job' template for simplicity, even though - # the usage of the properties on this object is split between the 'job' and 'steps' templates. - platform: {} - - # Optional list of directories to ignore for component governance scans. - cgIgnoreDirectories: [] - steps: -# Build. Keep it self-contained for simple reusability. (No source-build-specific job variables.) -- script: | - set -x - df -h - - # If building on the internal project, the artifact feeds variable may be available (usually only if needed) - # In that case, call the feed setup script to add internal feeds corresponding to public ones. - # In addition, add an msbuild argument to copy the WIP from the repo to the target build location. - # This is because SetupNuGetSources.sh will alter the current NuGet.config file, and we need to preserve those - # changes. - internalRestoreArgs= - if [ '$(dn-bot-dnceng-artifact-feeds-rw)' != '$''(dn-bot-dnceng-artifact-feeds-rw)' ]; then - # Temporarily work around https://github.com/dotnet/arcade/issues/7709 - chmod +x $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh - $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh $(System.DefaultWorkingDirectory)/NuGet.config $(dn-bot-dnceng-artifact-feeds-rw) - internalRestoreArgs='/p:CopyWipIntoInnerSourceBuildRepo=true' - - # The 'Copy WIP' feature of source build uses git stash to apply changes from the original repo. - # This only works if there is a username/email configured, which won't be the case in most CI runs. - git config --get user.email - if [ $? -ne 0 ]; then - git config user.email dn-bot@microsoft.com - git config user.name dn-bot - fi - fi - - # If building on the internal project, the internal storage variable may be available (usually only if needed) - # In that case, add variables to allow the download of internal runtimes if the specified versions are not found - # in the default public locations. - internalRuntimeDownloadArgs= - if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then - internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' - fi - - buildConfig=Release - # Check if AzDO substitutes in a build config from a variable, and use it if so. - if [ '$(_BuildConfig)' != '$''(_BuildConfig)' ]; then - buildConfig='$(_BuildConfig)' - fi - - officialBuildArgs= - if [ '${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}' = 'True' ]; then - officialBuildArgs='/p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=$(BUILD.BUILDNUMBER)' - fi - - targetRidArgs= - if [ '${{ parameters.platform.targetRID }}' != '' ]; then - targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}' - fi - - runtimeOsArgs= - if [ '${{ parameters.platform.runtimeOS }}' != '' ]; then - runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}' - fi - - baseOsArgs= - if [ '${{ parameters.platform.baseOS }}' != '' ]; then - baseOsArgs='/p:BaseOS=${{ parameters.platform.baseOS }}' - fi - - publishArgs= - if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then - publishArgs='--publish' - fi - - assetManifestFileName=SourceBuild_RidSpecific.xml - if [ '${{ parameters.platform.name }}' != '' ]; then - assetManifestFileName=SourceBuild_${{ parameters.platform.name }}.xml - fi - - ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ - --configuration $buildConfig \ - --restore --build --pack $publishArgs -bl \ - $officialBuildArgs \ - $internalRuntimeDownloadArgs \ - $internalRestoreArgs \ - $targetRidArgs \ - $runtimeOsArgs \ - $baseOsArgs \ - /p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \ - /p:ArcadeBuildFromSource=true \ - /p:AssetManifestFileName=$assetManifestFileName - displayName: Build - -# Upload build logs for diagnosis. -- task: CopyFiles@2 - displayName: Prepare BuildLogs staging directory - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)' - Contents: | - **/*.log - **/*.binlog - artifacts/source-build/self/prebuilt-report/** - TargetFolder: '$(Build.StagingDirectory)/BuildLogs' - CleanTargetFolder: true - continueOnError: true - condition: succeededOrFailed() - -- task: 1ES.PublishPipelineArtifact@1 - displayName: Publish BuildLogs - inputs: - targetPath: '$(Build.StagingDirectory)/BuildLogs' - artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt) - continueOnError: true - condition: succeededOrFailed() +- template: /eng/common/core-templates/steps/source-build.yml + parameters: + is1ESPipeline: true -# Manually inject component detection so that we can ignore the source build upstream cache, which contains -# a nupkg cache of input packages (a local feed). -# This path must match the upstream cache path in property 'CurrentRepoSourceBuiltNupkgCacheDir' -# in src\Microsoft.DotNet.Arcade.Sdk\tools\SourceBuild\SourceBuildArcade.targets -- task: ComponentGovernanceComponentDetection@0 - displayName: Component Detection (Exclude upstream cache) - inputs: - ${{ if eq(length(parameters.cgIgnoreDirectories), 0) }}: - ignoreDirectories: '$(System.DefaultWorkingDirectory)/artifacts/source-build/self/src/artifacts/obj/source-built-upstream-cache' - ${{ else }}: - ignoreDirectories: ${{ join(',', parameters.cgIgnoreDirectories) }} + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 80454d5a5587..5bdd3dd85fd2 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -1,263 +1,82 @@ -# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, -# and some (Microbuild) should only be applied to non-PR cases for internal builds. - -parameters: -# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job - cancelTimeoutInMinutes: '' - condition: '' - container: '' - continueOnError: false - dependsOn: '' - displayName: '' - pool: '' - steps: [] - strategy: '' - timeoutInMinutes: '' - variables: [] - workspace: '' - templateContext: '' - -# Job base template specific parameters - # See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md - artifacts: '' - enableMicrobuild: false +parameters: enablePublishBuildArtifacts: false - enablePublishBuildAssets: false - enablePublishTestResults: false - enablePublishUsingPipelines: false - enableBuildRetry: false disableComponentGovernance: '' componentGovernanceIgnoreDirectories: '' - mergeTestResults: false - testRunTitle: '' - testResultsFormat: '' - name: '' - preSteps: [] - runAsPublic: false # Sbom related params enableSbom: true - PackageVersion: 7.0.0 + runAsPublic: false + PackageVersion: 9.0.0 BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' jobs: -- job: ${{ parameters.name }} - - ${{ if ne(parameters.cancelTimeoutInMinutes, '') }}: - cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }} - - ${{ if ne(parameters.condition, '') }}: - condition: ${{ parameters.condition }} - - ${{ if ne(parameters.container, '') }}: - container: ${{ parameters.container }} - - ${{ if ne(parameters.continueOnError, '') }}: - continueOnError: ${{ parameters.continueOnError }} - - ${{ if ne(parameters.dependsOn, '') }}: - dependsOn: ${{ parameters.dependsOn }} - - ${{ if ne(parameters.displayName, '') }}: - displayName: ${{ parameters.displayName }} - - ${{ if ne(parameters.pool, '') }}: - pool: ${{ parameters.pool }} - - ${{ if ne(parameters.strategy, '') }}: - strategy: ${{ parameters.strategy }} - - ${{ if ne(parameters.timeoutInMinutes, '') }}: - timeoutInMinutes: ${{ parameters.timeoutInMinutes }} - - ${{ if ne(parameters.templateContext, '') }}: - templateContext: ${{ parameters.templateContext }} - - variables: - - ${{ if ne(parameters.enableTelemetry, 'false') }}: - - name: DOTNET_CLI_TELEMETRY_PROFILE - value: '$(Build.Repository.Uri)' - - ${{ if eq(parameters.enableRichCodeNavigation, 'true') }}: - - name: EnableRichCodeNavigation - value: 'true' - # Retry signature validation up to three times, waiting 2 seconds between attempts. - # See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures - - name: NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY - value: 3,2000 - - ${{ each variable in parameters.variables }}: - # handle name-value variable syntax - # example: - # - name: [key] - # value: [value] - - ${{ if ne(variable.name, '') }}: - - name: ${{ variable.name }} - value: ${{ variable.value }} - - # handle variable groups - - ${{ if ne(variable.group, '') }}: - - group: ${{ variable.group }} +- template: /eng/common/core-templates/job/job.yml + parameters: + is1ESPipeline: false - # handle template variable syntax - # example: - # - template: path/to/template.yml - # parameters: - # [key]: [value] - - ${{ if ne(variable.template, '') }}: - - template: ${{ variable.template }} - ${{ if ne(variable.parameters, '') }}: - parameters: ${{ variable.parameters }} + ${{ each parameter in parameters }}: + ${{ if and(ne(parameter.key, 'steps'), ne(parameter.key, 'is1ESPipeline')) }}: + ${{ parameter.key }}: ${{ parameter.value }} - # handle key-value variable syntax. - # example: - # - [key]: [value] - - ${{ if and(eq(variable.name, ''), eq(variable.group, ''), eq(variable.template, '')) }}: - - ${{ each pair in variable }}: - - name: ${{ pair.key }} - value: ${{ pair.value }} + steps: + - ${{ each step in parameters.steps }}: + - ${{ step }} - # DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds - - ${{ if and(eq(parameters.enableTelemetry, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-HelixApi-Access - - ${{ if ne(parameters.workspace, '') }}: - workspace: ${{ parameters.workspace }} - - steps: - - ${{ if ne(parameters.preSteps, '') }}: - - ${{ each preStep in parameters.preSteps }}: - - ${{ preStep }} - - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - - task: MicroBuildSigningPlugin@4 - displayName: Install MicroBuild plugin - inputs: - signType: $(_SignType) - zipSources: false - feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea + 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 }}: - ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca - env: - TeamName: $(_TeamName) - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) - - - ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}: - - task: NuGetAuthenticate@1 - - - ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}: - - task: DownloadPipelineArtifact@2 - inputs: - buildType: current - artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }} - targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }} - itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }} - - - ${{ each step in parameters.steps }}: - - ${{ step }} - - - ${{ if eq(parameters.enableRichCodeNavigation, true) }}: - - task: RichCodeNavIndexer@0 - displayName: RichCodeNav Upload - inputs: - languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }} - environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'production') }} - richNavLogOutputDirectory: $(System.DefaultWorkingDirectory)/artifacts/bin - uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} - continueOnError: true - - - 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 + disableComponentGovernance: true ${{ else }}: - disableComponentGovernance: true - ${{ else }}: - disableComponentGovernance: ${{ parameters.disableComponentGovernance }} - componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} - - - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: MicroBuildCleanup@1 - displayName: Execute Microbuild cleanup tasks - condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) - continueOnError: ${{ parameters.continueOnError }} - env: - TeamName: $(_TeamName) - - - ${{ if ne(parameters.artifacts.publish, '') }}: - - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: - - task: CopyFiles@2 - displayName: Gather binaries for publish to artifacts - inputs: - SourceFolder: 'artifacts/bin' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin' - - task: CopyFiles@2 - displayName: Gather packages for publish to artifacts - inputs: - SourceFolder: 'artifacts/packages' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages' - - task: PublishBuildArtifacts@1 - displayName: Publish pipeline artifacts - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts' - PublishLocation: Container - ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} - continueOnError: true - condition: always() - - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: - - publish: artifacts/log - artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} - displayName: Publish logs - continueOnError: true - condition: always() - - - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: - - task: PublishBuildArtifacts@1 - displayName: Publish Logs - inputs: - PathtoPublish: '$(System.DefaultWorkingDirectory)/artifacts/log/$(_BuildConfig)' - PublishLocation: Container - ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} - continueOnError: true - condition: always() - - - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'xunit')) }}: - - task: PublishTestResults@2 - displayName: Publish XUnit Test Results - inputs: - testResultsFormat: 'xUnit' - testResultsFiles: '*.xml' - searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' - testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit - mergeTestResults: ${{ parameters.mergeTestResults }} - continueOnError: true - condition: always() - - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'vstest')) }}: - - task: PublishTestResults@2 - displayName: Publish TRX Test Results - inputs: - testResultsFormat: 'VSTest' - testResultsFiles: '*.trx' - searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' - testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx - mergeTestResults: ${{ parameters.mergeTestResults }} - continueOnError: true - condition: always() - - - ${{ 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 }} - IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} - - - ${{ if eq(parameters.enableBuildRetry, 'true') }}: - - publish: $(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration - artifact: BuildConfiguration - displayName: Publish build retry configuration - continueOnError: true + disableComponentGovernance: ${{ parameters.disableComponentGovernance }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} + + 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 + parameters: + is1ESPipeline: false + args: + displayName: Publish pipeline artifacts + pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts' + publishLocation: Container + artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} + continueOnError: true + condition: always() + - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: + - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml + parameters: + is1ESPipeline: false + args: + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log' + artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} + displayName: 'Publish logs' + continueOnError: true + condition: always() + sbomEnabled: false # we don't need SBOM for logs + + - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: + - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: false + args: + displayName: Publish Logs + pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' + publishLocation: Container + artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} + continueOnError: true + condition: always() + + - ${{ if eq(parameters.enableBuildRetry, 'true') }}: + - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml + parameters: + is1ESPipeline: false + args: + targetPath: '$(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration' + artifactName: 'BuildConfiguration' + displayName: 'Publish build retry configuration' + continueOnError: true + sbomEnabled: false # we don't need SBOM for BuildConfiguration diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml index 2cd3840c9927..ff829dc4c700 100644 --- a/eng/common/templates/job/onelocbuild.yml +++ b/eng/common/templates/job/onelocbuild.yml @@ -1,109 +1,7 @@ -parameters: - # Optional: dependencies of the job - dependsOn: '' - - # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool - pool: '' - - CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex - GithubPat: $(BotAccount-dotnet-bot-repo-PAT) - - SourcesDirectory: $(System.DefaultWorkingDirectory) - CreatePr: true - AutoCompletePr: false - ReusePr: true - UseLfLineEndings: true - UseCheckedInLocProjectJson: false - SkipLocProjectJsonGeneration: false - LanguageSet: VS_Main_Languages - LclSource: lclFilesInRepo - LclPackageId: '' - RepoType: gitHub - GitHubOrg: dotnet - MirrorRepo: '' - MirrorBranch: main - condition: '' - JobNameSuffix: '' - jobs: -- job: OneLocBuild${{ parameters.JobNameSuffix }} - - dependsOn: ${{ parameters.dependsOn }} - - displayName: OneLocBuild${{ parameters.JobNameSuffix }} - - variables: - - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat - - name: _GenerateLocProjectArguments - value: -SourcesDirectory ${{ parameters.SourcesDirectory }} - -LanguageSet "${{ parameters.LanguageSet }}" - -CreateNeutralXlfs - - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: - - name: _GenerateLocProjectArguments - value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson - - template: /eng/common/templates/variables/pool-providers.yml - - ${{ if ne(parameters.pool, '') }}: - pool: ${{ parameters.pool }} - ${{ if eq(parameters.pool, '') }}: - 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: VSEngSS-MicroBuild2022-1ES - demands: Cmd - # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 - - steps: - - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: - - task: Powershell@2 - inputs: - filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1 - arguments: $(_GenerateLocProjectArguments) - displayName: Generate LocProject.json - condition: ${{ parameters.condition }} - - - task: OneLocBuild@2 - displayName: OneLocBuild - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - inputs: - locProj: eng/Localize/LocProject.json - outDir: $(Build.ArtifactStagingDirectory) - lclSource: ${{ parameters.LclSource }} - lclPackageId: ${{ parameters.LclPackageId }} - isCreatePrSelected: ${{ parameters.CreatePr }} - isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} - ${{ if eq(parameters.CreatePr, true) }}: - isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} - ${{ if eq(parameters.RepoType, 'gitHub') }}: - isShouldReusePrSelected: ${{ parameters.ReusePr }} - packageSourceAuth: patAuth - patVariable: ${{ parameters.CeapexPat }} - ${{ if eq(parameters.RepoType, 'gitHub') }}: - repoType: ${{ parameters.RepoType }} - gitHubPatVariable: "${{ parameters.GithubPat }}" - ${{ if ne(parameters.MirrorRepo, '') }}: - isMirrorRepoSelected: true - gitHubOrganization: ${{ parameters.GitHubOrg }} - mirrorRepo: ${{ parameters.MirrorRepo }} - mirrorBranch: ${{ parameters.MirrorBranch }} - condition: ${{ parameters.condition }} - - - task: PublishBuildArtifacts@1 - displayName: Publish Localization Files - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/loc' - PublishLocation: Container - ArtifactName: Loc - condition: ${{ parameters.condition }} +- template: /eng/common/core-templates/job/onelocbuild.yml + parameters: + is1ESPipeline: false - - task: PublishBuildArtifacts@1 - displayName: Publish LocProject.json - inputs: - PathtoPublish: '$(System.DefaultWorkingDirectory)/eng/Localize/' - PublishLocation: Container - ArtifactName: Loc - condition: ${{ parameters.condition }} \ No newline at end of file + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index b4ece772c326..ab2edec2adb5 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -1,173 +1,7 @@ -parameters: - configuration: 'Debug' - - # Optional: condition for the job to run - condition: '' - - # Optional: 'true' if future jobs should run even if this job fails - continueOnError: false - - # Optional: dependencies of the job - dependsOn: '' - - # Optional: Include PublishBuildArtifacts task - enablePublishBuildArtifacts: false - - # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool - pool: {} - - # Optional: should run as a public build even in the internal project - # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. - runAsPublic: false - - # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing - publishUsingPipelines: false - - # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing - publishAssetsImmediately: false - - artifactsPublishingAdditionalParameters: '' - - signingValidationAdditionalParameters: '' - - repositoryAlias: self - - officialBuildId: '' - jobs: -- job: Asset_Registry_Publish - - dependsOn: ${{ parameters.dependsOn }} - timeoutInMinutes: 150 - - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: - displayName: Publish Assets - ${{ else }}: - displayName: Publish to Build Asset Registry - - variables: - - template: /eng/common/templates/variables/pool-providers.yml - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: Publish-Build-Assets - - group: AzureDevOps-Artifact-Feeds-Pats - - name: runCodesignValidationInjection - value: false - - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: - - template: /eng/common/templates/post-build/common-variables.yml - - name: OfficialBuildId - ${{ if ne(parameters.officialBuildId, '') }}: - value: ${{ parameters.officialBuildId }} - ${{ else }}: - value: $(Build.BuildNumber) - - 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: VSEngSS-MicroBuild2022-1ES - demands: Cmd - # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Publishing-Internal - demands: ImageOverride -equals windows.vs2019.amd64 - - steps: - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - checkout: ${{ parameters.repositoryAlias }} - fetchDepth: 3 - clean: true - - task: DownloadBuildArtifacts@0 - displayName: Download artifact - inputs: - artifactName: AssetManifests - downloadPath: '$(Build.StagingDirectory)/Download' - checkDownloadedFiles: true - condition: ${{ parameters.condition }} - continueOnError: ${{ parameters.continueOnError }} - - - task: NuGetAuthenticate@1 - - - task: AzureCLI@2 - displayName: Publish Build Assets - inputs: - azureSubscription: "Darc: Maestro Production" - scriptType: ps - scriptLocation: scriptPath - scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1 - arguments: > - -task PublishBuildAssets -restore -msbuildEngine dotnet - /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:MaestroApiEndpoint=https://maestro.dot.net - /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} - /p:OfficialBuildId=$(OfficialBuildId) - condition: ${{ parameters.condition }} - continueOnError: ${{ parameters.continueOnError }} - - - task: powershell@2 - displayName: Create ReleaseConfigs Artifact - inputs: - targetType: inline - script: | - Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(BARBuildId) - Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value "$(DefaultChannels)" - Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsStableBuild) - - - task: PublishBuildArtifacts@1 - displayName: Publish ReleaseConfigs Artifact - inputs: - PathtoPublish: '$(Build.StagingDirectory)/ReleaseConfigs.txt' - PublishLocation: Container - ArtifactName: ReleaseConfigs - - - task: powershell@2 - displayName: Check if SymbolPublishingExclusionsFile.txt exists - inputs: - targetType: inline - script: | - $symbolExclusionfile = "$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt" - if(Test-Path -Path $symbolExclusionfile) - { - Write-Host "SymbolExclusionFile exists" - Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]true" - } - else{ - Write-Host "Symbols Exclusion file does not exists" - Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]false" - } - - - task: PublishBuildArtifacts@1 - displayName: Publish SymbolPublishingExclusionsFile Artifact - condition: eq(variables['SymbolExclusionFile'], 'true') - inputs: - PathtoPublish: '$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt' - PublishLocation: Container - ArtifactName: ReleaseConfigs - - - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: - - template: /eng/common/templates/post-build/setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - # Darc is targeting 8.0, so make sure it's installed - - task: UseDotNet@2 - inputs: - version: 8.0.x - - - task: AzureCLI@2 - displayName: Publish Using Darc - inputs: - azureSubscription: "Darc: Maestro Production" - scriptType: ps - scriptLocation: scriptPath - scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) - -PublishingInfraVersion 3 - -AzdoToken '$(System.AccessToken)' - -WaitPublishingFinish true - -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' - -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' +- template: /eng/common/core-templates/job/publish-build-assets.yml + parameters: + is1ESPipeline: false - - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: - - template: /eng/common/templates/steps/publish-logs.yml - parameters: - JobLabel: 'Publish_Artifacts_Logs' + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index 97021335cfc4..e44d47b1d760 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -1,78 +1,7 @@ -parameters: - # This template adds arcade-powered source-build to CI. The template produces a server job with a - # default ID 'Source_Build_Complete' to put in a dependency list if necessary. - - # Specifies the prefix for source-build jobs added to pipeline. Use this if disambiguation needed. - jobNamePrefix: 'Source_Build' - - # Defines the platform on which to run the job. By default, a linux-x64 machine, suitable for - # managed-only repositories. This is an object with these properties: - # - # name: '' - # The name of the job. This is included in the job ID. - # targetRID: '' - # The name of the target RID to use, instead of the one auto-detected by Arcade. - # nonPortable: false - # Enables non-portable mode. This means a more specific RID (e.g. fedora.32-x64 rather than - # linux-x64), and compiling against distro-provided packages rather than portable ones. - # skipPublishValidation: false - # Disables publishing validation. By default, a check is performed to ensure no packages are - # published by source-build. - # container: '' - # A container to use. Runs in docker. - # pool: {} - # A pool to use. Runs directly on an agent. - # buildScript: '' - # Specifies the build script to invoke to perform the build in the repo. The default - # './build.sh' should work for typical Arcade repositories, but this is customizable for - # difficult situations. - # jobProperties: {} - # A list of job properties to inject at the top level, for potential extensibility beyond - # container and pool. - platform: {} - - # Optional list of directories to ignore for component governance scans. - cgIgnoreDirectories: [] - - # If set to true and running on a non-public project, - # Internal blob storage locations will be enabled. - # This is not enabled by default because many repositories do not need internal sources - # and do not need to have the required service connections approved in the pipeline. - enableInternalSources: false - jobs: -- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} - displayName: Source-Build (${{ parameters.platform.name }}) - - ${{ each property in parameters.platform.jobProperties }}: - ${{ property.key }}: ${{ property.value }} - - ${{ if ne(parameters.platform.container, '') }}: - container: ${{ parameters.platform.container }} - - ${{ if eq(parameters.platform.pool, '') }}: - # The default VM host AzDO pool. This should be capable of running Docker containers: almost all - # source-build builds run in Docker, including the default managed platform. - # /eng/common/templates/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')] - demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] - demands: ImageOverride -equals Build.Ubuntu.2204.Amd64 - - ${{ if ne(parameters.platform.pool, '') }}: - pool: ${{ parameters.platform.pool }} - - workspace: - clean: all +- template: /eng/common/core-templates/job/source-build.yml + parameters: + is1ESPipeline: false - steps: - - ${{ if eq(parameters.enableInternalSources, true) }}: - - template: /eng/common/templates/steps/enable-internal-runtimes.yml - - template: /eng/common/templates/steps/source-build.yml - parameters: - platform: ${{ parameters.platform }} - cgIgnoreDirectories: ${{ parameters.cgIgnoreDirectories }} + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 81606fd9a541..89f3291593cb 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -1,82 +1,7 @@ -parameters: - runAsPublic: false - sourceIndexUploadPackageVersion: 2.0.0-20250425.2 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 - sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json - sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" - preSteps: [] - binlogPath: artifacts/log/Debug/Build.binlog - condition: '' - dependsOn: '' - pool: '' - jobs: -- job: SourceIndexStage1 - dependsOn: ${{ parameters.dependsOn }} - condition: ${{ parameters.condition }} - variables: - - name: SourceIndexUploadPackageVersion - value: ${{ parameters.sourceIndexUploadPackageVersion }} - - name: SourceIndexProcessBinlogPackageVersion - value: ${{ parameters.sourceIndexProcessBinlogPackageVersion }} - - name: SourceIndexPackageSource - value: ${{ parameters.sourceIndexPackageSource }} - - name: BinlogPath - value: ${{ parameters.binlogPath }} - - template: /eng/common/templates/variables/pool-providers.yml - - ${{ if ne(parameters.pool, '') }}: - pool: ${{ parameters.pool }} - ${{ if eq(parameters.pool, '') }}: - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64.open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 - - steps: - - ${{ each preStep in parameters.preSteps }}: - - ${{ preStep }} - - - task: UseDotNet@2 - displayName: Use .NET 8 SDK - inputs: - packageType: sdk - version: 8.0.x - installationPath: $(Agent.TempDirectory)/dotnet - workingDirectory: $(Agent.TempDirectory) - - - script: | - $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(sourceIndexProcessBinlogPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools - $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(sourceIndexUploadPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools - displayName: Download Tools - # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk. - workingDirectory: $(Agent.TempDirectory) - - - script: ${{ parameters.sourceIndexBuildCommand }} - displayName: Build Repository - - - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output - displayName: Process Binlog into indexable sln - - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: AzureCLI@2 - displayName: Get stage 1 auth token - inputs: - azureSubscription: 'SourceDotNet Stage1 Publish' - addSpnToEnvironment: true - scriptType: 'ps' - scriptLocation: 'inlineScript' - inlineScript: | - echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId" - echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken" - echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId" - - - script: | - az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN) - displayName: "Login to Azure" +- template: /eng/common/core-templates/job/source-index-stage1.yml + parameters: + is1ESPipeline: false - - script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 - displayName: Upload stage1 artifacts to source index + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/jobs/codeql-build.yml b/eng/common/templates/jobs/codeql-build.yml index e8b43e3b4cba..517f24d6a52c 100644 --- a/eng/common/templates/jobs/codeql-build.yml +++ b/eng/common/templates/jobs/codeql-build.yml @@ -1,31 +1,7 @@ -parameters: - # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md - continueOnError: false - # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job - jobs: [] - # Optional: if specified, restore and use this version of Guardian instead of the default. - overrideGuardianVersion: '' - jobs: -- template: /eng/common/templates/jobs/jobs.yml +- template: /eng/common/core-templates/jobs/codeql-build.yml parameters: - enableMicrobuild: false - enablePublishBuildArtifacts: false - enablePublishTestResults: false - enablePublishBuildAssets: false - enablePublishUsingPipelines: false - enableTelemetry: true + is1ESPipeline: false - variables: - - group: Publish-Build-Assets - # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in - # sync with the packages.config file. - - name: DefaultGuardianVersion - value: 0.109.0 - - name: GuardianPackagesConfigFile - value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config - - name: GuardianVersion - value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} - - jobs: ${{ parameters.jobs }} - + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index 7eafc256758f..388e9037b3e6 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -1,101 +1,7 @@ -parameters: - # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md - continueOnError: false - - # Optional: Include PublishBuildArtifacts task - enablePublishBuildArtifacts: false - - # Optional: Enable publishing using release pipelines - enablePublishUsingPipelines: false - - # Optional: Enable running the source-build jobs to build repo from source - enableSourceBuild: false - - # Optional: Parameters for source-build template. - # See /eng/common/templates/jobs/source-build.yml for options - sourceBuildParameters: [] - - graphFileGeneration: - # Optional: Enable generating the graph files at the end of the build - enabled: false - # Optional: Include toolset dependencies in the generated graph files - includeToolset: false - - # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job - jobs: [] - - # Optional: Override automatically derived dependsOn value for "publish build assets" job - publishBuildAssetsDependsOn: '' - - # Optional: Publish the assets as soon as the publish to BAR stage is complete, rather doing so in a separate stage. - publishAssetsImmediately: false - - # Optional: If using publishAssetsImmediately and additional parameters are needed, can be used to send along additional parameters (normally sent to post-build.yml) - artifactsPublishingAdditionalParameters: '' - signingValidationAdditionalParameters: '' - - # Optional: should run as a public build even in the internal project - # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. - runAsPublic: false - - enableSourceIndex: false - sourceIndexParams: {} - repositoryAlias: self - officialBuildId: '' - -# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, -# and some (Microbuild) should only be applied to non-PR cases for internal builds. - jobs: -- ${{ each job in parameters.jobs }}: - - template: ../job/job.yml - parameters: - # pass along parameters - ${{ each parameter in parameters }}: - ${{ if ne(parameter.key, 'jobs') }}: - ${{ parameter.key }}: ${{ parameter.value }} - - # pass along job properties - ${{ each property in job }}: - ${{ if ne(property.key, 'job') }}: - ${{ property.key }}: ${{ property.value }} - - name: ${{ job.job }} - -- ${{ if eq(parameters.enableSourceBuild, true) }}: - - template: /eng/common/templates/jobs/source-build.yml - parameters: - allCompletedJobId: Source_Build_Complete - ${{ each parameter in parameters.sourceBuildParameters }}: - ${{ parameter.key }}: ${{ parameter.value }} - -- ${{ if eq(parameters.enableSourceIndex, 'true') }}: - - template: ../job/source-index-stage1.yml - parameters: - runAsPublic: ${{ parameters.runAsPublic }} - ${{ each parameter in parameters.sourceIndexParams }}: - ${{ parameter.key }}: ${{ parameter.value }} - -- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: - - template: ../job/publish-build-assets.yml - parameters: - continueOnError: ${{ parameters.continueOnError }} - dependsOn: - - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}: - - ${{ each job in parameters.publishBuildAssetsDependsOn }}: - - ${{ job.job }} - - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}: - - ${{ each job in parameters.jobs }}: - - ${{ job.job }} - - ${{ if eq(parameters.enableSourceBuild, true) }}: - - Source_Build_Complete +- template: /eng/common/core-templates/jobs/jobs.yml + parameters: + is1ESPipeline: false - runAsPublic: ${{ parameters.runAsPublic }} - publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} - publishAssetsImmediately: ${{ parameters.publishAssetsImmediately }} - enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} - repositoryAlias: ${{ parameters.repositoryAlias }} - officialBuildId: ${{ parameters.officialBuildId }} + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml index 4dde599add97..818d4c326dbb 100644 --- a/eng/common/templates/jobs/source-build.yml +++ b/eng/common/templates/jobs/source-build.yml @@ -1,59 +1,7 @@ -parameters: - # This template adds arcade-powered source-build to CI. A job is created for each platform, as - # well as an optional server job that completes when all platform jobs complete. - - # The name of the "join" job for all source-build platforms. If set to empty string, the job is - # not included. Existing repo pipelines can use this job depend on all source-build jobs - # completing without maintaining a separate list of every single job ID: just depend on this one - # server job. By default, not included. Recommended name if used: 'Source_Build_Complete'. - allCompletedJobId: '' - - # See /eng/common/templates/job/source-build.yml - jobNamePrefix: 'Source_Build' - - # This is the default platform provided by Arcade, intended for use by a managed-only repo. - defaultManagedPlatform: - name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-9-amd64' - - # Defines the platforms on which to run build jobs. One job is created for each platform, and the - # object in this array is sent to the job template as 'platform'. If no platforms are specified, - # one job runs on 'defaultManagedPlatform'. - platforms: [] - - # Optional list of directories to ignore for component governance scans. - cgIgnoreDirectories: [] - - # If set to true and running on a non-public project, - # Internal nuget and blob storage locations will be enabled. - # This is not enabled by default because many repositories do not need internal sources - # and do not need to have the required service connections approved in the pipeline. - enableInternalSources: false - jobs: +- template: /eng/common/core-templates/jobs/source-build.yml + parameters: + is1ESPipeline: false -- ${{ if ne(parameters.allCompletedJobId, '') }}: - - job: ${{ parameters.allCompletedJobId }} - displayName: Source-Build Complete - pool: server - dependsOn: - - ${{ each platform in parameters.platforms }}: - - ${{ parameters.jobNamePrefix }}_${{ platform.name }} - - ${{ if eq(length(parameters.platforms), 0) }}: - - ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }} - -- ${{ each platform in parameters.platforms }}: - - template: /eng/common/templates/job/source-build.yml - parameters: - jobNamePrefix: ${{ parameters.jobNamePrefix }} - platform: ${{ platform }} - cgIgnoreDirectories: ${{ parameters.cgIgnoreDirectories }} - enableInternalSources: ${{ parameters.enableInternalSources }} - -- ${{ if eq(length(parameters.platforms), 0) }}: - - template: /eng/common/templates/job/source-build.yml - parameters: - jobNamePrefix: ${{ parameters.jobNamePrefix }} - platform: ${{ parameters.defaultManagedPlatform }} - cgIgnoreDirectories: ${{ parameters.cgIgnoreDirectories }} - enableInternalSources: ${{ parameters.enableInternalSources }} + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index 173914f2364a..7fa105875592 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -1,22 +1,8 @@ variables: - - group: Publish-Build-Assets +- template: /eng/common/core-templates/post-build/common-variables.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: false - # Whether the build is internal or not - - name: IsInternalBuild - value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} - - # Default Maestro++ API Endpoint and API Version - - name: MaestroApiEndPoint - value: "https://maestro.dot.net" - - name: MaestroApiAccessToken - value: $(MaestroAccessToken) - - name: MaestroApiVersion - value: "2020-02-20" - - - name: SourceLinkCLIVersion - value: 3.0.0 - - name: SymbolToolVersion - value: 1.0.1 - - - name: runCodesignValidationInjection - value: false + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 96ca06882384..53ede714bdd2 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -1,287 +1,8 @@ -parameters: - # Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST. - # Publishing V1 is no longer supported - # Publishing V2 is no longer supported - # Publishing V3 is the default - - name: publishingInfraVersion - displayName: Which version of publishing should be used to promote the build definition? - type: number - default: 3 - values: - - 3 - - - name: BARBuildId - displayName: BAR Build Id - type: number - default: 0 - - - name: PromoteToChannelIds - displayName: Channel to promote BARBuildId to - type: string - default: '' - - - name: enableSourceLinkValidation - displayName: Enable SourceLink validation - type: boolean - default: false - - - name: enableSigningValidation - displayName: Enable signing validation - type: boolean - default: true - - - name: enableSymbolValidation - displayName: Enable symbol validation - type: boolean - default: false - - - name: enableNugetValidation - displayName: Enable NuGet validation - type: boolean - default: true - - - name: publishInstallersAndChecksums - displayName: Publish installers and checksums - type: boolean - default: true - - - name: SDLValidationParameters - type: object - default: - enable: false - publishGdn: false - continueOnError: false - params: '' - artifactNames: '' - downloadArtifacts: true - - # These parameters let the user customize the call to sdk-task.ps1 for publishing - # symbols & general artifacts as well as for signing validation - - name: symbolPublishingAdditionalParameters - displayName: Symbol publishing additional parameters - type: string - default: '' - - - name: artifactsPublishingAdditionalParameters - displayName: Artifact publishing additional parameters - type: string - default: '' - - - name: signingValidationAdditionalParameters - displayName: Signing validation additional parameters - type: string - default: '' - - # Which stages should finish execution before post-build stages start - - name: validateDependsOn - type: object - default: - - build - - - name: publishDependsOn - type: object - default: - - Validate - - # Optional: Call asset publishing rather than running in a separate stage - - name: publishAssetsImmediately - type: boolean - default: false - stages: -- ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - - stage: Validate - dependsOn: ${{ parameters.validateDependsOn }} - displayName: Validate Build Assets - variables: - - template: common-variables.yml - - template: /eng/common/templates/variables/pool-providers.yml - jobs: - - job: - displayName: NuGet Validation - condition: and(succeededOrFailed(), eq( ${{ parameters.enableNugetValidation }}, '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: VSEngSS-MicroBuild2022-1ES - demands: Cmd - # If it's not devdiv, it's dnceng - ${{ else }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 - - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts - checkDownloadedFiles: true - - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - - - job: - displayName: Signing Validation - condition: and( eq( ${{ parameters.enableSigningValidation }}, 'true'), ne( variables['PostBuildSign'], '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: VSEngSS-MicroBuild2022-1ES - demands: Cmd - # If it's not devdiv, it's dnceng - ${{ else }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts - checkDownloadedFiles: true - itemPattern: | - ** - !**/Microsoft.SourceBuild.Intermediate.*.nupkg - - # 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 - # otherwise it'll complain about accessing a private feed. - - task: NuGetAuthenticate@1 - displayName: 'Authenticate to AzDO Feeds' - - # Signing validation will optionally work with the buildmanifest file which is downloaded from - # Azure DevOps above. - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task SigningValidation -restore -msbuildEngine vs - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' - /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' - ${{ parameters.signingValidationAdditionalParameters }} - - - template: ../steps/publish-logs.yml - parameters: - StageLabel: 'Validation' - JobLabel: 'Signing' - - - 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: VSEngSS-MicroBuild2022-1ES - demands: Cmd - # If it's not devdiv, it's dnceng - ${{ else }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - 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 - - - template: /eng/common/templates/job/execute-sdl.yml - parameters: - enable: ${{ parameters.SDLValidationParameters.enable }} - publishGuardianDirectoryToPipeline: ${{ parameters.SDLValidationParameters.publishGdn }} - additionalParameters: ${{ parameters.SDLValidationParameters.params }} - continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} - artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} - downloadArtifacts: ${{ parameters.SDLValidationParameters.downloadArtifacts }} - -- ${{ if ne(parameters.publishAssetsImmediately, 'true') }}: - - stage: publish_using_darc - ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - dependsOn: ${{ parameters.publishDependsOn }} - ${{ else }}: - dependsOn: ${{ parameters.validateDependsOn }} - displayName: Publish using Darc - variables: - - template: common-variables.yml - - template: /eng/common/templates/variables/pool-providers.yml - jobs: - - job: - displayName: Publish Using Darc - timeoutInMinutes: 120 - 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: VSEngSS-MicroBuild2022-1ES - demands: Cmd - # If it's not devdiv, it's dnceng - ${{ else }}: - name: NetCore1ESPool-Publishing-Internal - demands: ImageOverride -equals windows.vs2019.amd64 - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - task: NuGetAuthenticate@1 - - # Darc is targeting 8.0, so make sure it's installed - - task: UseDotNet@2 - inputs: - version: 8.0.x +- template: /eng/common/core-templates/post-build/post-build.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: false - - task: AzureCLI@2 - displayName: Publish Using Darc - inputs: - azureSubscription: "Darc: Maestro Production" - scriptType: ps - scriptLocation: scriptPath - scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) - -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} - -AzdoToken '$(System.AccessToken)' - -WaitPublishingFinish true - -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' - -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml index 4347fa80b684..a79fab5b441e 100644 --- a/eng/common/templates/post-build/setup-maestro-vars.yml +++ b/eng/common/templates/post-build/setup-maestro-vars.yml @@ -1,70 +1,8 @@ -parameters: - BARBuildId: '' - PromoteToChannelIds: '' - steps: - - ${{ if eq(coalesce(parameters.PromoteToChannelIds, 0), 0) }}: - - task: DownloadBuildArtifacts@0 - displayName: Download Release Configs - inputs: - buildType: current - artifactName: ReleaseConfigs - checkDownloadedFiles: true - - - task: AzureCLI@2 - name: setReleaseVars - displayName: Set Release Configs Vars - inputs: - azureSubscription: "Darc: Maestro Production" - scriptType: pscore - scriptLocation: inlineScript - inlineScript: | - try { - if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { - $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt - - $BarId = $Content | Select -Index 0 - $Channels = $Content | Select -Index 1 - $IsStableBuild = $Content | Select -Index 2 - - $AzureDevOpsProject = $Env:System_TeamProject - $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId - $AzureDevOpsBuildId = $Env:Build_BuildId - } - else { - . $(System.DefaultWorkingDirectory)\eng\common\tools.ps1 - $darc = Get-Darc - $buildInfo = & $darc get-build ` - --id ${{ parameters.BARBuildId }} ` - --extended ` - --output-format json ` - --ci ` - | convertFrom-Json - - $BarId = ${{ parameters.BARBuildId }} - $Channels = $Env:PromoteToMaestroChannels -split "," - $Channels = $Channels -join "][" - $Channels = "[$Channels]" - - $IsStableBuild = $buildInfo.stable - $AzureDevOpsProject = $buildInfo.azureDevOpsProject - $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId - $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId - } - - Write-Host "##vso[task.setvariable variable=BARBuildId]$BarId" - Write-Host "##vso[task.setvariable variable=TargetChannels]$Channels" - Write-Host "##vso[task.setvariable variable=IsStableBuild]$IsStableBuild" +- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: false - Write-Host "##vso[task.setvariable variable=AzDOProjectName]$AzureDevOpsProject" - Write-Host "##vso[task.setvariable variable=AzDOPipelineId]$AzureDevOpsBuildDefinitionId" - Write-Host "##vso[task.setvariable variable=AzDOBuildId]$AzureDevOpsBuildId" - } - catch { - Write-Host $_ - Write-Host $_.Exception - Write-Host $_.ScriptStackTrace - exit 1 - } - env: - PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates/steps/component-governance.yml b/eng/common/templates/steps/component-governance.yml index cbba0596709d..c12a5f8d21d7 100644 --- a/eng/common/templates/steps/component-governance.yml +++ b/eng/common/templates/steps/component-governance.yml @@ -1,13 +1,7 @@ -parameters: - disableComponentGovernance: false - componentGovernanceIgnoreDirectories: '' - 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 - inputs: - ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} \ No newline at end of file +- 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/steps/enable-internal-runtimes.yml b/eng/common/templates/steps/enable-internal-runtimes.yml index 54dc9416c519..b21a8038cc1c 100644 --- a/eng/common/templates/steps/enable-internal-runtimes.yml +++ b/eng/common/templates/steps/enable-internal-runtimes.yml @@ -1,28 +1,10 @@ # Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' # variable with the base64-encoded SAS token, by default -parameters: -- name: federatedServiceConnection - type: string - default: 'dotnetbuilds-internal-read' -- name: outputVariableName - type: string - default: 'dotnetbuilds-internal-container-read-token-base64' -- name: expiryInHours - type: number - default: 1 -- name: base64Encode - type: boolean - default: true - steps: -- ${{ if ne(variables['System.TeamProject'], 'public') }}: - - template: /eng/common/templates/steps/get-delegation-sas.yml - parameters: - federatedServiceConnection: ${{ parameters.federatedServiceConnection }} - outputVariableName: ${{ parameters.outputVariableName }} - expiryInHours: ${{ parameters.expiryInHours }} - base64Encode: ${{ parameters.base64Encode }} - storageAccount: dotnetbuilds - container: internal - permissions: rl +- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/steps/enable-internal-sources.yml b/eng/common/templates/steps/enable-internal-sources.yml new file mode 100644 index 000000000000..5f87e9abb8aa --- /dev/null +++ b/eng/common/templates/steps/enable-internal-sources.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/enable-internal-sources.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates/steps/generate-sbom.yml b/eng/common/templates/steps/generate-sbom.yml index b1fe8b3944b3..26dc00a2e0f3 100644 --- a/eng/common/templates/steps/generate-sbom.yml +++ b/eng/common/templates/steps/generate-sbom.yml @@ -1,48 +1,7 @@ -# 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: 8.0.0 - BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' - PackageName: '.NET' - ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom - IgnoreDirectories: '' - sbomContinueOnError: true - 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 }} - ${{ if ne(parameters.IgnoreDirectories, '') }}: - AdditionalComponentDetectorArgs: '--IgnoreDirectories ${{ parameters.IgnoreDirectories }}' - -- task: PublishPipelineArtifact@1 - displayName: Publish SBOM manifest - continueOnError: ${{parameters.sbomContinueOnError}} - inputs: - targetPath: '${{parameters.manifestDirPath}}' - artifactName: $(ARTIFACT_NAME) +- template: /eng/common/core-templates/steps/generate-sbom.yml + parameters: + is1ESPipeline: false + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/steps/get-delegation-sas.yml b/eng/common/templates/steps/get-delegation-sas.yml index c690cc0a070c..83760c9798e3 100644 --- a/eng/common/templates/steps/get-delegation-sas.yml +++ b/eng/common/templates/steps/get-delegation-sas.yml @@ -1,52 +1,7 @@ -parameters: -- name: federatedServiceConnection - type: string -- name: outputVariableName - type: string -- name: expiryInHours - type: number - default: 1 -- name: base64Encode - type: boolean - default: false -- name: storageAccount - type: string -- name: container - type: string -- name: permissions - type: string - default: 'rl' - steps: -- task: AzureCLI@2 - displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' - inputs: - azureSubscription: ${{ parameters.federatedServiceConnection }} - scriptType: 'pscore' - scriptLocation: 'inlineScript' - inlineScript: | - # Calculate the expiration of the SAS token and convert to UTC - $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") - - # Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads - # of correlation payloads. https://github.com/dotnet/dnceng/issues/3484 - $sas = "" - do { - $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv - if ($LASTEXITCODE -ne 0) { - Write-Error "Failed to generate SAS token." - exit 1 - } - } while($sas.IndexOf('/') -ne -1) - - if ($LASTEXITCODE -ne 0) { - Write-Error "Failed to generate SAS token." - exit 1 - } - - if ('${{ parameters.base64Encode }}' -eq 'true') { - $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) - } +- template: /eng/common/core-templates/steps/get-delegation-sas.yml + parameters: + is1ESPipeline: false - Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" - Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/steps/get-federated-access-token.yml b/eng/common/templates/steps/get-federated-access-token.yml index 55e33bd38f71..31e151d9d9e7 100644 --- a/eng/common/templates/steps/get-federated-access-token.yml +++ b/eng/common/templates/steps/get-federated-access-token.yml @@ -1,40 +1,7 @@ -parameters: -- name: federatedServiceConnection - type: string -- name: outputVariableName - type: string -- name: stepName - type: string - default: 'getFederatedAccessToken' -- name: condition - type: string - default: '' -# Resource to get a token for. Common values include: -# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps -# - 'https://storage.azure.com/' for storage -# Defaults to Azure DevOps -- name: resource - type: string - default: '499b84ac-1321-427f-aa17-267ca6975798' -- name: isStepOutputVariable - type: boolean - default: false - steps: -- task: AzureCLI@2 - displayName: 'Getting federated access token for feeds' - name: ${{ parameters.stepName }} - ${{ if ne(parameters.condition, '') }}: - condition: ${{ parameters.condition }} - inputs: - azureSubscription: ${{ parameters.federatedServiceConnection }} - scriptType: 'pscore' - scriptLocation: 'inlineScript' - inlineScript: | - $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv - if ($LASTEXITCODE -ne 0) { - Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" - exit 1 - } - Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" - Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken" \ No newline at end of file +- template: /eng/common/core-templates/steps/get-federated-access-token.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates/steps/publish-build-artifacts.yml b/eng/common/templates/steps/publish-build-artifacts.yml new file mode 100644 index 000000000000..6428a98dfef6 --- /dev/null +++ b/eng/common/templates/steps/publish-build-artifacts.yml @@ -0,0 +1,40 @@ +parameters: +- name: is1ESPipeline + type: boolean + default: false + +- name: displayName + type: string + default: 'Publish to Build Artifact' + +- name: condition + type: string + default: succeeded() + +- name: artifactName + type: string + +- name: pathToPublish + type: string + +- name: continueOnError + type: boolean + default: false + +- name: publishLocation + type: string + default: 'Container' + +steps: +- ${{ if eq(parameters.is1ESPipeline, true) }}: + - 'eng/common/templates cannot be referenced from a 1ES managed template': error +- task: PublishBuildArtifacts@1 + displayName: ${{ parameters.displayName }} + condition: ${{ parameters.condition }} + ${{ if parameters.continueOnError }}: + continueOnError: ${{ parameters.continueOnError }} + inputs: + PublishLocation: ${{ parameters.publishLocation }} + PathtoPublish: ${{ parameters.pathToPublish }} + ${{ if parameters.artifactName }}: + ArtifactName: ${{ parameters.artifactName }} \ No newline at end of file diff --git a/eng/common/templates/steps/publish-logs.yml b/eng/common/templates/steps/publish-logs.yml index e2f8413d8e19..4ea86bd88235 100644 --- a/eng/common/templates/steps/publish-logs.yml +++ b/eng/common/templates/steps/publish-logs.yml @@ -1,23 +1,7 @@ -parameters: - StageLabel: '' - JobLabel: '' - steps: -- task: Powershell@2 - displayName: Prepare Binlogs to Upload - inputs: - targetType: inline - script: | - New-Item -ItemType Directory $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ - Move-Item -Path $(System.DefaultWorkingDirectory)/artifacts/log/Debug/* $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ - continueOnError: true - condition: always() +- template: /eng/common/core-templates/steps/publish-logs.yml + parameters: + is1ESPipeline: false -- task: PublishBuildArtifacts@1 - displayName: Publish Logs - inputs: - PathtoPublish: '$(System.DefaultWorkingDirectory)/PostBuildLogs' - PublishLocation: Container - ArtifactName: PostBuildLogs - continueOnError: true - condition: always() + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/steps/publish-pipeline-artifacts.yml b/eng/common/templates/steps/publish-pipeline-artifacts.yml new file mode 100644 index 000000000000..5dd698b212fc --- /dev/null +++ b/eng/common/templates/steps/publish-pipeline-artifacts.yml @@ -0,0 +1,34 @@ +parameters: +- name: is1ESPipeline + type: boolean + default: false + +- name: args + type: object + default: {} + +steps: +- ${{ if eq(parameters.is1ESPipeline, true) }}: + - 'eng/common/templates cannot be referenced from a 1ES managed template': error +- task: PublishPipelineArtifact@1 + displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }} + ${{ if parameters.args.condition }}: + condition: ${{ parameters.args.condition }} + ${{ else }}: + condition: succeeded() + ${{ if parameters.args.continueOnError }}: + continueOnError: ${{ parameters.args.continueOnError }} + inputs: + targetPath: ${{ parameters.args.targetPath }} + ${{ if parameters.args.artifactName }}: + artifactName: ${{ parameters.args.artifactName }} + ${{ if parameters.args.publishLocation }}: + publishLocation: ${{ parameters.args.publishLocation }} + ${{ if parameters.args.fileSharePath }}: + fileSharePath: ${{ parameters.args.fileSharePath }} + ${{ if parameters.args.Parallel }}: + parallel: ${{ parameters.args.Parallel }} + ${{ if parameters.args.parallelCount }}: + parallelCount: ${{ parameters.args.parallelCount }} + ${{ if parameters.args.properties }}: + properties: ${{ parameters.args.properties }} \ No newline at end of file diff --git a/eng/common/templates/steps/retain-build.yml b/eng/common/templates/steps/retain-build.yml index 83d97a26a01f..8e841ace3d29 100644 --- a/eng/common/templates/steps/retain-build.yml +++ b/eng/common/templates/steps/retain-build.yml @@ -1,28 +1,7 @@ -parameters: - # Optional azure devops PAT with build execute permissions for the build's organization, - # only needed if the build that should be retained ran on a different organization than - # the pipeline where this template is executing from - Token: '' - # Optional BuildId to retain, defaults to the current running build - BuildId: '' - # Azure devops Organization URI for the build in the https://dev.azure.com/ format. - # Defaults to the organization the current pipeline is running on - AzdoOrgUri: '$(System.CollectionUri)' - # Azure devops project for the build. Defaults to the project the current pipeline is running on - AzdoProject: '$(System.TeamProject)' - steps: - - task: powershell@2 - inputs: - targetType: 'filePath' - filePath: eng/common/retain-build.ps1 - pwsh: true - arguments: > - -AzdoOrgUri: ${{parameters.AzdoOrgUri}} - -AzdoProject ${{parameters.AzdoProject}} - -Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }} - -BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}} - displayName: Enable permanent build retention - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - BUILD_ID: $(Build.BuildId) \ No newline at end of file +- template: /eng/common/core-templates/steps/retain-build.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml index 22f2501307d4..39f99fc2762d 100644 --- a/eng/common/templates/steps/send-to-helix.yml +++ b/eng/common/templates/steps/send-to-helix.yml @@ -1,92 +1,7 @@ -# Please remember to update the documentation if you make changes to these parameters! -parameters: - HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ - HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' - HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number - HelixTargetQueues: '' # required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues - HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group - HelixConfiguration: '' # optional -- additional property attached to a job - HelixPreCommands: '' # optional -- commands to run before Helix work item execution - HelixPostCommands: '' # optional -- commands to run after Helix work item execution - HelixProjectArguments: '' # optional -- arguments passed to the build command for helixpublish.proj - WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects - WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects - WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects - CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload - XUnitProjects: '' # optional -- semicolon-delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true - XUnitWorkItemTimeout: '' # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects - XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects - XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner - XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects - IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion - DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json - DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json - WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." - IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set - HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net ) - Creator: '' # optional -- if the build is external, use this to specify who is sending the job - DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO - condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() - continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false - steps: - - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj ${{ parameters.HelixProjectArguments }} /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' - displayName: ${{ parameters.DisplayNamePrefix }} (Windows) - env: - BuildConfig: $(_BuildConfig) - HelixSource: ${{ parameters.HelixSource }} - HelixType: ${{ parameters.HelixType }} - HelixBuild: ${{ parameters.HelixBuild }} - HelixConfiguration: ${{ parameters.HelixConfiguration }} - HelixTargetQueues: ${{ parameters.HelixTargetQueues }} - HelixAccessToken: ${{ parameters.HelixAccessToken }} - HelixPreCommands: ${{ parameters.HelixPreCommands }} - HelixPostCommands: ${{ parameters.HelixPostCommands }} - WorkItemDirectory: ${{ parameters.WorkItemDirectory }} - WorkItemCommand: ${{ parameters.WorkItemCommand }} - WorkItemTimeout: ${{ parameters.WorkItemTimeout }} - CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} - XUnitProjects: ${{ parameters.XUnitProjects }} - XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} - XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} - XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} - XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} - IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} - DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} - DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} - HelixBaseUri: ${{ parameters.HelixBaseUri }} - Creator: ${{ parameters.Creator }} - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) - continueOnError: ${{ parameters.continueOnError }} - - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj ${{ parameters.HelixProjectArguments }} /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog - displayName: ${{ parameters.DisplayNamePrefix }} (Unix) - env: - BuildConfig: $(_BuildConfig) - HelixSource: ${{ parameters.HelixSource }} - HelixType: ${{ parameters.HelixType }} - HelixBuild: ${{ parameters.HelixBuild }} - HelixConfiguration: ${{ parameters.HelixConfiguration }} - HelixTargetQueues: ${{ parameters.HelixTargetQueues }} - HelixAccessToken: ${{ parameters.HelixAccessToken }} - HelixPreCommands: ${{ parameters.HelixPreCommands }} - HelixPostCommands: ${{ parameters.HelixPostCommands }} - WorkItemDirectory: ${{ parameters.WorkItemDirectory }} - WorkItemCommand: ${{ parameters.WorkItemCommand }} - WorkItemTimeout: ${{ parameters.WorkItemTimeout }} - CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} - XUnitProjects: ${{ parameters.XUnitProjects }} - XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} - XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} - XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} - XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} - IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} - DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} - DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} - HelixBaseUri: ${{ parameters.HelixBaseUri }} - Creator: ${{ parameters.Creator }} - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT')) - continueOnError: ${{ parameters.continueOnError }} +- template: /eng/common/core-templates/steps/send-to-helix.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml index d08a0e92caa4..23c1d6f4e9f8 100644 --- a/eng/common/templates/steps/source-build.yml +++ b/eng/common/templates/steps/source-build.yml @@ -1,135 +1,7 @@ -parameters: - # This template adds arcade-powered source-build to CI. - - # This is a 'steps' template, and is intended for advanced scenarios where the existing build - # infra has a careful build methodology that must be followed. For example, a repo - # (dotnet/runtime) might choose to clone the GitHub repo only once and store it as a pipeline - # artifact for all subsequent jobs to use, to reduce dependence on a strong network connection to - # GitHub. Using this steps template leaves room for that infra to be included. - - # Defines the platform on which to run the steps. See 'eng/common/templates/job/source-build.yml' - # for details. The entire object is described in the 'job' template for simplicity, even though - # the usage of the properties on this object is split between the 'job' and 'steps' templates. - platform: {} - - # Optional list of directories to ignore for component governance scans. - cgIgnoreDirectories: [] - steps: -# Build. Keep it self-contained for simple reusability. (No source-build-specific job variables.) -- script: | - set -x - df -h - - # If building on the internal project, the artifact feeds variable may be available (usually only if needed) - # In that case, call the feed setup script to add internal feeds corresponding to public ones. - # In addition, add an msbuild argument to copy the WIP from the repo to the target build location. - # This is because SetupNuGetSources.sh will alter the current NuGet.config file, and we need to preserve those - # changes. - internalRestoreArgs= - if [ '$(dn-bot-dnceng-artifact-feeds-rw)' != '$''(dn-bot-dnceng-artifact-feeds-rw)' ]; then - # Temporarily work around https://github.com/dotnet/arcade/issues/7709 - chmod +x $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh - $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh $(System.DefaultWorkingDirectory)/NuGet.config $(dn-bot-dnceng-artifact-feeds-rw) - internalRestoreArgs='/p:CopyWipIntoInnerSourceBuildRepo=true' - - # The 'Copy WIP' feature of source build uses git stash to apply changes from the original repo. - # This only works if there is a username/email configured, which won't be the case in most CI runs. - git config --get user.email - if [ $? -ne 0 ]; then - git config user.email dn-bot@microsoft.com - git config user.name dn-bot - fi - fi - - # If building on the internal project, the internal storage variable may be available (usually only if needed) - # In that case, add variables to allow the download of internal runtimes if the specified versions are not found - # in the default public locations. - internalRuntimeDownloadArgs= - if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then - internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' - fi - - buildConfig=Release - # Check if AzDO substitutes in a build config from a variable, and use it if so. - if [ '$(_BuildConfig)' != '$''(_BuildConfig)' ]; then - buildConfig='$(_BuildConfig)' - fi - - officialBuildArgs= - if [ '${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}' = 'True' ]; then - officialBuildArgs='/p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=$(BUILD.BUILDNUMBER)' - fi - - targetRidArgs= - if [ '${{ parameters.platform.targetRID }}' != '' ]; then - targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}' - fi - - runtimeOsArgs= - if [ '${{ parameters.platform.runtimeOS }}' != '' ]; then - runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}' - fi - - baseOsArgs= - if [ '${{ parameters.platform.baseOS }}' != '' ]; then - baseOsArgs='/p:BaseOS=${{ parameters.platform.baseOS }}' - fi - - publishArgs= - if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then - publishArgs='--publish' - fi - - assetManifestFileName=SourceBuild_RidSpecific.xml - if [ '${{ parameters.platform.name }}' != '' ]; then - assetManifestFileName=SourceBuild_${{ parameters.platform.name }}.xml - fi - - ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ - --configuration $buildConfig \ - --restore --build --pack $publishArgs -bl \ - $officialBuildArgs \ - $internalRuntimeDownloadArgs \ - $internalRestoreArgs \ - $targetRidArgs \ - $runtimeOsArgs \ - $baseOsArgs \ - /p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \ - /p:ArcadeBuildFromSource=true \ - /p:AssetManifestFileName=$assetManifestFileName - displayName: Build - -# Upload build logs for diagnosis. -- task: CopyFiles@2 - displayName: Prepare BuildLogs staging directory - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)' - Contents: | - **/*.log - **/*.binlog - artifacts/source-build/self/prebuilt-report/** - TargetFolder: '$(Build.StagingDirectory)/BuildLogs' - CleanTargetFolder: true - continueOnError: true - condition: succeededOrFailed() - -- task: PublishPipelineArtifact@1 - displayName: Publish BuildLogs - inputs: - targetPath: '$(Build.StagingDirectory)/BuildLogs' - artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt) - continueOnError: true - condition: succeededOrFailed() +- template: /eng/common/core-templates/steps/source-build.yml + parameters: + is1ESPipeline: false -# Manually inject component detection so that we can ignore the source build upstream cache, which contains -# a nupkg cache of input packages (a local feed). -# This path must match the upstream cache path in property 'CurrentRepoSourceBuiltNupkgCacheDir' -# in src\Microsoft.DotNet.Arcade.Sdk\tools\SourceBuild\SourceBuildArcade.targets -- task: ComponentGovernanceComponentDetection@0 - displayName: Component Detection (Exclude upstream cache) - inputs: - ${{ if eq(length(parameters.cgIgnoreDirectories), 0) }}: - ignoreDirectories: '$(System.DefaultWorkingDirectory)/artifacts/source-build/self/src/artifacts/obj/source-built-upstream-cache' - ${{ else }}: - ignoreDirectories: ${{ join(',', parameters.cgIgnoreDirectories) }} + ${{ 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 d236f9fdbb15..18693ea120d5 100644 --- a/eng/common/templates/variables/pool-providers.yml +++ b/eng/common/templates/variables/pool-providers.yml @@ -23,35 +23,37 @@ # # pool: # name: $(DncEngInternalBuildPool) -# demands: ImageOverride -equals windows.vs2019.amd64 - +# demands: ImageOverride -equals windows.vs2022.amd64 variables: - # Coalesce the target and source branches so we know when a PR targets a release branch - # If these variables are somehow missing, fall back to main (tends to have more capacity) + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - template: /eng/common/templates-official/variables/pool-providers.yml + - ${{ else }}: + # Coalesce the target and source branches so we know when a PR targets a release branch + # If these variables are somehow missing, fall back to main (tends to have more capacity) - # Any new -Svc alternative pools should have variables added here to allow for splitting work - - name: DncEngPublicBuildPool - value: $[ - replace( + # Any new -Svc alternative pools should have variables added here to allow for splitting work + - name: DncEngPublicBuildPool + value: $[ replace( - eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), - True, - 'NetCore-Svc-Public' - ), - False, - 'NetCore-Public' - ) - ] + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore-Svc-Public' + ), + False, + 'NetCore-Public' + ) + ] - - name: DncEngInternalBuildPool - value: $[ - replace( + - name: DncEngInternalBuildPool + value: $[ replace( - eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), - True, - 'NetCore1ESPool-Svc-Internal' - ), - False, - 'NetCore1ESPool-Internal' - ) - ] + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore1ESPool-Svc-Internal' + ), + False, + 'NetCore1ESPool-Internal' + ) + ] diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index b674a90618d7..a06513a59407 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -65,6 +65,11 @@ $ErrorActionPreference = 'Stop' # Base-64 encoded SAS token that has permission to storage container described by $runtimeSourceFeed [string]$runtimeSourceFeedKey = if (Test-Path variable:runtimeSourceFeedKey) { $runtimeSourceFeedKey } else { $null } +# True if the build is a product build +[bool]$productBuild = if (Test-Path variable:productBuild) { $productBuild } else { $false } + +[String[]]$properties = if (Test-Path variable:properties) { $properties } else { @() } + function Create-Directory ([string[]] $path) { New-Item -Path $path -Force -ItemType 'Directory' | Out-Null } @@ -158,18 +163,13 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { $env:DOTNET_MULTILEVEL_LOOKUP=0 # Disable first run since we do not need all ASP.NET packages restored. - $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 + $env:DOTNET_NOLOGO=1 # Disable telemetry on CI. if ($ci) { $env:DOTNET_CLI_TELEMETRY_OPTOUT=1 } - # Source Build uses DotNetCoreSdkDir variable - if ($env:DotNetCoreSdkDir -ne $null) { - $env:DOTNET_INSTALL_DIR = $env:DotNetCoreSdkDir - } - # Find the first path on %PATH% that contains the dotnet.exe if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) { $dotnetExecutable = GetExecutableFileName 'dotnet' @@ -228,7 +228,7 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { Write-PipelinePrependPath -Path $dotnetRoot Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0' - Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1' + Write-PipelineSetVariable -Name 'DOTNET_NOLOGO' -Value '1' return $global:_DotNetInstallDir = $dotnetRoot } @@ -254,7 +254,6 @@ function Retry($downloadBlock, $maxRetries = 5) { Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to download file in $maxRetries attempts." break } - } } @@ -384,7 +383,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # 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/RoslynTools.MSBuild/versions/17.12.0 + # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.12.0 $defaultXCopyMSBuildVersion = '17.12.0' if (!$vsRequirements) { @@ -424,7 +423,6 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion } else { - if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') { $xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild' $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0] @@ -450,7 +448,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = if ($xcopyMSBuildVersion.Trim() -ine "none") { $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install if ($vsInstallDir -eq $null) { - throw "Could not xcopy msbuild. Please check that package 'RoslynTools.MSBuild @ $xcopyMSBuildVersion' exists on feed 'dotnet-eng'." + throw "Could not xcopy msbuild. Please check that package 'Microsoft.DotNet.Arcade.MSBuild.Xcopy @ $xcopyMSBuildVersion' exists on feed 'dotnet-eng'." } } if ($vsInstallDir -eq $null) { @@ -487,7 +485,7 @@ function InstallXCopyMSBuild([string]$packageVersion) { } function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { - $packageName = 'RoslynTools.MSBuild' + $packageName = 'Microsoft.DotNet.Arcade.MSBuild.Xcopy' $packageDir = Join-Path $ToolsDir "msbuild\$packageVersion" $packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg" @@ -504,6 +502,10 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { 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 } @@ -545,19 +547,26 @@ function LocateVisualStudio([object]$vsRequirements = $null){ }) } - if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs } + if (!$vsRequirements) { + if (Get-Member -InputObject $GlobalJson.tools -Name 'vs' -ErrorAction SilentlyContinue) { + $vsRequirements = $GlobalJson.tools.vs + } else { + $vsRequirements = $null + } + } + $args = @('-latest', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*') if (!$excludePrereleaseVS) { $args += '-prerelease' } - if (Get-Member -InputObject $vsRequirements -Name 'version') { + if ($vsRequirements -and (Get-Member -InputObject $vsRequirements -Name 'version' -ErrorAction SilentlyContinue)) { $args += '-version' $args += $vsRequirements.version } - if (Get-Member -InputObject $vsRequirements -Name 'components') { + if ($vsRequirements -and (Get-Member -InputObject $vsRequirements -Name 'components' -ErrorAction SilentlyContinue)) { foreach ($component in $vsRequirements.components) { $args += '-requires' $args += $component @@ -604,11 +613,11 @@ function InitializeBuildTool() { # Use override if it exists - commonly set by source-build if ($null -eq $env:_OverrideArcadeInitializeBuildToolFramework) { - $initializeBuildToolFramework="net8.0" + $initializeBuildToolFramework="net9.0" } else { $initializeBuildToolFramework=$env:_OverrideArcadeInitializeBuildToolFramework } - + $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = $initializeBuildToolFramework } } elseif ($msbuildEngine -eq "vs") { try { @@ -651,7 +660,7 @@ function GetNuGetPackageCachePath() { $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages\' } else { $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\' - $env:RESTORENOCACHE = $true + $env:RESTORENOHTTPCACHE = $true } } @@ -684,8 +693,14 @@ function Read-ArcadeSdkVersion() { } function InitializeToolset() { - if (Test-Path variable:global:_ToolsetBuildProj) { - return $global:_ToolsetBuildProj + # For Unified Build/Source-build support, check whether the environment variable is + # set. If it is, then use this as the toolset build project. + if ($env:_InitializeToolset -ne $null) { + return $global:_InitializeToolset = $env:_InitializeToolset + } + + if (Test-Path variable:global:_InitializeToolset) { + return $global:_InitializeToolset } $nugetCache = GetNuGetPackageCachePath @@ -696,7 +711,7 @@ function InitializeToolset() { if (Test-Path $toolsetLocationFile) { $path = Get-Content $toolsetLocationFile -TotalCount 1 if (Test-Path $path) { - return $global:_ToolsetBuildProj = $path + return $global:_InitializeToolset = $path } } @@ -719,7 +734,7 @@ function InitializeToolset() { throw "Invalid toolset path: $path" } - return $global:_ToolsetBuildProj = $path + return $global:_InitializeToolset = $path } function ExitWithExitCode([int] $exitCode) { @@ -771,12 +786,10 @@ function MSBuild() { # new scripts need to work with old packages, so we need to look for the old names/versions (Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')), (Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')), - (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.ArcadeLogging.dll')), - (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll')) - (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.ArcadeLogging.dll')), - (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.Arcade.Sdk.dll')) (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.ArcadeLogging.dll')), - (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll')) + (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll')), + (Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.ArcadeLogging.dll')), + (Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.Arcade.Sdk.dll')) ) $selectedPath = $null foreach ($path in $possiblePaths) { @@ -835,7 +848,8 @@ function MSBuild-Core() { } } - $env:ARCADE_BUILD_TOOL_COMMAND = "$($buildTool.Path) $cmdArgs" + # Be sure quote the path in case there are spaces in the dotnet installation location. + $env:ARCADE_BUILD_TOOL_COMMAND = "`"$($buildTool.Path)`" $cmdArgs" $exitCode = Exec-Process $buildTool.Path $cmdArgs @@ -850,7 +864,8 @@ function MSBuild-Core() { } # When running on Azure Pipelines, override the returned exit code to avoid double logging. - if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null) { + # Skip this when the build is a child of the VMR orchestrator build. + if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$productBuild -and -not($properties -like "*DotNetBuildRepo=true*")) { Write-PipelineSetResult -Result "Failed" -Message "msbuild execution failed." # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 68db15430230..01b09b65796c 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -68,6 +68,9 @@ fi runtime_source_feed=${runtime_source_feed:-''} runtime_source_feed_key=${runtime_source_feed_key:-''} +# True if the build is a product build +product_build=${product_build:-false} + # Resolve any symlinks in the given path. function ResolvePath { local path=$1 @@ -112,7 +115,7 @@ function InitializeDotNetCli { export DOTNET_MULTILEVEL_LOOKUP=0 # Disable first run since we want to control all package sources - export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 + export DOTNET_NOLOGO=1 # Disable telemetry on CI if [[ $ci == true ]]; then @@ -123,11 +126,6 @@ function InitializeDotNetCli { # so it doesn't output warnings to the console. export LTTNG_HOME="$HOME" - # Source Build uses DotNetCoreSdkDir variable - if [[ -n "${DotNetCoreSdkDir:-}" ]]; then - export DOTNET_INSTALL_DIR="$DotNetCoreSdkDir" - fi - # Find the first path on $PATH that contains the dotnet.exe if [[ "$use_installed_dotnet_cli" == true && $global_json_has_runtimes == false && -z "${DOTNET_INSTALL_DIR:-}" ]]; then local dotnet_path=`command -v dotnet` @@ -146,7 +144,7 @@ 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" + dotnet_root="${repo_root}.dotnet" export DOTNET_INSTALL_DIR="$dotnet_root" @@ -165,7 +163,7 @@ function InitializeDotNetCli { Write-PipelinePrependPath -path "$dotnet_root" Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0" - Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1" + Write-PipelineSetVariable -name "DOTNET_NOLOGO" -value "1" # return value _InitializeDotNetCli="$dotnet_root" @@ -310,7 +308,7 @@ function GetDotNetInstallScript { curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || { if command -v openssl &> /dev/null; then echo "Curl failed; dumping some information about dotnet.microsoft.com for later investigation" - echo | openssl s_client -showcerts -servername dotnet.microsoft.com -connect dotnet.microsoft.com:443 + echo | openssl s_client -showcerts -servername dotnet.microsoft.com -connect dotnet.microsoft.com:443 || true fi echo "Will now retry the same URL with verbose logging." with_retries curl "$install_script_url" -sSL --verbose --retry 10 --create-dirs -o "$install_script" || { @@ -343,20 +341,20 @@ function InitializeBuildTool { _InitializeBuildToolCommand="msbuild" # use override if it exists - commonly set by source-build if [[ "${_OverrideArcadeInitializeBuildToolFramework:-x}" == "x" ]]; then - _InitializeBuildToolFramework="net8.0" + _InitializeBuildToolFramework="net9.0" else _InitializeBuildToolFramework="${_OverrideArcadeInitializeBuildToolFramework}" fi } -# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116 +# Set RestoreNoHttpCache as a workaround for https://github.com/NuGet/Home/issues/3116 function GetNuGetPackageCachePath { if [[ -z ${NUGET_PACKAGES:-} ]]; then if [[ "$use_global_nuget_cache" == true ]]; then - export NUGET_PACKAGES="$HOME/.nuget/packages" + export NUGET_PACKAGES="$HOME/.nuget/packages/" else - export NUGET_PACKAGES="$repo_root/.packages" - export RESTORENOCACHE=true + export NUGET_PACKAGES="$repo_root/.packages/" + export RESTORENOHTTPCACHE=true fi fi @@ -440,7 +438,7 @@ function StopProcesses { } function MSBuild { - local args=$@ + local args=( "$@" ) if [[ "$pipelines_log" == true ]]; then InitializeBuildTool InitializeToolset @@ -458,12 +456,10 @@ function MSBuild { local possiblePaths=() possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.ArcadeLogging.dll" ) possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" ) - possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.ArcadeLogging.dll" ) - possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" ) - possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" ) - possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" ) possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.ArcadeLogging.dll" ) possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.Arcade.Sdk.dll" ) + possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.ArcadeLogging.dll" ) + possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.Arcade.Sdk.dll" ) for path in "${possiblePaths[@]}"; do if [[ -f $path ]]; then selectedPath=$path @@ -477,7 +473,7 @@ function MSBuild { args+=( "-logger:$selectedPath" ) fi - MSBuild-Core ${args[@]} + MSBuild-Core "${args[@]}" } function MSBuild-Core { @@ -510,7 +506,8 @@ function MSBuild-Core { echo "Build failed with exit code $exit_code. Check errors above." # When running on Azure Pipelines, override the returned exit code to avoid double logging. - if [[ "$ci" == "true" && -n ${SYSTEM_TEAMPROJECT:-} ]]; then + # Skip this when the build is a child of the VMR orchestrator build. + if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$product_build" != true && "$properties" != *"DotNetBuildRepo=true"* ]]; then Write-PipelineSetResult -result "Failed" -message "msbuild execution failed." # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error diff --git a/global.json b/global.json index edcf91e50c58..13c3e979dcfe 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "tools": { - "dotnet": "8.0.122", + "dotnet": "9.0.113", "runtimes": { "dotnet": [ - "$(VSRedistCommonNetCoreSharedFrameworkx6480PackageVersion)" + "$(VSRedistCommonNetCoreSharedFrameworkx6490PackageVersion)" ], "aspnetcore": [ "$(MicrosoftAspNetCoreComponentsSdkAnalyzersPackageVersion)" @@ -13,8 +13,13 @@ "version": "16.8" } }, + "native-tools": { + "cmake": "latest" + }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25611.2", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.25611.2" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.26104.5", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.26104.5", + "Microsoft.Build.NoTargets": "3.7.0", + "Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24217.1" } }