From f0c33c3a30b6059c913c5d2e422a34fe1bc0b0a2 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 24 Nov 2021 04:55:04 +0000 Subject: [PATCH 01/33] [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk - Coherency Updates: - Microsoft.Net.Compilers.Toolset: from 4.0.1-1.21569.2 to 4.0.1-1.21573.5 (parent: Microsoft.NET.Sdk) --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8a16964fe..a1f3b67e9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -103,14 +103,14 @@ https://github.com/dotnet/templating 7d941613047c847c87dc8d243a54fd1a45a47de7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 36621631f5982fb9d23644aec68222015ba337a2 + ea1efa85360eea3721aee35c120dcc49afd126be - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 36621631f5982fb9d23644aec68222015ba337a2 + ea1efa85360eea3721aee35c120dcc49afd126be @@ -141,9 +141,9 @@ linker - + https://github.com/dotnet/roslyn - 52021b4b3a9dcfd7b955102adb2901524a62a371 + 1fa6e45dd631b37e7b28a78907240aed8a300d50 diff --git a/eng/Versions.props b/eng/Versions.props index 7c7746fff..bda12b8cc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -56,8 +56,8 @@ - 6.0.101-servicing.21569.16 - 6.0.101-servicing.21569.16 + 6.0.101-servicing.21573.15 + 6.0.101-servicing.21573.15 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) From 14bc4c5db706488b4d70a150b35ba219a1e26bba Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Mon, 6 Dec 2021 15:47:24 +0000 Subject: [PATCH 02/33] [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a1f3b67e9..156a593fb 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -103,14 +103,14 @@ https://github.com/dotnet/templating 7d941613047c847c87dc8d243a54fd1a45a47de7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - ea1efa85360eea3721aee35c120dcc49afd126be + 9b8345e5f88fd844fca7911a91210a22d1a1e607 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - ea1efa85360eea3721aee35c120dcc49afd126be + 9b8345e5f88fd844fca7911a91210a22d1a1e607 diff --git a/eng/Versions.props b/eng/Versions.props index bda12b8cc..285631e2f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -56,8 +56,8 @@ - 6.0.101-servicing.21573.15 - 6.0.101-servicing.21573.15 + 6.0.101-servicing.21580.8 + 6.0.101-servicing.21580.8 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) From 769ba58be1521f1757238be15658815a85626f9f Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 7 Dec 2021 00:13:42 +0000 Subject: [PATCH 03/33] [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk --- NuGet.config | 6 ++++++ eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NuGet.config b/NuGet.config index a6823f5e3..00b4554de 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,6 +7,7 @@ + @@ -14,11 +15,13 @@ + + @@ -41,11 +44,14 @@ + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 156a593fb..b161d26fe 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -103,14 +103,14 @@ https://github.com/dotnet/templating 7d941613047c847c87dc8d243a54fd1a45a47de7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 9b8345e5f88fd844fca7911a91210a22d1a1e607 + c19a1f82e36033c571b80fb26ca6f92cc943ff1e - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 9b8345e5f88fd844fca7911a91210a22d1a1e607 + c19a1f82e36033c571b80fb26ca6f92cc943ff1e diff --git a/eng/Versions.props b/eng/Versions.props index 285631e2f..6c6eed84a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -56,8 +56,8 @@ - 6.0.101-servicing.21580.8 - 6.0.101-servicing.21580.8 + 6.0.101-servicing.21606.7 + 6.0.101-servicing.21606.7 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) From c8a4f55c85b139e285ff2c1d65ecd114b89086f4 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Sat, 11 Dec 2021 01:53:10 +0000 Subject: [PATCH 04/33] [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk --- NuGet.config | 6 ++++++ eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NuGet.config b/NuGet.config index 00b4554de..dbf54bd99 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,6 +7,7 @@ + @@ -15,12 +16,14 @@ + + @@ -45,13 +48,16 @@ + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6d94ae3c1..0316bd233 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -103,14 +103,14 @@ https://github.com/dotnet/templating 7d941613047c847c87dc8d243a54fd1a45a47de7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - c19a1f82e36033c571b80fb26ca6f92cc943ff1e + 5d42ff6f60a15edadf4bb9f5bdf13edf32c16969 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - c19a1f82e36033c571b80fb26ca6f92cc943ff1e + 5d42ff6f60a15edadf4bb9f5bdf13edf32c16969 diff --git a/eng/Versions.props b/eng/Versions.props index 2b904e4aa..d8dd303d3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -56,8 +56,8 @@ - 6.0.101-servicing.21606.7 - 6.0.101-servicing.21606.7 + 6.0.102-servicing.21610.17 + 6.0.102-servicing.21610.17 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) From e88edad0ea42ff06427faea5eb952b0501a9d918 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 14 Dec 2021 08:43:37 +0000 Subject: [PATCH 05/33] [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7fbbc838b..95f33b2c9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -103,14 +103,14 @@ https://github.com/dotnet/templating 7d941613047c847c87dc8d243a54fd1a45a47de7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 5d42ff6f60a15edadf4bb9f5bdf13edf32c16969 + 18bedcd2b19a6078d1567d032a43f4a6aadd7dfd - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 5d42ff6f60a15edadf4bb9f5bdf13edf32c16969 + 18bedcd2b19a6078d1567d032a43f4a6aadd7dfd diff --git a/eng/Versions.props b/eng/Versions.props index d8dd303d3..03e052e0b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -56,8 +56,8 @@ - 6.0.102-servicing.21610.17 - 6.0.102-servicing.21610.17 + 6.0.102-servicing.21613.11 + 6.0.102-servicing.21613.11 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) From a6432496b0a94e546e0abfe0201a76919e1c04b1 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 15 Dec 2021 02:42:14 +0000 Subject: [PATCH 06/33] [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 85855f19c..436d2b8d1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -103,14 +103,14 @@ https://github.com/dotnet/templating 7d941613047c847c87dc8d243a54fd1a45a47de7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 18bedcd2b19a6078d1567d032a43f4a6aadd7dfd + 8f77a9a5e9f5fe877519bee69cf415eea51f6b3a - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 18bedcd2b19a6078d1567d032a43f4a6aadd7dfd + 8f77a9a5e9f5fe877519bee69cf415eea51f6b3a diff --git a/eng/Versions.props b/eng/Versions.props index 74bb3bc24..e6289a4e4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -56,8 +56,8 @@ - 6.0.102-servicing.21613.11 - 6.0.102-servicing.21613.11 + 6.0.102-servicing.21614.19 + 6.0.102-servicing.21614.19 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) From 6f0f80e3aaa93d43345c4b28d1c18b7ac7897f08 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 13 Jan 2022 14:08:42 -0800 Subject: [PATCH 07/33] Update GenerateBundledVersions.targets --- src/redist/targets/GenerateBundledVersions.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redist/targets/GenerateBundledVersions.targets b/src/redist/targets/GenerateBundledVersions.targets index e7779dd08..6983a5667 100644 --- a/src/redist/targets/GenerateBundledVersions.targets +++ b/src/redist/targets/GenerateBundledVersions.targets @@ -26,7 +26,7 @@ 30 - $([MSBuild]::Add($(VersionFeature), 21)) + $([MSBuild]::Add($(VersionFeature), 20)) $([MSBuild]::Add($(VersionFeature), 12)) From d31aa165db78e748be9206eb9e51633d224b52de Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 20:37:03 +0000 Subject: [PATCH 08/33] Update dependencies from https://github.com/dotnet/test-templates build 20220114.3 (#13051) [release/6.0.1xx] Update dependencies from dotnet/test-templates --- eng/Version.Details.xml | 6 +++--- eng/Versions.props | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index be14086c8..450e0ba3c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -77,15 +77,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore 4e7d976438b0fc17f435804e801d5d68d193ec33 - + https://github.com/dotnet/test-templates c40ef7e056b48e011c43a21354d6790ba6b8b4fc - + https://github.com/dotnet/test-templates c40ef7e056b48e011c43a21354d6790ba6b8b4fc - + https://github.com/dotnet/test-templates c40ef7e056b48e011c43a21354d6790ba6b8b4fc diff --git a/eng/Versions.props b/eng/Versions.props index 29355872a..0ce9a38ef 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,8 +35,8 @@ - 1.0.2-beta4.21473.2 - 1.0.2-beta4.21473.2 + 1.0.2-beta4.22064.3 + 1.0.2-beta4.22064.3 @@ -143,7 +143,7 @@ 1.5.3 1.0.2-beta3 $(MicrosoftDotNetCommonItemTemplates21PackageVersion) - 1.0.2-beta4.21473.2 + 1.0.2-beta4.22064.3 2.1.30 From 5846bfe682705e83ed4b079661f0aef5b0ee87a0 Mon Sep 17 00:00:00 2001 From: MichaelSimons Date: Wed, 19 Jan 2022 00:42:46 +0000 Subject: [PATCH 09/33] Add additional clause in ConvertInternalRepos condition --- src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets index 9a49c3499..f6d6470a8 100644 --- a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets +++ b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets @@ -19,7 +19,7 @@ $(TarballRootDir)src/ $(TarballRootDir)git-info/ quiet - true + true Date: Wed, 19 Jan 2022 07:47:28 -0600 Subject: [PATCH 10/33] Add runtime and aspnetcore patches to always build libs, app.ref and targetting packs (#13009) * Add runtime patch to build all packages during source-build * Add aspnetcore patch to always build App.Ref and targeting packs --- ...uild-App.Ref-and-the-targeting-packs.patch | 32 +++++++++++++++++ ...ld-all-packages-when-in-source-build.patch | 34 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 src/SourceBuild/tarball/patches/aspnetcore/0005-Always-build-App.Ref-and-the-targeting-packs.patch create mode 100644 src/SourceBuild/tarball/patches/runtime/0004-release-6.0-Build-all-packages-when-in-source-build.patch diff --git a/src/SourceBuild/tarball/patches/aspnetcore/0005-Always-build-App.Ref-and-the-targeting-packs.patch b/src/SourceBuild/tarball/patches/aspnetcore/0005-Always-build-App.Ref-and-the-targeting-packs.patch new file mode 100644 index 000000000..9cda48cd7 --- /dev/null +++ b/src/SourceBuild/tarball/patches/aspnetcore/0005-Always-build-App.Ref-and-the-targeting-packs.patch @@ -0,0 +1,32 @@ +From c5211f8557f2fb019416cf1f6c01142965270479 Mon Sep 17 00:00:00 2001 +From: Doug Bunting <6431421+dougbu@users.noreply.github.com> +Date: Sun, 16 Jan 2022 22:55:10 -0800 +Subject: [PATCH] Always build App.Ref and the targeting packs - set + `$(IsTargetingPackBuilding)` to `true` unconditionally - leave all _use_ of + `$(IsTargetingPackBuilding)` + +See https://github.com/dotnet/aspnetcore/issues/39471 for details and backporting. +--- + Directory.Build.props | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/Directory.Build.props b/Directory.Build.props +index e100d883e9..d71b308905 100644 +--- a/Directory.Build.props ++++ b/Directory.Build.props +@@ -138,11 +138,7 @@ + Microsoft.AspNetCore.App.Ref + aspnetcore-runtime + aspnetcore-targeting-pack +- +- +- false +- true ++ true + + ++ true + + $(XmlDocFileRoot)1033\$(AssemblyName).xml + true +@@ -279,7 +283,7 @@ + + + + + From 401e3968d7df8071129b2c1e394560bffcf2d3bd Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 19 Jan 2022 15:06:19 +0000 Subject: [PATCH 11/33] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220119.1 (#13084) [release/6.0.1xx] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 450e0ba3c..64a44181b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -211,9 +211,9 @@ https://github.com/dotnet/arcade 7421b55f46aff8373764016d942b23cbf87c75cb - + https://github.com/dotnet/source-build-reference-packages - f5bc8bd3d3a2738be1095b2ca4f928504acb4801 + 220fc35f99158d68e72e55a667db44b93b293055 From ebc698ea6bda5c1e2644366c43c967497e9de51a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 19 Jan 2022 16:58:31 +0000 Subject: [PATCH 12/33] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220119.2 (#13086) [release/6.0.1xx] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 64a44181b..057e71f10 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -211,9 +211,9 @@ https://github.com/dotnet/arcade 7421b55f46aff8373764016d942b23cbf87c75cb - + https://github.com/dotnet/source-build-reference-packages - 220fc35f99158d68e72e55a667db44b93b293055 + 8867610fc0861940f204bcc87f792bd49bbe49d6 From 02d5242ed7ca7c3747fc89196cf67aeff260c6ac Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 19 Jan 2022 18:34:20 +0000 Subject: [PATCH 13/33] [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk - Resolve source-build patch conflicts - Remove source-build runtime patch that was backported - Merge branch 'internal/release/6.0.1xx' of https://dnceng.visualstudio.com/internal/_git/dotnet-installer into darc-internal/release/6.0.1xx-a0407bef-058b-488f-956f-b7929b351679 - Merge branch 'darc-internal/release/6.0.1xx-a0407bef-058b-488f-956f-b7929b351679' of https://dev.azure.com/dnceng/internal/_git/dotnet-installer into darc-internal/release/6.0.1xx-a0407bef-058b-488f-9 - Download bits from dotnetbuilds/internal - Merge branch 'darc-internal/release/6.0.1xx-a0407bef-058b-488f-956f-b7929b351679' of https://dev.azure.com/dnceng/internal/_git/dotnet-installer into darc-internal/release/6.0.1xx-a0407bef-058b-488f-9 - Merge remote-tracking branch 'dnceng/internal/release/6.0.1xx' into darc-internal/release/6.0.1xx-a0407bef-058b-488f-956f-b7929b351679 --- .vsts-ci.yml | 5 +- NuGet.config | 12 ++ eng/Version.Details.xml | 116 +++++++++--------- eng/Versions.props | 42 +++---- eng/common/templates/steps/source-build.yml | 4 +- .../job/source-build-create-tarball.yml | 4 +- ...uild-App.Ref-and-the-targeting-packs.patch | 4 +- ...ld-all-packages-when-in-source-build.patch | 34 ----- ...-Microsoft.NET.Build.Tasks-for-netfx.patch | 66 ---------- src/redist/targets/GenerateLayout.targets | 2 +- 10 files changed, 100 insertions(+), 189 deletions(-) delete mode 100644 src/SourceBuild/tarball/patches/runtime/0004-release-6.0-Build-all-packages-when-in-source-build.patch delete mode 100644 src/SourceBuild/tarball/patches/sdk/0001-Build-Microsoft.NET.Build.Tasks-for-netfx.patch diff --git a/.vsts-ci.yml b/.vsts-ci.yml index d91efec67..b20ffc1eb 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -35,11 +35,10 @@ variables: value: '' - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - group: DotNet-MSRC-Storage - group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs - value: /p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet - /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64) + value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) /p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64) stages: diff --git a/NuGet.config b/NuGet.config index 00da7febe..d896a1219 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,16 +7,20 @@ + + + + @@ -37,8 +41,16 @@ + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3a4f3744d..cb9bb6070 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,46 +1,46 @@ - - https://github.com/dotnet/windowsdesktop - 59fea7da1dbb6e48837fa726cc2760b154bce3d1 - - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - ef15b555537a90da229ce6474658ae1a9916a932 + 9fbd3ecd250dda95f93b0123ab017efb1e0e6033 - - https://github.com/dotnet/windowsdesktop - 59fea7da1dbb6e48837fa726cc2760b154bce3d1 - - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - ef15b555537a90da229ce6474658ae1a9916a932 + 9fbd3ecd250dda95f93b0123ab017efb1e0e6033 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop + 9fbd3ecd250dda95f93b0123ab017efb1e0e6033 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop + 9fbd3ecd250dda95f93b0123ab017efb1e0e6033 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 + + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 + + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 @@ -52,30 +52,30 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 3a25a7f1cc446b60678ed25c9d829420d6321eba - - https://github.com/dotnet/aspnetcore - ae1a6cbe225b99c0bf38b7e31bf60cb653b73a52 - - - https://github.com/dotnet/aspnetcore - ae1a6cbe225b99c0bf38b7e31bf60cb653b73a52 - - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4e7d976438b0fc17f435804e801d5d68d193ec33 + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace + + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace + + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4e7d976438b0fc17f435804e801d5d68d193ec33 + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4e7d976438b0fc17f435804e801d5d68d193ec33 + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4e7d976438b0fc17f435804e801d5d68d193ec33 + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace https://github.com/dotnet/test-templates @@ -90,36 +90,36 @@ c40ef7e056b48e011c43a21354d6790ba6b8b4fc - - https://github.com/dotnet/templating - 7d941613047c847c87dc8d243a54fd1a45a47de7 + + https://dev.azure.com/dnceng/internal/_git/dotnet-templating + 0a0300fa1ff7d5c8be96d11383e99b7b5b0e4fb8 - - https://github.com/dotnet/templating - 7d941613047c847c87dc8d243a54fd1a45a47de7 + + https://dev.azure.com/dnceng/internal/_git/dotnet-templating + 0a0300fa1ff7d5c8be96d11383e99b7b5b0e4fb8 https://github.com/dotnet/templating 7d941613047c847c87dc8d243a54fd1a45a47de7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 8f77a9a5e9f5fe877519bee69cf415eea51f6b3a + 4c0649a412b8865957af7610cc9f035484f4997a - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 8f77a9a5e9f5fe877519bee69cf415eea51f6b3a + 4c0649a412b8865957af7610cc9f035484f4997a - + https://dev.azure.com/dnceng/internal/_git/dotnet-winforms - 846205b4af05c7a200e1d203536fdc39994b9bd6 + 5ad241b9633924db40503de19cb502bb0aca7718 - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf - 0350d04790959e8ebdd3ceab0d34a40f811f019d + fb76229895cae74c1adc62c2411a0730a2f3759b https://github.com/dotnet/fsharp @@ -141,9 +141,9 @@ linker - + https://github.com/dotnet/roslyn - 1fa6e45dd631b37e7b28a78907240aed8a300d50 + 9942dc957472b9bf179b11742bc161ef6c79691e diff --git a/eng/Versions.props b/eng/Versions.props index 68885a2d3..477207593 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,15 +23,15 @@ - 6.0.1-servicing.21567.5 + 6.0.2-servicing.22064.7 - 6.0.1-servicing.21567.7 + 6.0.2-servicing.22064.8 - 6.0.100 + 6.0.102 @@ -44,20 +44,20 @@ - 6.0.1 - 6.0.0 - 6.0.0-rtm.21526.8 - 6.0.1-servicing.21567.14 - 6.0.1-servicing.21567.14 - 6.0.1-servicing.21567.14 + 6.0.2 + 6.0.2 + 6.0.2-servicing.22064.12 + 6.0.2-servicing.22064.12 + 6.0.2-servicing.22064.12 + 6.0.2-servicing.22064.12 0.2.0 - 6.0.102-servicing.21614.19 - 6.0.102-servicing.21614.19 + 6.0.102-servicing.22069.2 + 6.0.102-servicing.22069.2 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) @@ -68,20 +68,20 @@ - 6.0.1-servicing.21567.5 - 6.0.1-servicing.21567.5 - 6.0.1 - 6.0.1 - 6.0.1 - 6.0.1 + 6.0.2-servicing.22064.6 + 6.0.2-servicing.22064.6 + 6.0.2 + 6.0.2 + 6.0.2 + 6.0.2 2.1.0 - 6.0.1-servicing.21568.2 - 6.0.0-rtm.21523.1 - 6.0.1 - 6.0.0 + 6.0.2-servicing.22064.6 + 6.0.2-servicing.22064.6 + 6.0.2 + 6.0.2 diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml index ba40dc82f..abb1b2bcd 100644 --- a/eng/common/templates/steps/source-build.yml +++ b/eng/common/templates/steps/source-build.yml @@ -43,8 +43,8 @@ steps: # 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 [ '$(dotnetclimsrc-read-sas-token-base64)' != '$''(dotnetclimsrc-read-sas-token-base64)' ]; then - internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64) --runtimesourcefeed https://dotnetclimsrc.blob.core.windows.net/dotnet --runtimesourcefeedkey $(dotnetclimsrc-read-sas-token-base64)' + if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then + internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' fi buildConfig=Release diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml index 93e1f1d5e..8e55a40b5 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml @@ -42,8 +42,8 @@ jobs: # 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 [ '$(dotnetclimsrc-read-sas-token-base64)' != '$''(dotnetclimsrc-read-sas-token-base64)' ]; then - internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64) --runtimesourcefeed https://dotnetclimsrc.blob.core.windows.net/dotnet --runtimesourcefeedkey $(dotnetclimsrc-read-sas-token-base64)' + if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then + internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' fi ./build.sh \ diff --git a/src/SourceBuild/tarball/patches/aspnetcore/0005-Always-build-App.Ref-and-the-targeting-packs.patch b/src/SourceBuild/tarball/patches/aspnetcore/0005-Always-build-App.Ref-and-the-targeting-packs.patch index 9cda48cd7..ef507ed95 100644 --- a/src/SourceBuild/tarball/patches/aspnetcore/0005-Always-build-App.Ref-and-the-targeting-packs.patch +++ b/src/SourceBuild/tarball/patches/aspnetcore/0005-Always-build-App.Ref-and-the-targeting-packs.patch @@ -19,9 +19,9 @@ index e100d883e9..d71b308905 100644 aspnetcore-runtime aspnetcore-targeting-pack - -- +- - false +- Condition=" '$(IsTargetingPackBuilding)' == '' AND '$(AspNetCorePatchVersion)' != '2' ">false - true + true diff --git a/src/SourceBuild/tarball/patches/runtime/0004-release-6.0-Build-all-packages-when-in-source-build.patch b/src/SourceBuild/tarball/patches/runtime/0004-release-6.0-Build-all-packages-when-in-source-build.patch deleted file mode 100644 index 43c68dede..000000000 --- a/src/SourceBuild/tarball/patches/runtime/0004-release-6.0-Build-all-packages-when-in-source-build.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Santiago Fernandez Madero -Date: Tue, 11 Jan 2022 13:55:22 -0800 -Subject: [PATCH] [release/6.0] Build all packages when in source-build - -Originating PR: https://github.com/dotnet/runtime/pull/63653 ---- - eng/packaging.targets | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/eng/packaging.targets b/eng/packaging.targets -index 6bcf86dc9f2..ee8e95167d9 100644 ---- a/eng/packaging.targets -+++ b/eng/packaging.targets -@@ -34,6 +34,10 @@ - '$(IsRIDSpecificProject)' != 'true' and - '$(PreReleaseVersionLabel)' == 'servicing' and - '$(GitHubRepositoryName)' != 'runtimelab'">false -+ -+ true - - $(XmlDocFileRoot)1033\$(AssemblyName).xml - true -@@ -279,7 +283,7 @@ - - - - - diff --git a/src/SourceBuild/tarball/patches/sdk/0001-Build-Microsoft.NET.Build.Tasks-for-netfx.patch b/src/SourceBuild/tarball/patches/sdk/0001-Build-Microsoft.NET.Build.Tasks-for-netfx.patch deleted file mode 100644 index b128d21f3..000000000 --- a/src/SourceBuild/tarball/patches/sdk/0001-Build-Microsoft.NET.Build.Tasks-for-netfx.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 3540e85a194dda1e5448e0aab3212c8aeb5a1aff Mon Sep 17 00:00:00 2001 -From: Eric Erhardt -Date: Fri, 22 Oct 2021 20:48:25 +0000 -Subject: [PATCH] Build Microsoft.NET.Build.Tasks for netfx - -Required for omnisharp to work with a source-built .NET SDK. - -Patch removal issue: https://github.com/dotnet/sdk/issues/22281 ---- - .../Microsoft.DotNet.Compatibility.csproj | 1 - - .../Microsoft.DotNet.PackageValidation.csproj | 1 - - .../Microsoft.NET.Build.Extensions.Tasks.csproj | 1 - - .../Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj | 1 - - 4 files changed, 4 deletions(-) - -diff --git a/src/Compatibility/Microsoft.DotNet.Compatibility/Microsoft.DotNet.Compatibility.csproj b/src/Compatibility/Microsoft.DotNet.Compatibility/Microsoft.DotNet.Compatibility.csproj -index 92624be845..f9f8e46329 100644 ---- a/src/Compatibility/Microsoft.DotNet.Compatibility/Microsoft.DotNet.Compatibility.csproj -+++ b/src/Compatibility/Microsoft.DotNet.Compatibility/Microsoft.DotNet.Compatibility.csproj -@@ -2,7 +2,6 @@ - - - net6.0;net472 -- net6.0 - true - true - Open -diff --git a/src/Compatibility/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj b/src/Compatibility/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj -index 7a8b648652..4241f4577e 100644 ---- a/src/Compatibility/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj -+++ b/src/Compatibility/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj -@@ -2,7 +2,6 @@ - - - net6.0;net472 -- net6.0 - Open - - -diff --git a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj -index 13ada82225..280fbdc83e 100644 ---- a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj -+++ b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj -@@ -16,7 +16,6 @@ - Library - Microsoft.NET.Build.Tasks - $(SdkTargetFramework);net472 -- $(SdkTargetFramework) - - - -diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj -index 604ef43bf2..bce39c67d4 100644 ---- a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj -+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj -@@ -13,7 +13,6 @@ - The MSBuild targets and properties for building .NET Core projects. - Library - $(SdkTargetFramework);net472 -- $(SdkTargetFramework) - annotations - - --- -2.31.1 - diff --git a/src/redist/targets/GenerateLayout.targets b/src/redist/targets/GenerateLayout.targets index 3917efa60..f13a3ec5f 100644 --- a/src/redist/targets/GenerateLayout.targets +++ b/src/redist/targets/GenerateLayout.targets @@ -32,7 +32,7 @@ $(RedistLayoutPath)sdk\$(Version)\ true - https://dotnetclimsrc.blob.core.windows.net/dotnet/ + https://dotnetbuilds.blob.core.windows.net/internal/ https://dotnetcli.blob.core.windows.net/dotnet/ From 3e4f44cf235f99fd6f0581eae8eb8c7dcce262ea Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Thu, 20 Jan 2022 10:20:36 -0500 Subject: [PATCH 14/33] Include musl bits in source-build bootstrap tarball (#13076) --- .../scripts/bootstrap/buildBootstrapPreviouslySB.csproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj b/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj index 0a2fcff17..14c42e128 100644 --- a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj +++ b/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj @@ -23,6 +23,12 @@ + + + + From a3c5003a72539430a50d9a93f8077e319c6fcb41 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 15:48:43 +0000 Subject: [PATCH 15/33] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220120.1 (#13090) [release/6.0.1xx] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 057e71f10..b5eb09d4d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -211,9 +211,9 @@ https://github.com/dotnet/arcade 7421b55f46aff8373764016d942b23cbf87c75cb - + https://github.com/dotnet/source-build-reference-packages - 8867610fc0861940f204bcc87f792bd49bbe49d6 + b047d49b93597b29986623f3c7c67a65fbccf648 From 4a1e7f6238f5f265054a6aaf57e2759a88905c49 Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Thu, 20 Jan 2022 09:58:43 -0600 Subject: [PATCH 16/33] Update source-build toolset and artifacts to 6.0.1 (#12860) * Update source-build toolset and artifacts to 6.0.1 * Update PrivateSourceBuiltArtifactsPackageVersion --- eng/Versions.props | 2 +- src/SourceBuild/tarball/content/global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 0ce9a38ef..d44fa76ab 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -172,7 +172,7 @@ or minor release, prebuilts may be needed. When the release is mature, prebuilts are not necessary, and this property is removed from the file. --> - 0.1.0-6.0.100-bootstrap.29 + 6.0.1-1 diff --git a/src/SourceBuild/tarball/content/global.json b/src/SourceBuild/tarball/content/global.json index 0007b6c6e..ce1b32a1d 100644 --- a/src/SourceBuild/tarball/content/global.json +++ b/src/SourceBuild/tarball/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.100" + "dotnet": "6.0.101" }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.1", From b9540d30058058744938cc5b2d42a0fe341cca75 Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Thu, 20 Jan 2022 14:28:22 -0600 Subject: [PATCH 17/33] Remove unnecessary Arcade bootstrap patch (#13092) --- .../0008-Bootstrapping-workaround.patch | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/SourceBuild/tarball/patches/arcade/0008-Bootstrapping-workaround.patch diff --git a/src/SourceBuild/tarball/patches/arcade/0008-Bootstrapping-workaround.patch b/src/SourceBuild/tarball/patches/arcade/0008-Bootstrapping-workaround.patch deleted file mode 100644 index cfb166328..000000000 --- a/src/SourceBuild/tarball/patches/arcade/0008-Bootstrapping-workaround.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1d34d8396b9c2968163802036ed102e18ef14605 Mon Sep 17 00:00:00 2001 -From: Michael Simons -Date: Fri, 10 Sep 2021 13:57:38 +0000 -Subject: [PATCH] Bootstrapping workaround - -Temporary workaround until source-build is built with recent source-built. - /repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/src/Microsoft.DotNet.CodeAnalysis/Microsoft.DotNet.CodeAnalysis.csproj : error NU1603: Microsoft.CodeAnalysis.Common 4.0.0-5.21453.15 depends on System.Runtime.CompilerServices.Unsafe (>= 6.0.0-rc.1.21415.6) but System.Runtime.CompilerServices.Unsafe 6.0.0-rc.1.21415.6 was not found. An approximate best match of System.Runtime.CompilerServices.Unsafe 6.0.0-rc.2.21457.6 was resolved. [/repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/Arcade.sln] - /repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj : error NU1603: Microsoft.CodeAnalysis.Common 4.0.0-5.21453.15 depends on System.Runtime.CompilerServices.Unsafe (>= 6.0.0-rc.1.21415.6) but System.Runtime.CompilerServices.Unsafe 6.0.0-rc.1.21415.6 was not found. An approximate best match of System.Runtime.CompilerServices.Unsafe 6.0.0-rc.2.21457.6 was resolved. [/repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/Arcade.sln] - /repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj : error NU1603: Microsoft.CodeAnalysis.Common 4.0.0-5.21453.15 depends on System.Runtime.CompilerServices.Unsafe (>= 6.0.0-rc.1.21415.6) but System.Runtime.CompilerServices.Unsafe 6.0.0-rc.1.21415.6 was not found. An approximate best match of System.Runtime.CompilerServices.Unsafe 6.0.0-rc.2.21457.6 was resolved. [/repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/Arcade.sln] - ---- - Directory.Build.props | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/Directory.Build.props b/Directory.Build.props -index 37feef5..c5aee85 100644 ---- a/Directory.Build.props -+++ b/Directory.Build.props -@@ -18,6 +18,10 @@ - false - - -+ -+ $(NoWarn);NU1603 -+ -+ - - - $(SmokeTestCommand) --excludeWebHttpsTests + + %(SdkTarballItem.Identity) - + DOTNET_TARBALL_PATH=$(SdkTarballPath); + TARGET_RID=$(TargetRid); + " /> diff --git a/src/SourceBuild/tarball/content/test/Directory.Build.props b/src/SourceBuild/tarball/content/test/Directory.Build.props new file mode 100644 index 000000000..5bec34ce2 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Directory.Build.props @@ -0,0 +1,7 @@ + + + + + diff --git a/src/SourceBuild/tarball/content/test/Directory.Build.targets b/src/SourceBuild/tarball/content/test/Directory.Build.targets new file mode 100644 index 000000000..5bec34ce2 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Directory.Build.targets @@ -0,0 +1,7 @@ + + + + + diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs new file mode 100644 index 000000000..73c2951f7 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Xunit; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests +{ + internal class BaselineHelper + { + public static void Compare(string baselineFileName, IOrderedEnumerable actualEntries) + { + IEnumerable baseline = File.ReadAllLines(GetBaselineFilePath(baselineFileName)); + string[] missingEntries = actualEntries.Except(baseline).ToArray(); + string[] extraEntries = baseline.Except(actualEntries).ToArray(); + + string? message = null; + if (missingEntries.Length > 0) + { + message = $"Missing entries in '{baselineFileName}' baseline: {Environment.NewLine}{string.Join(Environment.NewLine, missingEntries)}{Environment.NewLine}{Environment.NewLine}"; + } + + if (extraEntries.Length > 0) + { + message += $"Extra entries in '{baselineFileName}' baseline: {Environment.NewLine}{string.Join(Environment.NewLine, extraEntries)}{Environment.NewLine}{Environment.NewLine}"; + } + + Assert.Null(message); + } + + private static string GetBaselineFilePath(string baselineFileName) => Path.Combine(Directory.GetCurrentDirectory(), "baselines", baselineFileName); + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs new file mode 100644 index 000000000..3dfc38f69 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +internal static class Config +{ + public static string DotNetDirectory { get; } = Environment.GetEnvironmentVariable("DOTNET_DIR") ?? "./.dotnet"; + public static string DotNetTarballPath { get; } = Environment.GetEnvironmentVariable(DotNetTarballPathEnv) ?? string.Empty; + public const string DotNetTarballPathEnv = "DOTNET_TARBALL_PATH"; + public static string TargetRid { get; } = Environment.GetEnvironmentVariable("TARGET_RID") ?? string.Empty; +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs new file mode 100644 index 000000000..5a6716030 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs @@ -0,0 +1,41 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Diagnostics; +using System.IO; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +internal class DotNetHelper +{ + public string DotNetPath { get; } + public string DotNetInstallDirectory { get; } + + public DotNetHelper(ITestOutputHelper outputHelper) + { + if (!Directory.Exists(Config.DotNetDirectory)) + { + if (!File.Exists(Config.DotNetTarballPath)) + { + throw new InvalidOperationException($"Tarball path '{Config.DotNetTarballPath}' specified in {Config.DotNetTarballPathEnv} does not exist."); + } + + Directory.CreateDirectory(Config.DotNetDirectory); + ExecuteHelper.ExecuteProcess("tar", $"xzf {Config.DotNetTarballPath} -C {Config.DotNetDirectory}", outputHelper); + } + + DotNetInstallDirectory = Path.Combine(Directory.GetCurrentDirectory(), Config.DotNetDirectory); + DotNetPath = Path.Combine(DotNetInstallDirectory, "dotnet"); + } + + public void ExecuteDotNetCmd(string args, ITestOutputHelper outputHelper) + { + (Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess(DotNetPath, args, outputHelper); + + Assert.Equal(0, executeResult.Process.ExitCode); + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs new file mode 100644 index 000000000..35c6dc7a7 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs @@ -0,0 +1,55 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using System.Text; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +internal static class ExecuteHelper +{ + public static (Process Process, string StdOut, string StdErr) ExecuteProcess( + string fileName, string args, ITestOutputHelper outputHelper) + { + outputHelper.WriteLine($"Executing: {fileName} {args}"); + + Process process = new() + { + EnableRaisingEvents = true, + StartInfo = + { + FileName = fileName, + Arguments = args, + RedirectStandardOutput = true, + RedirectStandardError = true, + } + }; + + StringBuilder stdOutput = new(); + process.OutputDataReceived += new DataReceivedEventHandler((sender, e) => stdOutput.AppendLine(e.Data)); + + StringBuilder stdError = new(); + process.ErrorDataReceived += new DataReceivedEventHandler((sender, e) => stdError.AppendLine(e.Data)); + + process.Start(); + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + process.WaitForExit(); + + string output = stdOutput.ToString().Trim(); + if (outputHelper != null && !string.IsNullOrWhiteSpace(output)) + { + outputHelper.WriteLine(output); + } + + string error = stdError.ToString().Trim(); + if (outputHelper != null && !string.IsNullOrWhiteSpace(error)) + { + outputHelper.WriteLine(error); + } + + return (process, output, error); + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj new file mode 100644 index 000000000..54d87df9d --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj @@ -0,0 +1,28 @@ + + + + net6.0 + enable + + false + true + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + PreserveNewest + + + PreserveNewest + + + diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs new file mode 100644 index 000000000..869e97276 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using System.IO; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +// This test suite invokes the smoke-test.sh which should be considered legacy. Those tests should be migrated to this test suite overtime. +public class SmokeTests +{ + private ITestOutputHelper OutputHelper { get; } + private DotNetHelper DotNetHelper { get; } + + public SmokeTests(ITestOutputHelper outputHelper) + { + OutputHelper = outputHelper; + DotNetHelper = new DotNetHelper(outputHelper); + } + + [Fact] + public void SmokeTestsScript() + { + string smokeTestArgs = $"--dotnetDir {Directory.GetParent(DotNetHelper.DotNetPath)} --minimal --projectOutput --archiveRestoredPackages --targetRid {Config.TargetRid}"; + if (Config.TargetRid.Contains("osx")) + { + smokeTestArgs += " --excludeWebHttpsTests"; + } + + (Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess("./smoke-tests/smoke-test.sh", smokeTestArgs, OutputHelper); + + Assert.Equal(0, executeResult.Process.ExitCode); + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/XmlDocTests.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/XmlDocTests.cs new file mode 100644 index 000000000..dd4cadf70 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/XmlDocTests.cs @@ -0,0 +1,54 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.IO; +using Xunit; +using Xunit.Abstractions; +using System; +using System.Linq; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +public class XmlDocTests +{ + private ITestOutputHelper OutputHelper { get; } + private DotNetHelper DotNetHelper { get; } + + public XmlDocTests(ITestOutputHelper outputHelper) + { + OutputHelper = outputHelper; + DotNetHelper = new DotNetHelper(outputHelper); + } + + /// + /// Verifies every targeting pack assembly has a xml doc file. + /// There are exceptions which are specified in baselines/XmlDocIgnore.*.txt. + /// + [Fact] + public void VerifyTargetingPacksHaveDoc() + { + List missingXmlDoc = new(); + + string targetingPacksDirectory = Path.Combine(DotNetHelper.DotNetInstallDirectory, "packs"); + foreach (string targetingPackAssembly in Directory.EnumerateFiles(targetingPacksDirectory, "*.dll", SearchOption.AllDirectories)) + { + if (targetingPackAssembly.EndsWith("resources.dll")) + { + continue; + } + + string xmlFile = Path.ChangeExtension(targetingPackAssembly, ".xml"); + if (!File.Exists(xmlFile)) + { + string pathWithoutPacksPrefix = xmlFile.Substring(targetingPacksDirectory.Length + 1); + String[] pathParts = pathWithoutPacksPrefix.Split(Path.DirectorySeparatorChar); + string pathWithoutVersion = string.Join(Path.DirectorySeparatorChar, pathParts.Take(1).Concat(pathParts.Skip(2))); + missingXmlDoc.Add(pathWithoutVersion); + } + } + + BaselineHelper.Compare("MissingXmlDoc.txt", missingXmlDoc.OrderBy(entry => entry)); + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/baselines/MissingXmlDoc.txt b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/baselines/MissingXmlDoc.txt new file mode 100644 index 000000000..8db91d9d7 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/baselines/MissingXmlDoc.txt @@ -0,0 +1,175 @@ +Microsoft.AspNetCore.App.Ref/analyzers/dotnet/cs/Microsoft.AspNetCore.App.Analyzers.xml +Microsoft.AspNetCore.App.Ref/analyzers/dotnet/cs/Microsoft.AspNetCore.App.CodeFixes.xml +Microsoft.AspNetCore.App.Ref/analyzers/dotnet/roslyn4.0/cs/Microsoft.Extensions.Logging.Generators.xml +Microsoft.NETCore.App.Ref/analyzers/dotnet/cs/System.Text.Json.SourceGeneration.xml +Microsoft.NETCore.App.Ref/ref/net6.0/Microsoft.VisualBasic.xml +Microsoft.NETCore.App.Ref/ref/net6.0/mscorlib.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.AppContext.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Buffers.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.ComponentModel.DataAnnotations.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Configuration.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Core.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Data.DataSetExtensions.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Data.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Diagnostics.Debug.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Diagnostics.Tools.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Drawing.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Dynamic.Runtime.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Globalization.Calendars.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Globalization.Extensions.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Globalization.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.Compression.Brotli.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.Compression.FileSystem.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.FileSystem.Primitives.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.FileSystem.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.UnmanagedMemoryStream.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Net.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Numerics.Vectors.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Numerics.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Reflection.Extensions.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Reflection.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Resources.Reader.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Resources.ResourceManager.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Runtime.Extensions.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Runtime.Handles.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Runtime.Serialization.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Security.Principal.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Security.SecureString.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Security.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.ServiceModel.Web.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.ServiceProcess.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Text.Encoding.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Threading.Tasks.Extensions.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Threading.Tasks.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Threading.Timer.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Transactions.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.ValueTuple.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Web.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Windows.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Xml.Linq.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Xml.Serialization.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Xml.xml +Microsoft.NETCore.App.Ref/ref/net6.0/System.Xml.XmlDocument.xml +Microsoft.NETCore.App.Ref/ref/net6.0/WindowsBase.xml +NETStandard.Library.Ref/ref/netstandard2.1/Microsoft.Win32.Primitives.xml +NETStandard.Library.Ref/ref/netstandard2.1/mscorlib.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.AppContext.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Buffers.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Collections.Concurrent.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Collections.NonGeneric.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Collections.Specialized.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Collections.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.Composition.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.EventBasedAsync.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.Primitives.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.TypeConverter.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Console.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Core.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Data.Common.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Data.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Contracts.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Debug.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.FileVersionInfo.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Process.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.StackTrace.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.TextWriterTraceListener.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Tools.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.TraceSource.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Tracing.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Drawing.Primitives.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Drawing.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Dynamic.Runtime.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Globalization.Calendars.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Globalization.Extensions.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Globalization.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.Compression.FileSystem.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.Compression.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.Compression.ZipFile.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.FileSystem.DriveInfo.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.FileSystem.Primitives.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.FileSystem.Watcher.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.FileSystem.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.IsolatedStorage.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.MemoryMappedFiles.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.Pipes.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.UnmanagedMemoryStream.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.IO.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Linq.Expressions.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Linq.Parallel.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Linq.Queryable.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Linq.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Memory.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Http.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.NameResolution.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.NetworkInformation.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Ping.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Primitives.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Requests.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Security.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Sockets.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.WebHeaderCollection.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.WebSockets.Client.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.WebSockets.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Net.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Numerics.Vectors.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Numerics.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.ObjectModel.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.DispatchProxy.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Emit.ILGeneration.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Emit.Lightweight.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Emit.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Extensions.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Primitives.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Resources.Reader.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Resources.ResourceManager.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Resources.Writer.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.CompilerServices.VisualC.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Extensions.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Handles.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.InteropServices.RuntimeInformation.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.InteropServices.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Numerics.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.Formatters.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.Json.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.Primitives.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.Xml.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Claims.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.Algorithms.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.Csp.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.Encoding.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.Primitives.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.X509Certificates.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Principal.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Security.SecureString.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.ServiceModel.Web.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Text.Encoding.Extensions.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Text.Encoding.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Text.RegularExpressions.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Overlapped.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Tasks.Extensions.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Tasks.Parallel.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Tasks.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Thread.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.ThreadPool.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Timer.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Transactions.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.ValueTuple.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Web.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Windows.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.Linq.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.ReaderWriter.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.Serialization.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XDocument.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XmlDocument.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XmlSerializer.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XPath.XDocument.xml +NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XPath.xml diff --git a/src/SourceBuild/tarball/content/smoke-test.sh b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-test.sh similarity index 66% rename from src/SourceBuild/tarball/content/smoke-test.sh rename to src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-test.sh index a1c43673d..ccd15fd27 100755 --- a/src/SourceBuild/tarball/content/smoke-test.sh +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-test.sh @@ -7,7 +7,8 @@ VERSION_PREFIX=6.0 # See https://github.com/dotnet/source-build/issues/579, this version # needs to be compatible with the runtime produced from source-build DEV_CERTS_VERSION_DEFAULT=6.0.0-preview.6.21355.2 -__ROOT_REPO=$(sed 's/\r$//' "$SCRIPT_ROOT/artifacts/obj/rootrepo.txt") # remove CR if mounted repo on Windows drive +ARTIFACTS_DIR="$SCRIPT_ROOT/../../../../../../artifacts/" +__ROOT_REPO=$(sed 's/\r$//' "${ARTIFACTS_DIR}obj/rootrepo.txt") # remove CR if mounted repo on Windows drive executingUserHome=${HOME:-} export DOTNET_CLI_TELEMETRY_OPTOUT=1 @@ -362,247 +363,6 @@ function runWebTests() { doCommand F# webapi "$@" new restore build run multi-rid-publish } -function runXmlDocTests() { - targetingPacksDir="$dotnetDir/packs/" - echo "Looking for xml docs in targeting packs in $targetingPacksDir" - - netstandardIgnoreList=( - Microsoft.Win32.Primitives.xml - mscorlib.xml - System.AppContext.xml - System.Buffers.xml - System.Collections.Concurrent.xml - System.Collections.NonGeneric.xml - System.Collections.Specialized.xml - System.Collections.xml - System.ComponentModel.Composition.xml - System.ComponentModel.EventBasedAsync.xml - System.ComponentModel.Primitives.xml - System.ComponentModel.TypeConverter.xml - System.ComponentModel.xml - System.Console.xml - System.Core.xml - System.Data.Common.xml - System.Data.xml - System.Diagnostics.Contracts.xml - System.Diagnostics.Debug.xml - System.Diagnostics.FileVersionInfo.xml - System.Diagnostics.Process.xml - System.Diagnostics.StackTrace.xml - System.Diagnostics.TextWriterTraceListener.xml - System.Diagnostics.Tools.xml - System.Diagnostics.TraceSource.xml - System.Diagnostics.Tracing.xml - System.Drawing.Primitives.xml - System.Drawing.xml - System.Dynamic.Runtime.xml - System.Globalization.Calendars.xml - System.Globalization.Extensions.xml - System.Globalization.xml - System.IO.Compression.FileSystem.xml - System.IO.Compression.xml - System.IO.Compression.ZipFile.xml - System.IO.FileSystem.DriveInfo.xml - System.IO.FileSystem.Primitives.xml - System.IO.FileSystem.Watcher.xml - System.IO.FileSystem.xml - System.IO.IsolatedStorage.xml - System.IO.MemoryMappedFiles.xml - System.IO.Pipes.xml - System.IO.UnmanagedMemoryStream.xml - System.IO.xml - System.Linq.Expressions.xml - System.Linq.Parallel.xml - System.Linq.Queryable.xml - System.Linq.xml - System.Memory.xml - System.Net.Http.xml - System.Net.NameResolution.xml - System.Net.NetworkInformation.xml - System.Net.Ping.xml - System.Net.Primitives.xml - System.Net.Requests.xml - System.Net.Security.xml - System.Net.Sockets.xml - System.Net.WebHeaderCollection.xml - System.Net.WebSockets.Client.xml - System.Net.WebSockets.xml - System.Net.xml - System.Numerics.Vectors.xml - System.Numerics.xml - System.ObjectModel.xml - System.Reflection.DispatchProxy.xml - System.Reflection.Emit.ILGeneration.xml - System.Reflection.Emit.Lightweight.xml - System.Reflection.Emit.xml - System.Reflection.Extensions.xml - System.Reflection.Primitives.xml - System.Reflection.xml - System.Resources.Reader.xml - System.Resources.ResourceManager.xml - System.Resources.Writer.xml - System.Runtime.CompilerServices.VisualC.xml - System.Runtime.Extensions.xml - System.Runtime.Handles.xml - System.Runtime.InteropServices.RuntimeInformation.xml - System.Runtime.InteropServices.xml - System.Runtime.Numerics.xml - System.Runtime.Serialization.Formatters.xml - System.Runtime.Serialization.Json.xml - System.Runtime.Serialization.Primitives.xml - System.Runtime.Serialization.xml - System.Runtime.Serialization.Xml.xml - System.Runtime.xml - System.Security.Claims.xml - System.Security.Cryptography.Algorithms.xml - System.Security.Cryptography.Csp.xml - System.Security.Cryptography.Encoding.xml - System.Security.Cryptography.Primitives.xml - System.Security.Cryptography.X509Certificates.xml - System.Security.Principal.xml - System.Security.SecureString.xml - System.ServiceModel.Web.xml - System.Text.Encoding.Extensions.xml - System.Text.Encoding.xml - System.Text.RegularExpressions.xml - System.Threading.Overlapped.xml - System.Threading.Tasks.Extensions.xml - System.Threading.Tasks.Parallel.xml - System.Threading.Tasks.xml - System.Threading.ThreadPool.xml - System.Threading.Thread.xml - System.Threading.Timer.xml - System.Threading.xml - System.Transactions.xml - System.ValueTuple.xml - System.Web.xml - System.Windows.xml - System.xml - System.Xml.Linq.xml - System.Xml.ReaderWriter.xml - System.Xml.Serialization.xml - System.Xml.XDocument.xml - System.Xml.xml - System.Xml.XmlDocument.xml - System.Xml.XmlSerializer.xml - System.Xml.XPath.XDocument.xml - System.Xml.XPath.xml - ) - - netcoreappIgnoreList=( - mscorlib.xml - Microsoft.VisualBasic.xml - System.AppContext.xml - System.Buffers.xml - System.ComponentModel.DataAnnotations.xml - System.Configuration.xml - System.Core.xml - System.Data.DataSetExtensions.xml - System.Data.xml - System.Diagnostics.Debug.xml - System.Diagnostics.Tools.xml - System.Drawing.xml - System.Dynamic.Runtime.xml - System.Globalization.Calendars.xml - System.Globalization.Extensions.xml - System.Globalization.xml - System.IO.Compression.Brotli.xml - System.IO.Compression.FileSystem.xml - System.IO.FileSystem.xml - System.IO.FileSystem.Primitives.xml - System.IO.UnmanagedMemoryStream.xml - System.IO.xml - System.Net.xml - System.Numerics.xml - System.Numerics.Vectors.xml - System.Reflection.Extensions.xml - System.Reflection.xml - System.Resources.Reader.xml - System.Resources.ResourceManager.xml - System.Runtime.Extensions.xml - System.Runtime.Handles.xml - System.Runtime.Serialization.xml - System.Security.Principal.xml - System.Security.SecureString.xml - System.Security.xml - System.ServiceModel.Web.xml - System.ServiceProcess.xml - System.Text.Encoding.xml - System.Text.Json.SourceGeneration.resources.xml - System.Text.Json.SourceGeneration.xml - System.Threading.Tasks.Extensions.xml - System.Threading.Tasks.xml - System.Threading.Timer.xml - System.Transactions.xml - System.ValueTuple.xml - System.Web.xml - System.Windows.xml - System.xml - System.Xml.Linq.xml - System.Xml.Serialization.xml - System.Xml.xml - System.Xml.XmlDocument.xml - WindowsBase.xml - ) - - aspnetcoreappIgnoreList=( - Microsoft.AspNetCore.App.Analyzers.xml - Microsoft.AspNetCore.App.CodeFixes.xml - Microsoft.Extensions.Logging.Generators.resources.xml - Microsoft.Extensions.Logging.Generators.xml - ) - - error=0 - while IFS= read -r -d '' dllFile; do - xmlDocFile=${dllFile%.*}.xml - skip=0 - if [[ "$xmlDocFile" == *"/packs/Microsoft.NETCore.App.Ref"* ]]; then - xmlFileBasename=$(basename "$xmlDocFile") - for ignoreItem in "${netcoreappIgnoreList[@]}"; do - if [[ "$ignoreItem" == "$xmlFileBasename" ]]; then - skip=1; - break - fi - done - fi - if [[ "$xmlDocFile" == *"/packs/NETStandard.Library.Ref"* ]]; then - xmlFileBasename=$(basename "$xmlDocFile") - for ignoreItem in "${netstandardIgnoreList[@]}"; do - if [[ "$ignoreItem" == "$xmlFileBasename" ]]; then - skip=1; - break - fi - done - fi - if [[ "$xmlDocFile" == *"/packs/Microsoft.AspNetCore.App.Ref"* ]]; then - xmlFileBasename=$(basename "$xmlDocFile") - for ignoreItem in "${aspnetcoreappIgnoreList[@]}"; do - if [[ "$ignoreItem" == "$xmlFileBasename" ]]; then - skip=1; - break - fi - done - fi - if [[ $skip == 0 ]] && [[ ! -f "$xmlDocFile" ]]; then - error=1 - echo "error: missing $xmlDocFile" - fi - - if [[ $skip == 1 ]] && [[ -f "$xmlDocFile" ]]; then - error=1 - echo "error: Ignored xml doc was found: $xmlDocFile" - fi - - done < <(find "$targetingPacksDir" -name '*.dll' -print0) - - if [[ $error != 0 ]]; then - echo "error: Missing or unexpected xml documents" - exit 1 - else - echo "All expected xml docs are present" - fi -} - function runOmniSharpTests() { dotnetCmd=${dotnetDir}/dotnet @@ -701,11 +461,7 @@ fi # Clean up and create directory if [ -e "$testingDir" ]; then - read -p "testing-smoke directory exists, remove it? [Y]es / [n]o" -n 1 -r - echo - if [[ $REPLY == "" || $REPLY == " " || $REPLY =~ ^[Yy]$ ]]; then - rm -rf "$testingDir" - fi + rm -rf "$testingDir" fi mkdir -p "$testingDir" @@ -717,7 +473,7 @@ echo "" | tee Directory.Build.props > Directory.Build.targets # Unzip dotnet if the dotnetDir is not specified if [ "$dotnetDir" == "" ]; then - OUTPUT_DIR="$SCRIPT_ROOT/artifacts/$buildArch/$configuration/" + OUTPUT_DIR="$ARTIFACTS_DIR$buildArch/$configuration/" DOTNET_TARBALL="$(ls "${OUTPUT_DIR}${TARBALL_PREFIX}${VERSION_PREFIX}"*)" mkdir -p "$cliDir" @@ -734,7 +490,7 @@ echo SDK under test is: # setup restore path export NUGET_PACKAGES="$restoredPackagesDir" -SOURCE_BUILT_PKGS_PATH="$SCRIPT_ROOT/artifacts/obj/$buildArch/$configuration/blob-feed/packages/" +SOURCE_BUILT_PKGS_PATH="${ARTIFACTS_DIR}obj/$buildArch/$configuration/blob-feed/packages/" export DOTNET_ROOT="$dotnetDir" export PATH="$dotnetDir:$PATH" @@ -775,8 +531,6 @@ if [ "$excludeOnlineTests" == "false" ]; then echo "ONLINE RESTORE SOURCE - ALL TESTS PASSED!" fi -runXmlDocTests - if [ "$excludeOmniSharpTests" == "false" ]; then runOmniSharpTests fi diff --git a/src/SourceBuild/tarball/content/smoke-testNuGet.Config b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-testNuGet.Config similarity index 100% rename from src/SourceBuild/tarball/content/smoke-testNuGet.Config rename to src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-testNuGet.Config From f9e9963fbc50303d1c1171d8c619a100f05132b5 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 21 Jan 2022 09:46:24 -0800 Subject: [PATCH 19/33] Update .vsts-ci.yml --- .vsts-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index d91efec67..652748bb7 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -46,6 +46,13 @@ stages: - stage: build jobs: - job: Publish_Build_Configuration + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: NetCore1ESPool-Svc-Public + demands: ImageOverride -equals build.windows.10.amd64.vs2019.open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals build.windows.10.amd64.vs2019 steps: - publish: $(Build.SourcesDirectory)\eng\BuildConfiguration artifact: BuildConfiguration From 3454f6cd994b470d8e8092a59b3dc6d72b305e34 Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Mon, 24 Jan 2022 21:49:05 -0600 Subject: [PATCH 20/33] Source-build tweaks to aid release process (#13101) * Source-build tweaks to aid release process * Edit per code review --- .../common/templates/steps/source-build-build-tarball.yml | 2 ++ .../Arcade/tools/SourceBuildArcadeTarball.targets | 4 ++-- src/SourceBuild/tarball/content/build.proj | 3 +-- src/SourceBuild/tarball/content/eng/Versions.props | 5 ----- .../tarball/content/repos/package-source-build.proj | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml index 981fe31e3..7556b961d 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml @@ -108,3 +108,5 @@ steps: - publish: '${{ parameters.tarballDir }}/artifacts/${{ parameters.buildArch}}/Release/' artifact: $(Agent.JobName)_Artifacts displayName: Publish Artifacts + condition: succeededOrFailed() + continueOnError: true diff --git a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets index f6d6470a8..76297fd3b 100644 --- a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets +++ b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets @@ -87,8 +87,8 @@ $(GitHubRepositoryName) - 1.0.0 - 1.0.0 + $(VersionPrefix) + $(VersionPrefix) @(RootRepoCommitSha) @(RootRepoUri) @(RootRepoCommitCount) diff --git a/src/SourceBuild/tarball/content/build.proj b/src/SourceBuild/tarball/content/build.proj index 1b5adfdc5..b8bd6061e 100644 --- a/src/SourceBuild/tarball/content/build.proj +++ b/src/SourceBuild/tarball/content/build.proj @@ -149,8 +149,7 @@ - $(PrivateSourceBuiltPrebuiltsPackageVersionPrefix)$([MSBuild]::Add($(PrivateSourceBuiltPrebuiltsPackageVersionSuffix), 1)) - $(OutputPath)$(SourceBuiltPrebuiltsTarballName).$(TarballFileVersion).tar.gz + $(OutputPath)$(SourceBuiltPrebuiltsTarballName).$(installerOutputPackageVersion).tar.gz $(ResultingPrebuiltPackagesDir) diff --git a/src/SourceBuild/tarball/content/eng/Versions.props b/src/SourceBuild/tarball/content/eng/Versions.props index 1925782b6..df7b892f6 100644 --- a/src/SourceBuild/tarball/content/eng/Versions.props +++ b/src/SourceBuild/tarball/content/eng/Versions.props @@ -9,9 +9,4 @@ 2.2.0 - - - 0.1.0-6.0.100- - 36 - diff --git a/src/SourceBuild/tarball/content/repos/package-source-build.proj b/src/SourceBuild/tarball/content/repos/package-source-build.proj index 96c21c3b7..0101374dc 100644 --- a/src/SourceBuild/tarball/content/repos/package-source-build.proj +++ b/src/SourceBuild/tarball/content/repos/package-source-build.proj @@ -47,7 +47,7 @@ Directories="$(SourceBuildReferencePackagesDestination)extractArtifacts/" /> - $(OutputPath)$(SourceBuiltArtifactsTarballName).$(VersionPrefix)-$(VersionSuffix).tar.gz + $(OutputPath)$(SourceBuiltArtifactsTarballName).$(installerOutputPackageVersion).tar.gz From 15e9018f2a6616da54d739ba8fbd8c75f7905be3 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Thu, 27 Jan 2022 15:03:37 -0600 Subject: [PATCH 21/33] Updates to produce Microsoft.DotNet.Common.ProjectTemplates.2.1/6.0 in source-build (#13122) * Updates to produce Microsoft.DotNet.Common.ProjectTemplates.2.1/6.0 in source-build Co-authored-by: MichaelSimons --- eng/Version.Details.xml | 4 ++-- src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b5eb09d4d..fc9df1f02 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -211,9 +211,9 @@ https://github.com/dotnet/arcade 7421b55f46aff8373764016d942b23cbf87c75cb - + https://github.com/dotnet/source-build-reference-packages - b047d49b93597b29986623f3c7c67a65fbccf648 + 71a327c277a022d15af3d103c0796620ecd40471 diff --git a/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj b/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj index 89142c504..a726d50b2 100644 --- a/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj +++ b/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj @@ -28,6 +28,7 @@ + From ee9a55c9b59a7b48b628f37af25e47a64b20353c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 21:42:11 +0000 Subject: [PATCH 22/33] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220127.1 (#13130) [release/6.0.1xx] Update dependencies from dotnet/source-build-reference-packages From fec85b404c937d07c731f115db0c6086eba0a082 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 27 Jan 2022 14:25:01 -0800 Subject: [PATCH 23/33] Update .vsts-ci.yml --- .vsts-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 652748bb7..f4cd67b9f 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -391,7 +391,12 @@ stages: - Source_Build_Create_Tarball publishUsingPipelines: true pool: - vmImage: vs2017-win2016 + ${{ if eq(variables['System.TeamProject'], 'public') }}: + vmImage: windows-2017 + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals Build.Windows.10.Amd64.VS2017 + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - template: eng\common\templates\post-build\post-build.yml From a94ba2175c7f68eaaefe8fdc006d38311e30894a Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 27 Jan 2022 14:28:30 -0800 Subject: [PATCH 24/33] Update .vsts-ci.yml --- .vsts-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index f4cd67b9f..1d18d9dd0 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -392,7 +392,7 @@ stages: publishUsingPipelines: true pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - vmImage: windows-2017 + vmImage: vs2017-win2016 ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals Build.Windows.10.Amd64.VS2017 From 08df362ca677f73fe169b91b8a18769cae68f959 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 28 Jan 2022 15:44:35 +0000 Subject: [PATCH 25/33] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220128.1 (#13142) [release/6.0.1xx] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fc9df1f02..67c8f7758 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -211,9 +211,9 @@ https://github.com/dotnet/arcade 7421b55f46aff8373764016d942b23cbf87c75cb - + https://github.com/dotnet/source-build-reference-packages - 71a327c277a022d15af3d103c0796620ecd40471 + 4643b750ccc93ca151eed888da70b67f0198d1fd From 78e0c0c70a26c3521717e11b9c99b611b4dc4252 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 31 Jan 2022 13:49:58 -0800 Subject: [PATCH 26/33] Update .vsts-ci.yml --- .vsts-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 1d18d9dd0..b8230ba91 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -392,7 +392,7 @@ stages: publishUsingPipelines: true pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - vmImage: vs2017-win2016 + vmImage: windows-latest ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals Build.Windows.10.Amd64.VS2017 From cfe37ec6f22f5ec76f02ac2499c293726c5d1f7d Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 31 Jan 2022 13:51:01 -0800 Subject: [PATCH 27/33] Update .vsts-ci.yml --- .vsts-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index b8230ba91..7fb2a509d 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -391,8 +391,6 @@ stages: - Source_Build_Create_Tarball publishUsingPipelines: true pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - vmImage: windows-latest ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals Build.Windows.10.Amd64.VS2017 From 041c2d6658c7c113dd4b25e8186488120bc60461 Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Tue, 1 Feb 2022 14:09:57 -0800 Subject: [PATCH 28/33] Update branding to 6.0.103 (#13156) --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index d44fa76ab..38c5ac896 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,7 +8,7 @@ 6 0 1 - 02 + 03 $(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature) servicing $(VersionMajor).$(VersionMinor) From 176600a2351d25788d0ed3f3d331758a73fed58d Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Thu, 3 Feb 2022 09:02:14 -0500 Subject: [PATCH 29/33] Add arm64 packages to source-build bootstrap (#13157) Currently, source-build is failing out-of-the-box on arm64 because ilasm and friends are missing on arm64. The errors look like this: src/source-build-reference-packages.4643b750ccc93ca151eed888da70b67f0198d1fd/artifacts/source-build/self/src/src/targetPacks/ILsrc/microsoft.netframework.referenceassemblies/1.0.2/microsoft.netframework.referenceassemblies.1.0.2.csproj: error NU1101: Unable to find package runtime.linux-arm64.microsoft.netcore.ilasm. No packages exist with this id in source(s): prebuilt, previously-source-built, reference-packages, source-built [.dotnet/sdk/6.0.101/NuGet.targets] Fix this and related errors by ading arm64 artifacts to the bootstrap step. This change is sufficient to make source-build work out-of-the-box on arm64 now using the normal steps: ./build.sh /p:ArcadeBuildTarball=true /p:TarballDir=/some/dir cd /some/dir ./prep.sh --bootstrap && ./build.sh --- .../scripts/bootstrap/buildBootstrapPreviouslySB.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj b/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj index 14c42e128..14921a48f 100644 --- a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj +++ b/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj @@ -19,6 +19,10 @@ + + + + From a1c63147174408a14426013d4b818cd82ad58330 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 08:42:57 -0800 Subject: [PATCH 30/33] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220203.1 (#13163) Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 6.0.0-servicing.22078.1 -> To Version 6.0.0-servicing.22103.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 67c8f7758..44fb8d404 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -211,9 +211,9 @@ https://github.com/dotnet/arcade 7421b55f46aff8373764016d942b23cbf87c75cb - + https://github.com/dotnet/source-build-reference-packages - 4643b750ccc93ca151eed888da70b67f0198d1fd + ff99504268983746f7d8e179eac4b88ece7f2817 From 701b7698d699e5c414bb8e49a52f426f36134de2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 17:55:02 +0000 Subject: [PATCH 31/33] Update dependencies from https://github.com/dotnet/arcade build 20220202.3 (#13164) [release/6.0.1xx] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 12 +- eng/Versions.props | 2 +- eng/common/generate-graph-files.ps1 | 86 --- eng/common/post-build/publish-using-darc.ps1 | 28 +- eng/common/sdl/configure-sdl-tool.ps1 | 9 +- eng/common/sdl/execute-all-sdl-tools.ps1 | 4 +- eng/common/sdl/packages.config | 2 +- eng/common/templates/job/execute-sdl.yml | 25 +- .../templates/job/generate-graph-files.yml | 48 -- eng/common/templates/job/job.yml | 5 + eng/common/templates/job/onelocbuild.yml | 18 +- .../templates/job/publish-build-assets.yml | 4 - eng/common/templates/jobs/codeql-build.yml | 31 + eng/common/templates/jobs/jobs.yml | 24 +- .../channels/generic-internal-channel.yml | 190 ------ .../channels/generic-public-channel.yml | 192 ------ .../templates/post-build/common-variables.yml | 73 --- .../templates/post-build/post-build.yml | 616 +++++------------- .../post-build/setup-maestro-vars.yml | 128 ++-- eng/common/templates/steps/execute-codeql.yml | 32 + global.json | 6 +- 21 files changed, 340 insertions(+), 1195 deletions(-) delete mode 100644 eng/common/generate-graph-files.ps1 delete mode 100644 eng/common/templates/job/generate-graph-files.yml create mode 100644 eng/common/templates/jobs/codeql-build.yml delete mode 100644 eng/common/templates/post-build/channels/generic-internal-channel.yml delete mode 100644 eng/common/templates/post-build/channels/generic-public-channel.yml create mode 100644 eng/common/templates/steps/execute-codeql.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 44fb8d404..65953f6b0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -197,19 +197,19 @@ - + https://github.com/dotnet/arcade - 7421b55f46aff8373764016d942b23cbf87c75cb + 93e08e378eb00a4267ffeca24b6bebb4f6c011ef - + https://github.com/dotnet/arcade - 7421b55f46aff8373764016d942b23cbf87c75cb + 93e08e378eb00a4267ffeca24b6bebb4f6c011ef - + https://github.com/dotnet/arcade - 7421b55f46aff8373764016d942b23cbf87c75cb + 93e08e378eb00a4267ffeca24b6bebb4f6c011ef https://github.com/dotnet/source-build-reference-packages diff --git a/eng/Versions.props b/eng/Versions.props index 38c5ac896..67023c50a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -19,7 +19,7 @@ - 6.0.0-beta.21609.4 + 6.0.0-beta.22102.3 diff --git a/eng/common/generate-graph-files.ps1 b/eng/common/generate-graph-files.ps1 deleted file mode 100644 index 0728b1a8b..000000000 --- a/eng/common/generate-graph-files.ps1 +++ /dev/null @@ -1,86 +0,0 @@ -Param( - [Parameter(Mandatory=$true)][string] $barToken, # Token generated at https://maestro-prod.westus2.cloudapp.azure.com/Account/Tokens - [Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed) - [Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed) - [Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created - [string] $darcVersion, # darc's version - [string] $graphvizVersion = '2.38', # GraphViz version - [switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about - # toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies -) - -function CheckExitCode ([string]$stage) -{ - $exitCode = $LASTEXITCODE - if ($exitCode -ne 0) { - Write-PipelineTelemetryError -Category 'Arcade' -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now..." - ExitWithExitCode $exitCode - } -} - -try { - $ErrorActionPreference = 'Stop' - . $PSScriptRoot\tools.ps1 - - Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') - - Push-Location $PSScriptRoot - - Write-Host 'Installing darc...' - . .\darc-init.ps1 -darcVersion $darcVersion - CheckExitCode 'Running darc-init' - - $engCommonBaseDir = Join-Path $PSScriptRoot 'native\' - $graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory - $nativeToolBaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external' - $installBin = Join-Path $graphvizInstallDir 'bin' - - Write-Host 'Installing dot...' - .\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose - - $darcExe = "$env:USERPROFILE\.dotnet\tools" - $darcExe = Resolve-Path "$darcExe\darc.exe" - - Create-Directory $outputFolder - - # Generate 3 graph descriptions: - # 1. Flat with coherency information - # 2. Graphviz (dot) file - # 3. Standard dependency graph - $graphVizFilePath = "$outputFolder\graphviz.txt" - $graphVizImageFilePath = "$outputFolder\graph.png" - $normalGraphFilePath = "$outputFolder\graph-full.txt" - $flatGraphFilePath = "$outputFolder\graph-flat.txt" - $baseOptions = @( '--github-pat', "$gitHubPat", '--azdev-pat', "$azdoPat", '--password', "$barToken" ) - - if ($includeToolset) { - Write-Host 'Toolsets will be included in the graph...' - $baseOptions += @( '--include-toolset' ) - } - - Write-Host 'Generating standard dependency graph...' - & "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath - CheckExitCode 'Generating normal dependency graph' - - Write-Host 'Generating flat dependency graph and graphviz file...' - & "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath - CheckExitCode 'Generating flat and graphviz dependency graph' - - Write-Host "Generating graph image $graphVizFilePath" - $dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe" - & "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath" - CheckExitCode 'Generating graphviz image' - - Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!" -} -catch { - if (!$includeToolset) { - Write-Host 'This might be a toolset repo which includes only toolset dependencies. ' -NoNewline -ForegroundColor Yellow - Write-Host 'Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again...' -ForegroundColor Yellow - } - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'Arcade' -Message $_ - ExitWithExitCode 1 -} finally { - Pop-Location -} \ 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 2427ca6b6..8508397d7 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -5,13 +5,8 @@ param( [Parameter(Mandatory=$true)][string] $MaestroToken, [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, - [Parameter(Mandatory=$false)][string] $EnableSourceLinkValidation, - [Parameter(Mandatory=$false)][string] $EnableSigningValidation, - [Parameter(Mandatory=$false)][string] $EnableNugetValidation, - [Parameter(Mandatory=$false)][string] $PublishInstallersAndChecksums, [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, - [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters, - [Parameter(Mandatory=$false)][string] $SigningValidationAdditionalParameters + [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters ) try { @@ -35,27 +30,6 @@ try { $optionalParams.Add("--no-wait") | Out-Null } - if ("false" -ne $PublishInstallersAndChecksums) { - $optionalParams.Add("--publish-installers-and-checksums") | Out-Null - } - - if ("true" -eq $EnableNugetValidation) { - $optionalParams.Add("--validate-nuget") | Out-Null - } - - if ("true" -eq $EnableSourceLinkValidation) { - $optionalParams.Add("--validate-sourcelinkchecksums") | Out-Null - } - - if ("true" -eq $EnableSigningValidation) { - $optionalParams.Add("--validate-signingchecksums") | Out-Null - - if ("" -ne $SigningValidationAdditionalParameters) { - $optionalParams.Add("--signing-validation-parameters") | Out-Null - $optionalParams.Add($SigningValidationAdditionalParameters) | Out-Null - } - } - & $darc add-build-to-channel ` --id $buildId ` --publishing-infra-version $PublishingInfraVersion ` diff --git a/eng/common/sdl/configure-sdl-tool.ps1 b/eng/common/sdl/configure-sdl-tool.ps1 index 4999c3070..adea8e8da 100644 --- a/eng/common/sdl/configure-sdl-tool.ps1 +++ b/eng/common/sdl/configure-sdl-tool.ps1 @@ -15,7 +15,9 @@ Param( # Optional: Additional params to add to any tool using CredScan. [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional params to add to any tool using PoliCheck. - [string[]] $PoliCheckAdditionalRunConfigParams + [string[]] $PoliCheckAdditionalRunConfigParams, + # Optional: Additional params to add to any tool using CodeQL/Semmle. + [string[]] $CodeQLAdditionalRunConfigParams ) $ErrorActionPreference = 'Stop' @@ -78,6 +80,11 @@ try { $tool.Args += "Target < $TargetDirectory" } $tool.Args += $PoliCheckAdditionalRunConfigParams + } elseif ($tool.Name -eq 'semmle' -or $tool.Name -eq 'codeql') { + if ($targetDirectory) { + $tool.Args += "`"SourceCodeDirectory < $TargetDirectory`"" + } + $tool.Args += $CodeQLAdditionalRunConfigParams } # Create variable pointing to the args array directly so we can use splat syntax later. diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1 index 1157151f4..b9fe73179 100644 --- a/eng/common/sdl/execute-all-sdl-tools.ps1 +++ b/eng/common/sdl/execute-all-sdl-tools.ps1 @@ -34,6 +34,7 @@ Param( [string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") [string[]] $PoliCheckAdditionalRunConfigParams, # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") + [string[]] $CodeQLAdditionalRunConfigParams, # Optional: Additional Params to custom build a Semmle/CodeQL run config in the format @("xyz < abc","sdf < 1") [bool] $BreakOnFailure=$False # Optional: Fail the build if there were errors during the run ) @@ -105,7 +106,8 @@ try { -AzureDevOpsAccessToken $AzureDevOpsAccessToken ` -GuardianLoggerLevel $GuardianLoggerLevel ` -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams ` - -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams + -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams ` + -CodeQLAdditionalRunConfigParams $CodeQLAdditionalRunConfigParams if ($BreakOnFailure) { Exit-IfNZEC "Sdl" } diff --git a/eng/common/sdl/packages.config b/eng/common/sdl/packages.config index 3bd8b29eb..b7bcfe38c 100644 --- a/eng/common/sdl/packages.config +++ b/eng/common/sdl/packages.config @@ -1,4 +1,4 @@ - + diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index 4882dd931..d0a1ea8b0 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -29,14 +29,6 @@ parameters: # Optional: download a list of pipeline artifacts. 'downloadArtifacts' controls build artifacts, # not pipeline artifacts, so doesn't affect the use of this parameter. pipelineArtifactNames: [] - # Optional: location and ID of the AzDO build that the build/pipeline artifacts should be - # downloaded from. By default, uses runtime expressions to decide based on the variables set by - # the 'setupMaestroVars' dependency. Overriding this parameter is necessary if SDL tasks are - # running without Maestro++/BAR involved, or to download artifacts from a specific existing build - # to iterate quickly on SDL changes. - AzDOProjectName: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - AzDOPipelineId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - AzDOBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] jobs: - job: Run_SDL @@ -54,21 +46,26 @@ jobs: # 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.53.3 + value: 0.110.1 - name: GuardianVersion value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} - name: GuardianPackagesConfigFile value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config pool: - # To extract archives (.tar.gz, .zip), we need access to "tar", added in Windows 10/2019. - ${{ if eq(parameters.extractArchiveArtifacts, 'false') }}: - vmImage: windows-2019 - ${{ if ne(parameters.extractArchiveArtifacts, 'false') }}: - vmImage: windows-2019 + # 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-Internal + demands: ImageOverride -equals Build.Server.Amd64.VS2019 steps: - checkout: self clean: true + - template: /eng/common/templates/post-build/setup-maestro-vars.yml + - ${{ if ne(parameters.downloadArtifacts, 'false')}}: - ${{ if ne(parameters.artifactNames, '') }}: - ${{ each artifactName in parameters.artifactNames }}: diff --git a/eng/common/templates/job/generate-graph-files.yml b/eng/common/templates/job/generate-graph-files.yml deleted file mode 100644 index e54ce956f..000000000 --- a/eng/common/templates/job/generate-graph-files.yml +++ /dev/null @@ -1,48 +0,0 @@ -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: {} - - # Optional: Include toolset dependencies in the generated graph files - includeToolset: false - -jobs: -- job: Generate_Graph_Files - - dependsOn: ${{ parameters.dependsOn }} - - displayName: Generate Graph Files - - pool: ${{ parameters.pool }} - - variables: - # Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT - # DotNet-AllOrgs-Darc-Pats provides: dn-bot-devdiv-dnceng-rw-code-pat - - group: Publish-Build-Assets - - group: DotNet-AllOrgs-Darc-Pats - - name: _GraphArguments - value: -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT) - -azdoPat $(dn-bot-devdiv-dnceng-rw-code-pat) - -barToken $(MaestroAccessToken) - -outputFolder '$(Build.StagingDirectory)/GraphFiles/' - - ${{ if ne(parameters.includeToolset, 'false') }}: - - name: _GraphArguments - value: ${{ variables._GraphArguments }} -includeToolset - - steps: - - task: PowerShell@2 - displayName: Generate Graph Files - inputs: - filePath: eng\common\generate-graph-files.ps1 - arguments: $(_GraphArguments) - continueOnError: true - - task: PublishBuildArtifacts@1 - displayName: Publish Graph to Artifacts - inputs: - PathtoPublish: '$(Build.StagingDirectory)/GraphFiles' - PublishLocation: Container - ArtifactName: GraphFiles - continueOnError: true - condition: always() diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 37dceb1ba..30d1de583 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -24,6 +24,7 @@ parameters: enablePublishBuildAssets: false enablePublishTestResults: false enablePublishUsingPipelines: false + disableComponentGovernance: false mergeTestResults: false testRunTitle: '' testResultsFormat: '' @@ -136,6 +137,10 @@ jobs: richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin continueOnError: true + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.disableComponentGovernance, 'true')) }}: + - task: ComponentGovernanceComponentDetection@0 + continueOnError: true + - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: MicroBuildCleanup@1 diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml index 069098b0a..9d1e3042d 100644 --- a/eng/common/templates/job/onelocbuild.yml +++ b/eng/common/templates/job/onelocbuild.yml @@ -3,9 +3,8 @@ parameters: dependsOn: '' # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool - pool: - vmImage: windows-2019 - + pool: '' + CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex GithubPat: $(BotAccount-dotnet-bot-repo-PAT) @@ -31,7 +30,18 @@ jobs: displayName: OneLocBuild - pool: ${{ parameters.pool }} + ${{ 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: NetCore1ESPool-Internal + demands: ImageOverride -equals Build.Server.Amd64.VS2019 variables: - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index fe9dfdf72..d91bf9147 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -38,10 +38,6 @@ jobs: value: ${{ parameters.configuration }} - group: Publish-Build-Assets - group: AzureDevOps-Artifact-Feeds-Pats - # Skip component governance and codesign validation for SDL. These jobs - # create no content. - - name: skipComponentGovernanceDetection - value: true - name: runCodesignValidationInjection value: false diff --git a/eng/common/templates/jobs/codeql-build.yml b/eng/common/templates/jobs/codeql-build.yml new file mode 100644 index 000000000..f7dc5ea4a --- /dev/null +++ b/eng/common/templates/jobs/codeql-build.yml @@ -0,0 +1,31 @@ +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 + parameters: + 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: $(Build.SourcesDirectory)\eng\common\sdl\packages.config + - name: GuardianVersion + value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} + + jobs: ${{ parameters.jobs }} + diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index 90015a7e5..70d44735a 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -8,6 +8,10 @@ parameters: # Optional: Enable publishing using release pipelines enablePublishUsingPipelines: false + # Optional: Disable component governance detection. In general, component governance + # should be on for all jobs. Use only in the event of issues. + disableComponentGovernance: false + # Optional: Enable running the source-build jobs to build repo from source enableSourceBuild: false @@ -83,17 +87,15 @@ jobs: - ${{ if eq(parameters.enableSourceBuild, true) }}: - Source_Build_Complete pool: - vmImage: windows-2019 + # 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-Internal + demands: ImageOverride -equals Build.Server.Amd64.VS2019 + runAsPublic: ${{ parameters.runAsPublic }} publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} - - - ${{ if eq(parameters.graphFileGeneration.enabled, true) }}: - - template: ../job/generate-graph-files.yml - parameters: - continueOnError: ${{ parameters.continueOnError }} - includeToolset: ${{ parameters.graphFileGeneration.includeToolset }} - dependsOn: - - Asset_Registry_Publish - pool: - vmImage: windows-2019 diff --git a/eng/common/templates/post-build/channels/generic-internal-channel.yml b/eng/common/templates/post-build/channels/generic-internal-channel.yml deleted file mode 100644 index 8990dfc8c..000000000 --- a/eng/common/templates/post-build/channels/generic-internal-channel.yml +++ /dev/null @@ -1,190 +0,0 @@ -parameters: - BARBuildId: '' - PromoteToChannelIds: '' - artifactsPublishingAdditionalParameters: '' - dependsOn: - - Validate - publishInstallersAndChecksums: true - symbolPublishingAdditionalParameters: '' - stageName: '' - channelName: '' - channelId: '' - transportFeed: '' - shippingFeed: '' - symbolsFeed: '' - -stages: -- stage: ${{ parameters.stageName }} - dependsOn: ${{ parameters.dependsOn }} - variables: - - template: ../common-variables.yml - displayName: ${{ parameters.channelName }} Publishing - jobs: - - template: ../setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - job: publish_symbols - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} )) - variables: - - group: DotNet-Symbol-Server-Pats - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] - pool: - vmImage: 'windows-2019' - steps: - - script: echo "##vso[task.logissue type=warning]Going forward, v2 Arcade publishing is no longer supported. Please read https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md for details, then contact dnceng if you have further questions." - displayName: Warn about v2 Arcade Publishing Usage - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: DownloadBuildArtifacts@0 - displayName: Download Build Assets - continueOnError: true - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - downloadType: 'specific' - itemPattern: | - PdbArtifacts/** - BlobArtifacts/** - downloadPath: '$(Build.ArtifactStagingDirectory)' - checkDownloadedFiles: true - - # This is necessary whenever we want to publish/restore to an AzDO private feed - # Since sdk-task.ps1 tries to restore packages we need to do this authentication here - # otherwise it'll complain about accessing a private feed. - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - /p:PublishToMSDL=false - ${{ parameters.symbolPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: '${{ parameters.stageName }}' - JobLabel: 'SymbolPublishing' - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - timeoutInMinutes: 120 - variables: - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} )) - pool: - vmImage: 'windows-2019' - steps: - - script: echo "##vso[task.logissue type=warning]Going forward, v2 Arcade publishing is no longer supported. Please read https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md for details, then contact dnceng if you have further questions." - displayName: Warn about v2 Arcade Publishing Usage - - - task: DownloadBuildArtifacts@0 - displayName: Download Build Assets - continueOnError: true - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - downloadType: 'specific' - itemPattern: | - PackageArtifacts/** - BlobArtifacts/** - AssetManifests/** - downloadPath: '$(Build.ArtifactStagingDirectory)' - checkDownloadedFiles: true - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:PublishingInfraVersion=2 - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:ChecksumsTargetStaticFeed=$(InternalChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(InternalChecksumsBlobFeedKey) - /p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey) - /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:PublishToMSDL=false - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: '${{ parameters.stageName }}' - JobLabel: 'AssetsPublishing' - - - template: ../../steps/add-build-to-channel.yml - parameters: - ChannelId: ${{ parameters.channelId }} diff --git a/eng/common/templates/post-build/channels/generic-public-channel.yml b/eng/common/templates/post-build/channels/generic-public-channel.yml deleted file mode 100644 index 3220c6a4f..000000000 --- a/eng/common/templates/post-build/channels/generic-public-channel.yml +++ /dev/null @@ -1,192 +0,0 @@ -parameters: - BARBuildId: '' - PromoteToChannelIds: '' - artifactsPublishingAdditionalParameters: '' - dependsOn: - - Validate - publishInstallersAndChecksums: true - symbolPublishingAdditionalParameters: '' - stageName: '' - channelName: '' - channelId: '' - transportFeed: '' - shippingFeed: '' - symbolsFeed: '' - # If the channel name is empty, no links will be generated - akaMSChannelName: '' - -stages: -- stage: ${{ parameters.stageName }} - dependsOn: ${{ parameters.dependsOn }} - variables: - - template: ../common-variables.yml - displayName: ${{ parameters.channelName }} Publishing - jobs: - - template: ../setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - job: publish_symbols - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} )) - variables: - - group: DotNet-Symbol-Server-Pats - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] - pool: - vmImage: 'windows-2019' - steps: - - script: echo "##vso[task.logissue type=warning]Going forward, v2 Arcade publishing is no longer supported. Please read https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md for details, then contact dnceng if you have further questions." - displayName: Warn about v2 Arcade Publishing Usage - - - task: DownloadBuildArtifacts@0 - displayName: Download Build Assets - continueOnError: true - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - downloadType: 'specific' - itemPattern: | - PdbArtifacts/** - BlobArtifacts/** - downloadPath: '$(Build.ArtifactStagingDirectory)' - checkDownloadedFiles: true - - # This is necessary whenever we want to publish/restore to an AzDO private feed - # Since sdk-task.ps1 tries to restore packages we need to do this authentication here - # otherwise it'll complain about accessing a private feed. - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - ${{ parameters.symbolPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: '${{ parameters.stageName }}' - JobLabel: 'SymbolPublishing' - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - timeoutInMinutes: 120 - variables: - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] - - name: ArtifactsCategory - value: ${{ coalesce(variables._DotNetArtifactsCategory, '.NETCore') }} - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} )) - pool: - vmImage: 'windows-2019' - steps: - - script: echo "##vso[task.logissue type=warning]Going forward, v2 Arcade publishing is no longer supported. Please read https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md for details, then contact dnceng if you have further questions." - displayName: Warn about v2 Arcade Publishing Usage - - - task: DownloadBuildArtifacts@0 - displayName: Download Build Assets - continueOnError: true - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - downloadType: 'specific' - itemPattern: | - PackageArtifacts/** - BlobArtifacts/** - AssetManifests/** - downloadPath: '$(Build.ArtifactStagingDirectory)' - checkDownloadedFiles: true - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:PublishingInfraVersion=2 - /p:ArtifactsCategory=$(ArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:LatestLinkShortUrlPrefix=dotnet/'${{ parameters.akaMSChannelName }}' - /p:AkaMSClientId=$(akams-client-id) - /p:AkaMSClientSecret=$(akams-client-secret) - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: '${{ parameters.stageName }}' - JobLabel: 'AssetsPublishing' - - - template: ../../steps/add-build-to-channel.yml - parameters: - ChannelId: ${{ parameters.channelId }} diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index c99fd7503..1ac7f49a4 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -4,54 +4,6 @@ variables: - group: DotNet-DotNetCli-Storage - group: DotNet-MSRC-Storage - group: Publish-Build-Assets - - # .NET Core 3.1 Dev - - name: PublicDevRelease_31_Channel_Id - value: 128 - - # .NET 5 Dev - - name: Net_5_Dev_Channel_Id - value: 131 - - # .NET Eng - Validation - - name: Net_Eng_Validation_Channel_Id - value: 9 - - # .NET Eng - Latest - - name: Net_Eng_Latest_Channel_Id - value: 2 - - # .NET 3 Eng - Validation - - name: NET_3_Eng_Validation_Channel_Id - value: 390 - - # .NET 3 Eng - - name: NetCore_3_Tools_Channel_Id - value: 344 - - # .NET Core 3.0 Internal Servicing - - name: InternalServicing_30_Channel_Id - value: 184 - - # .NET Core 3.0 Release - - name: PublicRelease_30_Channel_Id - value: 19 - - # .NET Core 3.1 Release - - name: PublicRelease_31_Channel_Id - value: 129 - - # General Testing - - name: GeneralTesting_Channel_Id - value: 529 - - # .NET Core 3.1 Blazor Features - - name: NetCore_31_Blazor_Features_Channel_Id - value: 531 - - # .NET Core Experimental - - name: NetCore_Experimental_Channel_Id - value: 562 # Whether the build is internal or not - name: IsInternalBuild @@ -70,30 +22,5 @@ variables: - name: SymbolToolVersion value: 1.0.1 - # Feed Configurations - # These should include the suffix "/index.json" - - # Default locations for Installers and checksums - # Public Locations - - name: ChecksumsBlobFeedUrl - value: https://dotnetclichecksums.blob.core.windows.net/dotnet/index.json - - name: InstallersBlobFeedUrl - value: https://dotnetcli.blob.core.windows.net/dotnet/index.json - - # Private Locations - - name: InternalChecksumsBlobFeedUrl - value: https://dotnetclichecksumsmsrc.blob.core.windows.net/dotnet/index.json - - name: InternalChecksumsBlobFeedKey - value: $(dotnetclichecksumsmsrc-storage-key) - - - name: InternalInstallersBlobFeedUrl - value: https://dotnetclimsrc.blob.core.windows.net/dotnet/index.json - - name: InternalInstallersBlobFeedKey - value: $(dotnetclimsrc-access-key) - - # Skip component governance and codesign validation for SDL. These jobs - # create no content. - - name: skipComponentGovernanceDetection - value: true - name: runCodesignValidationInjection value: false diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 4f79cf0f3..24e92a275 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -1,113 +1,114 @@ parameters: - # Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST. - # Publishing V2 accepts optionally outlining the publishing stages - default is inline. - # Publishing V3 DOES NOT accept inlining the publishing stages. - publishingInfraVersion: 2 - # When set to true the publishing templates from the repo will be used - # otherwise Darc add-build-to-channel will be used to trigger the promotion pipeline - inline: true + # 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 - # Only used if inline==false. When set to true will stall the current build until - # the Promotion Pipeline build finishes. Otherwise, the current build will continue - # execution concurrently with the promotion build. - waitPublishingFinish: true + - name: BARBuildId + displayName: BAR Build Id + type: number + default: 0 - BARBuildId: '' - PromoteToChannelIds: '' + - name: PromoteToChannelIds + displayName: Channel to promote BARBuildId to + type: string + default: '' - enableSourceLinkValidation: false - enableSigningValidation: true - enableSymbolValidation: false - enableNugetValidation: true - publishInstallersAndChecksums: true - SDLValidationParameters: - enable: false - continueOnError: false - params: '' - artifactNames: '' - downloadArtifacts: true + - 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 + 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 - symbolPublishingAdditionalParameters: '' - artifactsPublishingAdditionalParameters: '' - signingValidationAdditionalParameters: '' + - 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 - validateDependsOn: - - build - publishDependsOn: - - Validate + - name: validateDependsOn + type: object + default: + - build - # Channel ID's instantiated in this file. - # When adding a new channel implementation the call to `check-channel-consistency.ps1` - # needs to be updated with the new channel ID - NetEngLatestChannelId: 2 - NetEngValidationChannelId: 9 - NetDev5ChannelId: 131 - NetDev6ChannelId: 1296 - GeneralTestingChannelId: 529 - NETCoreToolingDevChannelId: 548 - NETCoreToolingReleaseChannelId: 549 - NETInternalToolingChannelId: 551 - NETCoreExperimentalChannelId: 562 - NetEngServicesIntChannelId: 678 - NetEngServicesProdChannelId: 679 - NetCoreSDK313xxChannelId: 759 - NetCoreSDK313xxInternalChannelId: 760 - NetCoreSDK314xxChannelId: 921 - NetCoreSDK314xxInternalChannelId: 922 - VS166ChannelId: 1010 - VS167ChannelId: 1011 - VS168ChannelId: 1154 - VSMasterChannelId: 1012 - VS169ChannelId: 1473 - VS1610ChannelId: 1692 + - name: publishDependsOn + type: object + default: + - Validate stages: -- ${{ if or(and(le(parameters.publishingInfraVersion, 2), eq(parameters.inline, 'true')), eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: +- ${{ 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 jobs: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - ${{ if and(le(parameters.publishingInfraVersion, 2), eq(parameters.inline, 'true')) }}: - - job: - displayName: Post-build Checks - dependsOn: setupMaestroVars - variables: - - name: TargetChannels - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'] ] - pool: - vmImage: 'windows-2019' - steps: - - task: PowerShell@2 - displayName: Maestro Channels Consistency - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1 - arguments: -PromoteToChannels "$(TargetChannels)" - -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.NetDev6ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VS168ChannelId}},${{parameters.VSMasterChannelId}},${{parameters.VS169ChannelId}},${{parameters.VS1610ChannelId}} - - job: displayName: NuGet Validation - dependsOn: setupMaestroVars condition: eq( ${{ parameters.enableNugetValidation }}, 'true') pool: - vmImage: 'windows-2019' - variables: - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + # 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-Internal + demands: ImageOverride -equals Build.Server.Amd64.VS2019 + steps: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + - task: DownloadBuildArtifacts@0 displayName: Download Package Artifacts inputs: @@ -128,19 +129,22 @@ stages: - job: displayName: Signing Validation - dependsOn: setupMaestroVars condition: and( eq( ${{ parameters.enableSigningValidation }}, 'true'), ne( variables['PostBuildSign'], 'true')) - variables: - - template: common-variables.yml - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] pool: - vmImage: 'windows-2019' + # 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-Internal + demands: ImageOverride -equals Build.Server.Amd64.VS2019 steps: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + - task: DownloadBuildArtifacts@0 displayName: Download Package Artifacts inputs: @@ -185,19 +189,22 @@ stages: - job: displayName: SourceLink Validation - dependsOn: setupMaestroVars condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true') - variables: - - template: common-variables.yml - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] pool: - vmImage: 'windows-2019' + # 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-Internal + demands: ImageOverride -equals Build.Server.Amd64.VS2019 steps: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + - task: DownloadBuildArtifacts@0 displayName: Download Blob Artifacts inputs: @@ -223,367 +230,46 @@ stages: - template: /eng/common/templates/job/execute-sdl.yml parameters: enable: ${{ parameters.SDLValidationParameters.enable }} - dependsOn: setupMaestroVars additionalParameters: ${{ parameters.SDLValidationParameters.params }} continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} downloadArtifacts: ${{ parameters.SDLValidationParameters.downloadArtifacts }} -- ${{ if or(ge(parameters.publishingInfraVersion, 3), eq(parameters.inline, 'false')) }}: - - 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 }} - ${{ if and(ne(parameters.enableNugetValidation, 'true'), ne(parameters.enableSigningValidation, 'true'), ne(parameters.enableSourceLinkValidation, 'true'), ne(parameters.SDLValidationParameters.enable, 'true')) }}: - dependsOn: ${{ parameters.validateDependsOn }} - displayName: Publish using Darc - variables: - - template: common-variables.yml - jobs: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} +- 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 }} + ${{ if and(ne(parameters.enableNugetValidation, 'true'), ne(parameters.enableSigningValidation, 'true'), ne(parameters.enableSourceLinkValidation, 'true'), ne(parameters.SDLValidationParameters.enable, 'true')) }}: + dependsOn: ${{ parameters.validateDependsOn }} + displayName: Publish using Darc + variables: + - template: common-variables.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 + ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + name: NetCore1ESPool-Internal + demands: ImageOverride -equals Build.Server.Amd64.VS2019 + steps: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - job: - displayName: Publish Using Darc - dependsOn: setupMaestroVars - timeoutInMinutes: 120 - variables: - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - pool: - vmImage: 'windows-2019' - steps: - - task: PowerShell@2 - displayName: Publish Using Darc - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) - -PublishingInfraVersion ${{ parameters.PublishingInfraVersion }} - -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' - -WaitPublishingFinish ${{ parameters.waitPublishingFinish }} - -PublishInstallersAndChecksums ${{ parameters.publishInstallersAndChecksums }} - -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' - -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' - -- ${{ if and(le(parameters.publishingInfraVersion, 2), eq(parameters.inline, 'true')) }}: - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_Dev5_Publish' - channelName: '.NET 5 Dev' - akaMSChannelName: 'net5/dev' - channelId: ${{ parameters.NetDev5ChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_Dev6_Publish' - channelName: '.NET 6 Dev' - akaMSChannelName: 'net6/dev' - channelId: ${{ parameters.NetDev6ChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'Net_Eng_Latest_Publish' - channelName: '.NET Eng - Latest' - akaMSChannelName: 'eng/daily' - channelId: ${{ parameters.NetEngLatestChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'Net_Eng_Validation_Publish' - channelName: '.NET Eng - Validation' - akaMSChannelName: 'eng/validation' - channelId: ${{ parameters.NetEngValidationChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'General_Testing_Publish' - channelName: 'General Testing' - akaMSChannelName: 'generaltesting' - channelId: ${{ parameters.GeneralTestingChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NETCore_Tooling_Dev_Publishing' - channelName: '.NET Core Tooling Dev' - channelId: ${{ parameters.NETCoreToolingDevChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NETCore_Tooling_Release_Publishing' - channelName: '.NET Core Tooling Release' - channelId: ${{ parameters.NETCoreToolingReleaseChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-internal-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NET_Internal_Tooling_Publishing' - channelName: '.NET Internal Tooling' - channelId: ${{ parameters.NETInternalToolingChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NETCore_Experimental_Publishing' - channelName: '.NET Core Experimental' - channelId: ${{ parameters.NETCoreExperimentalChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'Net_Eng_Services_Int_Publish' - channelName: '.NET Eng Services - Int' - channelId: ${{ parameters.NetEngServicesIntChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'Net_Eng_Services_Prod_Publish' - channelName: '.NET Eng Services - Prod' - channelId: ${{ parameters.NetEngServicesProdChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NETCore_SDK_314xx_Publishing' - channelName: '.NET Core SDK 3.1.4xx' - channelId: ${{ parameters.NetCoreSDK314xxChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-internal-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NETCore_SDK_314xx_Internal_Publishing' - channelName: '.NET Core SDK 3.1.4xx Internal' - channelId: ${{ parameters.NetCoreSDK314xxInternalChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NETCore_SDK_313xx_Publishing' - channelName: '.NET Core SDK 3.1.3xx' - channelId: ${{ parameters.NetCoreSDK313xxChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-internal-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NETCore_SDK_313xx_Internal_Publishing' - channelName: '.NET Core SDK 3.1.3xx Internal' - channelId: ${{ parameters.NetCoreSDK313xxInternalChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'VS16_6_Publishing' - channelName: 'VS 16.6' - channelId: ${{ parameters.VS166ChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'VS16_7_Publishing' - channelName: 'VS 16.7' - channelId: ${{ parameters.VS167ChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'VS16_8_Publishing' - channelName: 'VS 16.8' - channelId: ${{ parameters.VS168ChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'VS_Master_Publishing' - channelName: 'VS Master' - channelId: ${{ parameters.VSMasterChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'VS_16_9_Publishing' - channelName: 'VS 16.9' - channelId: ${{ parameters.VS169ChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'VS_16_10_Publishing' - channelName: 'VS 16.10' - channelId: ${{ parameters.VS1610ChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + - task: PowerShell@2 + displayName: Publish Using Darc + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) + -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} + -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -MaestroToken '$(MaestroApiAccessToken)' + -WaitPublishingFinish true + -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' \ 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 4a22b2e6f..0c87f149a 100644 --- a/eng/common/templates/post-build/setup-maestro-vars.yml +++ b/eng/common/templates/post-build/setup-maestro-vars.yml @@ -2,77 +2,69 @@ parameters: BARBuildId: '' PromoteToChannelIds: '' -jobs: -- job: setupMaestroVars - displayName: Setup Maestro Vars - variables: - - template: common-variables.yml - pool: - vmImage: 'windows-2019' - steps: - - checkout: none - - - ${{ 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 +steps: + - ${{ if eq(coalesce(parameters.PromoteToChannelIds, 0), 0) }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Release Configs inputs: - targetType: inline - script: | - try { - if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { - $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt + buildType: current + artifactName: ReleaseConfigs + checkDownloadedFiles: true - $BarId = $Content | Select -Index 0 - $Channels = $Content | Select -Index 1 - $IsStableBuild = $Content | Select -Index 2 + - 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 - $AzureDevOpsProject = $Env:System_TeamProject - $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId - $AzureDevOpsBuildId = $Env:Build_BuildId - } - else { - $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" + $BarId = $Content | Select -Index 0 + $Channels = $Content | Select -Index 1 + $IsStableBuild = $Content | Select -Index 2 - $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 -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;isOutput=true]$BarId" - Write-Host "##vso[task.setvariable variable=TargetChannels;isOutput=true]$Channels" - Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild" - - Write-Host "##vso[task.setvariable variable=AzDOProjectName;isOutput=true]$AzureDevOpsProject" - Write-Host "##vso[task.setvariable variable=AzDOPipelineId;isOutput=true]$AzureDevOpsBuildDefinitionId" - Write-Host "##vso[task.setvariable variable=AzDOBuildId;isOutput=true]$AzureDevOpsBuildId" + $AzureDevOpsProject = $Env:System_TeamProject + $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId + $AzureDevOpsBuildId = $Env:Build_BuildId } - catch { - Write-Host $_ - Write-Host $_.Exception - Write-Host $_.ScriptStackTrace - exit 1 + 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 -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 } - env: - MAESTRO_API_TOKEN: $(MaestroApiAccessToken) - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} + + 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: + MAESTRO_API_TOKEN: $(MaestroApiAccessToken) + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/eng/common/templates/steps/execute-codeql.yml b/eng/common/templates/steps/execute-codeql.yml new file mode 100644 index 000000000..3930b1630 --- /dev/null +++ b/eng/common/templates/steps/execute-codeql.yml @@ -0,0 +1,32 @@ +parameters: + # Language that should be analyzed. Defaults to csharp + language: csharp + # Build Commands + buildCommands: '' + overrideParameters: '' # Optional: to override values for parameters. + additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")' + # Optional: if specified, restore and use this version of Guardian instead of the default. + overrideGuardianVersion: '' + # Optional: if true, publish the '.gdn' folder as a pipeline artifact. This can help with in-depth + # diagnosis of problems with specific tool configurations. + publishGuardianDirectoryToPipeline: false + # The script to run to execute all SDL tools. Use this if you want to use a script to define SDL + # parameters rather than relying on YAML. It may be better to use a local script, because you can + # reproduce results locally without piecing together a command based on the YAML. + executeAllSdlToolsScript: 'eng/common/sdl/execute-all-sdl-tools.ps1' + # There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named + # 'continueOnError', the parameter value is not correctly picked up. + # This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter + # optional: determines whether to continue the build if the step errors; + sdlContinueOnError: false + +steps: +- template: /eng/common/templates/steps/execute-sdl.yml + parameters: + overrideGuardianVersion: ${{ parameters.overrideGuardianVersion }} + executeAllSdlToolsScript: ${{ parameters.executeAllSdlToolsScript }} + overrideParameters: ${{ parameters.overrideParameters }} + additionalParameters: '${{ parameters.additionalParameters }} + -CodeQLAdditionalRunConfigParams @("BuildCommands < ${{ parameters.buildCommands }}", "Language < ${{ parameters.language }}")' + publishGuardianDirectoryToPipeline: ${{ parameters.publishGuardianDirectoryToPipeline }} + sdlContinueOnError: ${{ parameters.sdlContinueOnError }} \ No newline at end of file diff --git a/global.json b/global.json index 86e408bbe..641ac3ef3 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.100", + "dotnet": "6.0.101", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)" @@ -11,7 +11,7 @@ "cmake": "3.16.4" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21609.4", - "Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.21609.4" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22102.3", + "Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.22102.3" } } From 2842b74fd311cabf8736428b2ff32902f08e4ccc Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Fri, 4 Feb 2022 12:52:30 -0600 Subject: [PATCH 32/33] Refactor smoke-test to capture prereqs (#13145) --- .../job/source-build-run-tarball-build.yml | 30 +++++- .../steps/source-build-build-tarball.yml | 8 +- src/SourceBuild/tarball/content/build.proj | 15 ++- .../Config.cs | 4 + .../ExecuteHelper.cs | 8 ++ ...osoft.DotNet.SourceBuild.SmokeTests.csproj | 12 ++- .../README.md | 9 ++ .../SmokeTests.cs | 10 +- .../smoke-tests/local.NuGet.Config | 8 ++ .../smoke-tests/online.NuGet.Config | 9 ++ .../smoke-tests/smoke-test.sh | 95 +++++++++---------- .../smoke-tests/smoke-testNuGet.Config | 21 ---- 12 files changed, 149 insertions(+), 80 deletions(-) create mode 100644 src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md create mode 100644 src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/local.NuGet.Config create mode 100644 src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/online.NuGet.Config delete mode 100644 src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-testNuGet.Config diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml index 28648866d..556f3fbe4 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml @@ -69,11 +69,24 @@ jobs: _ExcludeOmniSharpTests: false _RunOnline: false timeoutInMinutes: 300 + variables: + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - group: AzureDevOps-Artifact-Feeds-Pats workspace: clean: all steps: - - checkout: none + - checkout: self + clean: true + + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml parameters: @@ -110,11 +123,24 @@ jobs: _Container: ${{ parameters.fedora33Container }} _RunOnline: false timeoutInMinutes: 180 + variables: + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - group: AzureDevOps-Artifact-Feeds-Pats workspace: clean: all steps: - - checkout: none + - checkout: self + clean: true + + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - download: current artifact: $(_PreviousSourceBuildArtifact) diff --git a/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml index 7556b961d..cfb965134 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml @@ -66,7 +66,11 @@ steps: - script: | set -x - docker run --rm -v ${{ parameters.tarballDir }}:/tarball -w /tarball -e excludeOmniSharpTests=${{ parameters.excludeOmniSharpTests}} ${{ parameters.container }} ./build.sh --run-smoke-test ${{ parameters.additionalBuildArgs }} + # Use installer repo's NuGet.config during online testing to utilize internal feeds + rm -f ${{ parameters.tarballDir }}/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/online.NuGet.Config + cp NuGet.config ${{ parameters.tarballDir }}/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/online.NuGet.Config + + docker run --rm -v ${{ parameters.tarballDir }}:/tarball -w /tarball -e EXCLUDE_OMNISHARP_TESTS=${{ parameters.excludeOmniSharpTests}} ${{ parameters.container }} ./build.sh --run-smoke-test ${{ parameters.additionalBuildArgs }} displayName: Run Tests # Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph. @@ -82,7 +86,7 @@ steps: find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \; find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; - find test/*/*/*/*/*/testing-smoke/logs -exec cp {} --parents -t ${targetFolder} \; + find test/*/*/*/*/*/testing-smoke*/logs -exec cp {} --parents -t ${targetFolder} \; displayName: Prepare BuildLogs staging directory continueOnError: true condition: succeededOrFailed() diff --git a/src/SourceBuild/tarball/content/build.proj b/src/SourceBuild/tarball/content/build.proj index b8bd6061e..9c59468f6 100644 --- a/src/SourceBuild/tarball/content/build.proj +++ b/src/SourceBuild/tarball/content/build.proj @@ -99,13 +99,26 @@ %(SdkTarballItem.Identity) - + + + $(OutputPath)dotnet-smoke-test-prereqs.$(installerOutputPackageVersion).tar.gz + + + + + + + diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs index 3dfc38f69..be0e6b411 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs @@ -11,5 +11,9 @@ internal static class Config public static string DotNetDirectory { get; } = Environment.GetEnvironmentVariable("DOTNET_DIR") ?? "./.dotnet"; public static string DotNetTarballPath { get; } = Environment.GetEnvironmentVariable(DotNetTarballPathEnv) ?? string.Empty; public const string DotNetTarballPathEnv = "DOTNET_TARBALL_PATH"; + public static bool ExcludeOmniSharpTests { get; } = + bool.TryParse(Environment.GetEnvironmentVariable("EXCLUDE_OMNISHARP_TESTS"), out bool excludeOmniSharpTests) ? excludeOmniSharpTests : false; + public static bool ExcludeOnlineTests { get; } = + bool.TryParse(Environment.GetEnvironmentVariable("EXCLUDE_ONLINE_TESTS"), out bool excludeOnlineTests) ? excludeOnlineTests : false; public static string TargetRid { get; } = Environment.GetEnvironmentVariable("TARGET_RID") ?? string.Empty; } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs index 35c6dc7a7..2c38e43ca 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Linq; using System.Text; using Xunit.Abstractions; @@ -27,6 +28,13 @@ internal static class ExecuteHelper } }; + // The `dotnet test` execution context sets a number of dotnet related ENVs that cause issues when executing + // dotnet commands. Clear these to avoid side effects. + foreach (string key in process.StartInfo.Environment.Keys.Where(key => key != "HOME").ToList()) + { + process.StartInfo.Environment.Remove(key); + } + StringBuilder stdOutput = new(); process.OutputDataReceived += new DataReceivedEventHandler((sender, e) => stdOutput.AppendLine(e.Data)); diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj index 54d87df9d..0846de14b 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj @@ -19,10 +19,18 @@ - PreserveNewest + Always - PreserveNewest + Always + + + + + + + + diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md new file mode 100644 index 000000000..91317e44e --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md @@ -0,0 +1,9 @@ +# Source Build Smoke Tests + +* Run these tests via `build.sh --run-smoke-test` +* Various configuration settings are stored in `Config.cs` + +## Prereq Packages +Some prerelease scenarios, usually security updates, require non-source-built packages which are not publicly available. +Place these packages in the tarball's `packages/smoke-test-prereqs`. When prereq packages are required, the +`EXCLUDE_ONLINE_TESTS=true` environment variable should be set when running tests via `build.sh --run-smoke-test`. diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs index 869e97276..6ebd64e7d 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs @@ -24,11 +24,19 @@ public class SmokeTests [Fact] public void SmokeTestsScript() { - string smokeTestArgs = $"--dotnetDir {Directory.GetParent(DotNetHelper.DotNetPath)} --minimal --projectOutput --archiveRestoredPackages --targetRid {Config.TargetRid}"; + string smokeTestArgs = $"--dotnetDir {Directory.GetParent(DotNetHelper.DotNetPath)} --projectOutput --archiveRestoredPackages --targetRid {Config.TargetRid}"; if (Config.TargetRid.Contains("osx")) { smokeTestArgs += " --excludeWebHttpsTests"; } + if (Config.ExcludeOmniSharpTests) + { + smokeTestArgs += " --excludeOmniSharpTests"; + } + if (Config.ExcludeOnlineTests) + { + smokeTestArgs += " --excludeOnlineTests"; + } (Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess("./smoke-tests/smoke-test.sh", smokeTestArgs, OutputHelper); diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/local.NuGet.Config b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/local.NuGet.Config new file mode 100644 index 000000000..7e093b8fb --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/local.NuGet.Config @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/online.NuGet.Config b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/online.NuGet.Config new file mode 100644 index 000000000..59db1a3f1 --- /dev/null +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/online.NuGet.Config @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-test.sh b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-test.sh index ccd15fd27..1762122d8 100755 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-test.sh +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-test.sh @@ -55,7 +55,7 @@ excludeLocalTests=false excludeOnlineTests=false excludeOmniSharpTests=${excludeOmniSharpTests:-false} devCertsVersion="$DEV_CERTS_VERSION_DEFAULT" -testingDir="$SCRIPT_ROOT/testing-smoke" +testingDir="$SCRIPT_ROOT/testing-smoke-$(date +"%m%d%H%M%S")" cliDir="$testingDir/builtCli" logsDir="$testingDir/logs" logFile="$logsDir/smoke-test.log" @@ -63,8 +63,8 @@ omnisharpLogFile="$logsDir/omnisharp.log" restoredPackagesDir="$testingDir/packages" testingHome="$testingDir/home" archiveRestoredPackages=false -archivedPackagesDir="$testingDir/smoke-test-packages" -smokeTestPrebuilts="$SCRIPT_ROOT/packages/smoke-test-packages" +smokeTestPrebuilts="$SCRIPT_ROOT/prereq-packages" +nonSbSmokeTestPrebuilts="$SCRIPT_ROOT/non-source-built-prereq-packages" runningOnline=false runningHttps=false @@ -85,10 +85,7 @@ function usage() { echo " --excludeOnlineTests exclude test that use online sources for nuget packages" echo " --excludeOmniSharpTests don't run the OmniSharp tests" echo " --devCertsVersion use dotnet-dev-certs instead of default $DEV_CERTS_VERSION_DEFAULT" - echo " --prodConBlobFeedUrl override the prodcon blob feed specified in ProdConFeed.txt, removing it if empty" - echo " --archiveRestoredPackages capture all restored packages to $archivedPackagesDir" - echo "environment:" - echo " prodConBlobFeedUrl override the prodcon blob feed specified in ProdConFeed.txt, removing it if empty" + echo " --archiveRestoredPackages capture all restored packages to $smokeTestPrebuilts" echo "" } @@ -149,10 +146,6 @@ while :; do shift devCertsVersion="$1" ;; - --prodconblobfeedurl) - shift - prodConBlobFeedUrl="$1" - ;; --archiverestoredpackages) archiveRestoredPackages=true ;; @@ -166,8 +159,6 @@ while :; do shift done -prodConBlobFeedUrl="${prodConBlobFeedUrl-}" - function doCommand() { lang=$1 proj=$2 @@ -323,16 +314,19 @@ function runAllTests() { doCommand C# console new restore build run multi-rid-publish doCommand C# classlib new restore build multi-rid-publish doCommand C# xunit new restore test + doCommand C# nunit new restore test doCommand C# mstest new restore test doCommand VB console new restore build run multi-rid-publish doCommand VB classlib new restore build multi-rid-publish doCommand VB xunit new restore test + doCommand VB nunit new restore test doCommand VB mstest new restore test doCommand F# console new restore build run multi-rid-publish doCommand F# classlib new restore build multi-rid-publish doCommand F# xunit new restore test + doCommand F# nunit new restore test doCommand F# mstest new restore test fi @@ -377,8 +371,7 @@ function runOmniSharpTests() { tar xf "../omnisharp-linux-x64.tar.gz" popd - # 'blazorwasm' requires prereqs (non-source-built packages) - re-enable with https://github.com/dotnet/source-build/issues/2550 - for project in blazorserver classlib console mstest mvc nunit web webapp webapi worker xunit ; do + for project in blazorwasm blazorserver classlib console mstest mvc nunit web webapp webapi worker xunit ; do mkdir hello-$project pushd hello-$project @@ -428,18 +421,10 @@ function resetCaches() { fi } -function setupProdConFeed() { - if [ "$prodConBlobFeedUrl" ]; then - sed -i.bakProdCon "s|PRODUCT_CONTRUCTION_PACKAGES|$prodConBlobFeedUrl|g" "$testingDir/NuGet.Config" - else - sed -i.bakProdCon "/PRODUCT_CONTRUCTION_PACKAGES/d" "$testingDir/NuGet.Config" - fi -} - function setupSmokeTestFeed() { # Setup smoke-test-packages if they exist - if [ -e "$smokeTestPrebuilts" ]; then - sed -i.bakSmokeTestFeed "s|SMOKE_TEST_PACKAGE_FEED|$smokeTestPrebuilts|g" "$testingDir/NuGet.Config" + if [ -e "$nonSbSmokeTestPrebuilts" ]; then + sed -i.bakSmokeTestFeed "s|SMOKE_TEST_PACKAGE_FEED|$nonSbSmokeTestPrebuilts|g" "$testingDir/NuGet.Config" else sed -i.bakSmokeTestFeed "/SMOKE_TEST_PACKAGE_FEED/d" "$testingDir/NuGet.Config" fi @@ -447,8 +432,21 @@ function setupSmokeTestFeed() { function copyRestoredPackages() { if [ "$archiveRestoredPackages" == "true" ]; then - mkdir -p "$archivedPackagesDir" - cp -rf "$restoredPackagesDir"/* "$archivedPackagesDir" + rm -rf "$smokeTestPrebuilts" + rm -rf "$nonSbSmokeTestPrebuilts" + mkdir -p "$smokeTestPrebuilts" + mkdir -p "$nonSbSmokeTestPrebuilts" + find "$restoredPackagesDir" -iname "*.nupkg" -exec mv {} "$smokeTestPrebuilts" \; + + smokeTestPackages=$(find "$smokeTestPrebuilts" -iname "*.nupkg" -type f -printf "%f\n" | tr '[A-Z]' '[a-z]' | sort) + sourceBuiltPackages=$(find "$SOURCE_BUILT_PKGS_PATH" -iname "*.nupkg" -type f -printf "%f\n" | tr '[A-Z]' '[a-z]' | sort) + + echo "Removing smoke-test prereq packages that are source built:" + comm -23 <(printf "$smokeTestPackages") <(printf "$sourceBuiltPackages") | while read line + do + echo "$line" + cp "$smokeTestPrebuilts/$line" "$nonSbSmokeTestPrebuilts" + done fi } @@ -494,34 +492,13 @@ SOURCE_BUILT_PKGS_PATH="${ARTIFACTS_DIR}obj/$buildArch/$configuration/blob-feed/ export DOTNET_ROOT="$dotnetDir" export PATH="$dotnetDir:$PATH" -# Run all tests, local restore sources first, online restore sources second -if [ "$excludeLocalTests" == "false" ]; then - resetCaches - runningOnline=false - # Setup NuGet.Config with local restore source - if [ -e "$SCRIPT_ROOT/smoke-testNuGet.Config" ]; then - cp "$SCRIPT_ROOT/smoke-testNuGet.Config" "$testingDir/NuGet.Config" - sed -i.bak "s|SOURCE_BUILT_PACKAGES|$SOURCE_BUILT_PKGS_PATH|g" "$testingDir/NuGet.Config" - setupProdConFeed - setupSmokeTestFeed - echo "$testingDir/NuGet.Config Contents:" - cat "$testingDir/NuGet.Config" - fi - echo "RUN ALL TESTS - LOCAL RESTORE SOURCE" - runAllTests - copyRestoredPackages - echo "LOCAL RESTORE SOURCE - ALL TESTS PASSED!" -fi - +# Run all tests, online restore sources first, local restore sources second if [ "$excludeOnlineTests" == "false" ]; then resetCaches runningOnline=true # Setup NuGet.Config to use online restore sources - if [ -e "$SCRIPT_ROOT/smoke-testNuGet.Config" ]; then - cp "$SCRIPT_ROOT/smoke-testNuGet.Config" "$testingDir/NuGet.Config" - sed -i.bak "/SOURCE_BUILT_PACKAGES/d" "$testingDir/NuGet.Config" - setupProdConFeed - setupSmokeTestFeed + if [ -e "$SCRIPT_ROOT/online.NuGet.Config" ]; then + cp "$SCRIPT_ROOT/online.NuGet.Config" "$testingDir/NuGet.Config" echo "$testingDir/NuGet.Config Contents:" cat "$testingDir/NuGet.Config" fi @@ -531,6 +508,22 @@ if [ "$excludeOnlineTests" == "false" ]; then echo "ONLINE RESTORE SOURCE - ALL TESTS PASSED!" fi +if [ "$excludeLocalTests" == "false" ]; then + resetCaches + runningOnline=false + # Setup NuGet.Config with local restore source + if [ -e "$SCRIPT_ROOT/local.NuGet.Config" ]; then + cp "$SCRIPT_ROOT/local.NuGet.Config" "$testingDir/NuGet.Config" + sed -i.bak "s|SOURCE_BUILT_PACKAGES|$SOURCE_BUILT_PKGS_PATH|g" "$testingDir/NuGet.Config" + setupSmokeTestFeed + echo "$testingDir/NuGet.Config Contents:" + cat "$testingDir/NuGet.Config" + fi + echo "RUN ALL TESTS - LOCAL RESTORE SOURCE" + runAllTests + echo "LOCAL RESTORE SOURCE - ALL TESTS PASSED!" +fi + if [ "$excludeOmniSharpTests" == "false" ]; then runOmniSharpTests fi diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-testNuGet.Config b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-testNuGet.Config deleted file mode 100644 index 79dbf806a..000000000 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/smoke-testNuGet.Config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - From a56db4a33f189ad28d3e54969c908122d422534f Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Fri, 4 Feb 2022 22:48:34 +0000 Subject: [PATCH 33/33] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-sdk build 20220204.9 Microsoft.DotNet.MSBuildSdkResolver , Microsoft.NET.Sdk From Version 6.0.200-rtm.22103.35 -> To Version 6.0.200-rtm.22104.9 Dependency coherency updates Microsoft.WindowsDesktop.App.Ref,VS.Redist.Common.WindowsDesktop.SharedFramework.x64.6.0,VS.Redist.Common.WindowsDesktop.TargetingPack.x64.6.0,Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.6.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.AspNetCore.App.Ref,Microsoft.AspNetCore.App.Ref.Internal,Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.SharedFramework.x64.6.0,dotnet-dev-certs,dotnet-user-secrets,Microsoft.DotNet.Common.ItemTemplates,Microsoft.TemplateEngine.Cli,Microsoft.DotNet.Common.ProjectTemplates.6.0,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.Dotnet.WinForms.ProjectTemplates,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.DotNet.Wpf.ProjectTemplates,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,VS.Redist.Common.NetCore.SharedFramework.x64.6.0 From Version 6.0.0 -> To Version 6.0.2 (parent: Microsoft.NET.Sdk --- NuGet.config | 24 +++++++- eng/Version.Details.xml | 126 ++++++++++++++++++++-------------------- eng/Versions.props | 40 ++++++------- 3 files changed, 105 insertions(+), 85 deletions(-) diff --git a/NuGet.config b/NuGet.config index ba0bf48d8..f7517c012 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,19 +7,27 @@ + + + - + + + - + + + + @@ -38,9 +46,21 @@ + + + + + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8d719466b..293df744e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,46 +1,46 @@ - - https://github.com/dotnet/windowsdesktop - 59fea7da1dbb6e48837fa726cc2760b154bce3d1 - - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - ef15b555537a90da229ce6474658ae1a9916a932 + 9fbd3ecd250dda95f93b0123ab017efb1e0e6033 - - https://github.com/dotnet/windowsdesktop - 59fea7da1dbb6e48837fa726cc2760b154bce3d1 - - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - ef15b555537a90da229ce6474658ae1a9916a932 + 9fbd3ecd250dda95f93b0123ab017efb1e0e6033 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop + 9fbd3ecd250dda95f93b0123ab017efb1e0e6033 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop + 9fbd3ecd250dda95f93b0123ab017efb1e0e6033 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 + + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 + + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 3a25a7f1cc446b60678ed25c9d829420d6321eba + 839cdfb0ecca5e0be3dbccd926e7651ef50fdf10 @@ -52,30 +52,30 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 3a25a7f1cc446b60678ed25c9d829420d6321eba - - https://github.com/dotnet/aspnetcore - ae1a6cbe225b99c0bf38b7e31bf60cb653b73a52 - - - https://github.com/dotnet/aspnetcore - ae1a6cbe225b99c0bf38b7e31bf60cb653b73a52 - - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4e7d976438b0fc17f435804e801d5d68d193ec33 + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace + + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace + + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4e7d976438b0fc17f435804e801d5d68d193ec33 + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4e7d976438b0fc17f435804e801d5d68d193ec33 + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 4e7d976438b0fc17f435804e801d5d68d193ec33 + 1dcf7acfacf0fe154adcc23270cb0da11ff44ace https://github.com/dotnet/test-templates @@ -91,35 +91,35 @@ - https://github.com/dotnet/templating - f6749ec0725a81db2491dd83b1c4b665332a7330 + https://dev.azure.com/dnceng/internal/_git/dotnet-templating + e6d9bf1868c4aa2808714ada839018a8506bd7dd - - https://github.com/dotnet/templating - f6749ec0725a81db2491dd83b1c4b665332a7330 + + https://dev.azure.com/dnceng/internal/_git/dotnet-templating + e6d9bf1868c4aa2808714ada839018a8506bd7dd - https://github.com/dotnet/templating - f6749ec0725a81db2491dd83b1c4b665332a7330 + https://dev.azure.com/dnceng/internal/_git/dotnet-templating + e6d9bf1868c4aa2808714ada839018a8506bd7dd - - https://github.com/dotnet/sdk - 82104d83fba7ad2710ba4526a645a6b1a490d331 + + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk + f9b6be31b19097cb47125075ca2e8322bf591fc0 - - https://github.com/dotnet/sdk - 82104d83fba7ad2710ba4526a645a6b1a490d331 + + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk + f9b6be31b19097cb47125075ca2e8322bf591fc0 - + https://dev.azure.com/dnceng/internal/_git/dotnet-winforms - 846205b4af05c7a200e1d203536fdc39994b9bd6 + 5ad241b9633924db40503de19cb502bb0aca7718 - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf - 0350d04790959e8ebdd3ceab0d34a40f811f019d + fb76229895cae74c1adc62c2411a0730a2f3759b https://github.com/dotnet/fsharp @@ -135,15 +135,15 @@ d3c6439b04452047cb62fc645ce341a034bdb5be - + https://github.com/dotnet/linker - 2b78c5e93b8dd36f4e55ee1e0327e064c0f5e84c + cc3dc76c374152f86ff73aa02f35782b713908c6 linker - + https://github.com/dotnet/roslyn - f6b9551f8f1dc36af9dd55557fa59c55c2c6b018 + 592501cbb9c9394072a245c15b3458ff88155d85 diff --git a/eng/Versions.props b/eng/Versions.props index 85087524b..472e6b2aa 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,11 +23,11 @@ - 6.0.1-servicing.21567.5 + 6.0.2-servicing.22064.7 - 6.0.1-servicing.21567.7 + 6.0.2-servicing.22064.8 @@ -44,20 +44,20 @@ - 6.0.1 - 6.0.0 - 6.0.0-rtm.21526.8 - 6.0.1-servicing.21567.14 - 6.0.1-servicing.21567.14 - 6.0.1-servicing.21567.14 + 6.0.2 + 6.0.2 + 6.0.2-servicing.22064.12 + 6.0.2-servicing.22064.12 + 6.0.2-servicing.22064.12 + 6.0.2-servicing.22064.12 0.2.0 - 6.0.200-rtm.22103.35 - 6.0.200-rtm.22103.35 + 6.0.200-rtm.22104.9 + 6.0.200-rtm.22104.9 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) @@ -68,20 +68,20 @@ - 6.0.1-servicing.21567.5 - 6.0.1-servicing.21567.5 - 6.0.1 - 6.0.1 - 6.0.1 - 6.0.1 + 6.0.2-servicing.22064.6 + 6.0.2-servicing.22064.6 + 6.0.2 + 6.0.2 + 6.0.2 + 6.0.2 2.1.0 - 6.0.1-servicing.21568.2 - 6.0.0-rtm.21523.1 - 6.0.1 - 6.0.0 + 6.0.2-servicing.22064.6 + 6.0.2-servicing.22064.6 + 6.0.2 + 6.0.2