From acc0bff25e665b91a3df372b55679c991079261e Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 7 Sep 2022 13:22:23 -0700 Subject: [PATCH 01/11] Supply official build id to inner-source build command Fixes https://github.com/dotnet/runtime/issues/75290 --- eng/SourceBuild.props | 1 + eng/pipelines/official/stages/publish.yml | 2 ++ eng/pipelines/runtime-official.yml | 5 ----- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index c17838918f8cec..480b655764042f 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -37,6 +37,7 @@ $(InnerBuildArgs) /p:KeepNativeSymbols=true $(InnerBuildArgs) /p:RuntimeOS=$(TargetRidWithoutPlatform) $(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable) + $(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId) $(InnerBuildArgs) /p:BuildDebPackage=false $(InnerBuildArgs) /p:EnableNgenOptimization=false diff --git a/eng/pipelines/official/stages/publish.yml b/eng/pipelines/official/stages/publish.yml index 1061c783f2ab57..cf3233a01347de 100644 --- a/eng/pipelines/official/stages/publish.yml +++ b/eng/pipelines/official/stages/publish.yml @@ -17,6 +17,7 @@ stages: - template: /eng/common/templates/job/publish-build-assets.yml parameters: publishUsingPipelines: true + publishAssetsImmediately: true dependsOn: PrepareSignedArtifacts pool: name: NetCore1ESPool-Internal @@ -34,6 +35,7 @@ stages: enableSigningValidation: false enableNugetValidation: false enableSourceLinkValidation: false + publishAssetsImmediately: true SDLValidationParameters: enable: false artifactNames: diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 98cac08563dfd3..a837c870fbef93 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -35,11 +35,6 @@ variables: # TODO: (Consolidation) Switch away from old signing/validation variables from former Core-Setup. https://github.com/dotnet/runtime/issues/1027 - name: TeamName value: dotnet-core-acquisition -# Set the target blob feed for package publish during official and validation builds. -- name: _DotNetArtifactsCategory - value: .NETCore -- name: _DotNetValidationArtifactsCategory - value: .NETCoreValidation - name: PostBuildSign value: true From 53f24d1c39ea286cbedc70638811507f56b79d42 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 1 Sep 2022 10:37:01 -0700 Subject: [PATCH 02/11] Only attempt to use ESRP connection in approved branches --- eng/pipelines/coreclr/templates/sign-diagnostic-files.yml | 2 +- eng/pipelines/official/stages/publish.yml | 2 -- eng/pipelines/runtime-official.yml | 5 +++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml index 7b020552ad5cb4..89cbbec6390df9 100644 --- a/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml +++ b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml @@ -4,7 +4,7 @@ parameters: timeoutInMinutes: '' steps: -- ${{ if and(eq(parameters.isOfficialBuild, true), ne(variables['Build.Reason'], 'PullRequest')) }}: +- ${{ if and(eq(parameters.isOfficialBuild, true), ne(variables['Build.Reason'], 'PullRequest'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'))) }}: - task: UseDotNet@2 displayName: Install .NET 6 SDK for signing. inputs: diff --git a/eng/pipelines/official/stages/publish.yml b/eng/pipelines/official/stages/publish.yml index cf3233a01347de..1061c783f2ab57 100644 --- a/eng/pipelines/official/stages/publish.yml +++ b/eng/pipelines/official/stages/publish.yml @@ -17,7 +17,6 @@ stages: - template: /eng/common/templates/job/publish-build-assets.yml parameters: publishUsingPipelines: true - publishAssetsImmediately: true dependsOn: PrepareSignedArtifacts pool: name: NetCore1ESPool-Internal @@ -35,7 +34,6 @@ stages: enableSigningValidation: false enableNugetValidation: false enableSourceLinkValidation: false - publishAssetsImmediately: true SDLValidationParameters: enable: false artifactNames: diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index a837c870fbef93..98cac08563dfd3 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -35,6 +35,11 @@ variables: # TODO: (Consolidation) Switch away from old signing/validation variables from former Core-Setup. https://github.com/dotnet/runtime/issues/1027 - name: TeamName value: dotnet-core-acquisition +# Set the target blob feed for package publish during official and validation builds. +- name: _DotNetArtifactsCategory + value: .NETCore +- name: _DotNetValidationArtifactsCategory + value: .NETCoreValidation - name: PostBuildSign value: true From b534cb911078ed263e42292047e7cd825c590225 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 9 Sep 2022 11:04:40 -0700 Subject: [PATCH 03/11] Source build fixes --- eng/SourceBuild.props | 1 + eng/versioning.targets | 2 +- src/coreclr/runtime-prereqs.proj | 2 +- .../Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props | 2 +- src/native/corehost/corehost.proj | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 480b655764042f..4c0d6e3e61ad86 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -38,6 +38,7 @@ $(InnerBuildArgs) /p:RuntimeOS=$(TargetRidWithoutPlatform) $(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable) $(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId) + $(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild) $(InnerBuildArgs) /p:BuildDebPackage=false $(InnerBuildArgs) /p:EnableNgenOptimization=false diff --git a/eng/versioning.targets b/eng/versioning.targets index 85f6eb4609d075..728009ccf3eb7e 100644 --- a/eng/versioning.targets +++ b/eng/versioning.targets @@ -178,7 +178,7 @@ $(ArtifactsObjDir)runtime_version.h $(ArtifactsObjDir)native.sourcelink.json false - true + true .NET Runtime diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props index 368726644a6385..56fd55748f461b 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props @@ -148,7 +148,7 @@ + Condition="'$(EnableSourceLink)' != 'false'"> <_VersionFile Include="$(IntermediateOutputPath).version" TargetPath="shared/$(SharedFrameworkName)/$(Version)/" /> diff --git a/src/native/corehost/corehost.proj b/src/native/corehost/corehost.proj index 9ce1a640eadaa1..12b6f74d93733d 100644 --- a/src/native/corehost/corehost.proj +++ b/src/native/corehost/corehost.proj @@ -7,7 +7,7 @@ true GetProductVersions;GenerateNativeVersionFile - $(BuildCoreHostDependsOn);InitializeSourceControlInformationFromSourceControlManager + $(BuildCoreHostDependsOn);InitializeSourceControlInformationFromSourceControlManager $(ArtifactsObjDir)$(OutputRid).$(Configuration)\ From 0560d2fa4fc57effcac6488b583be19e6f04c7db Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 9 Sep 2022 11:40:35 -0700 Subject: [PATCH 04/11] Supply DotNetPublishUsingPipelines --- eng/SourceBuild.props | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 4c0d6e3e61ad86..4b1e5766d3f208 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -39,6 +39,7 @@ $(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable) $(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId) $(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild) + $(InnerBuildArgs) /p:DotNetPublishUsingPipelines=$(DotNetPublishUsingPipelines) $(InnerBuildArgs) /p:BuildDebPackage=false $(InnerBuildArgs) /p:EnableNgenOptimization=false From 82ce9575a65012cb62b1bfbda33b3c7e2d2f3827 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 9 Sep 2022 12:21:50 -0700 Subject: [PATCH 05/11] revert that last bit --- eng/SourceBuild.props | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 4b1e5766d3f208..4c0d6e3e61ad86 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -39,7 +39,6 @@ $(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable) $(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId) $(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild) - $(InnerBuildArgs) /p:DotNetPublishUsingPipelines=$(DotNetPublishUsingPipelines) $(InnerBuildArgs) /p:BuildDebPackage=false $(InnerBuildArgs) /p:EnableNgenOptimization=false From 7bb3163631afecce3865a1ec4611111513e42257 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 12 Sep 2022 07:49:19 -0700 Subject: [PATCH 06/11] Update eng/versioning.targets Co-authored-by: Juan Hoyos --- eng/versioning.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/versioning.targets b/eng/versioning.targets index 728009ccf3eb7e..fb3e315a6935cd 100644 --- a/eng/versioning.targets +++ b/eng/versioning.targets @@ -178,7 +178,7 @@ Date: Mon, 12 Sep 2022 07:49:40 -0700 Subject: [PATCH 07/11] Update src/native/corehost/corehost.proj Co-authored-by: Juan Hoyos --- src/native/corehost/corehost.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/corehost/corehost.proj b/src/native/corehost/corehost.proj index 12b6f74d93733d..2a0dc702cd4bcd 100644 --- a/src/native/corehost/corehost.proj +++ b/src/native/corehost/corehost.proj @@ -7,7 +7,7 @@ true GetProductVersions;GenerateNativeVersionFile - $(BuildCoreHostDependsOn);InitializeSourceControlInformationFromSourceControlManager + $(BuildCoreHostDependsOn);InitializeSourceControlInformationFromSourceControlManager $(ArtifactsObjDir)$(OutputRid).$(Configuration)\ From d63395f9ee606cf5f6061122e29dfd3a96c31a1d Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 12 Sep 2022 07:56:52 -0700 Subject: [PATCH 08/11] Apply feedback --- src/coreclr/runtime-prereqs.proj | 2 +- .../Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/runtime-prereqs.proj b/src/coreclr/runtime-prereqs.proj index 078347faaf15f1..b1d1cf8b041df8 100644 --- a/src/coreclr/runtime-prereqs.proj +++ b/src/coreclr/runtime-prereqs.proj @@ -6,7 +6,7 @@ $(ArtifactsObjDir)runtime_version.h $(ArtifactsObjDir)native.sourcelink.json false - true + true .NET Runtime diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props index 56fd55748f461b..05574402ee8c95 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props @@ -148,7 +148,7 @@ + Condition="'$(EnableSourceControlManagerQueries)' == 'true'"> <_VersionFile Include="$(IntermediateOutputPath).version" TargetPath="shared/$(SharedFrameworkName)/$(Version)/" /> From dd27477c8937cb07b356caf9cdda972333701871 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 12 Sep 2022 09:27:32 -0700 Subject: [PATCH 09/11] Update src/native/corehost/corehost.proj Co-authored-by: Viktor Hofer --- src/native/corehost/corehost.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/corehost/corehost.proj b/src/native/corehost/corehost.proj index 2a0dc702cd4bcd..a706b6e94275ff 100644 --- a/src/native/corehost/corehost.proj +++ b/src/native/corehost/corehost.proj @@ -7,7 +7,7 @@ true GetProductVersions;GenerateNativeVersionFile - $(BuildCoreHostDependsOn);InitializeSourceControlInformationFromSourceControlManager + $(BuildCoreHostDependsOn);InitializeSourceControlInformationFromSourceControlManager $(ArtifactsObjDir)$(OutputRid).$(Configuration)\ From 8b572bc00a06dafab46b0d136a77f3968cce2a51 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 12 Sep 2022 09:35:01 -0700 Subject: [PATCH 10/11] Apply feedback --- eng/SourceBuild.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 4c0d6e3e61ad86..9db33dc54d305b 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -38,7 +38,7 @@ $(InnerBuildArgs) /p:RuntimeOS=$(TargetRidWithoutPlatform) $(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable) $(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId) - $(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild) + $(InnerBuildArgs Condition="'$(ContinuousIntegrationBuild)' != ''") /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild) $(InnerBuildArgs) /p:BuildDebPackage=false $(InnerBuildArgs) /p:EnableNgenOptimization=false From ffee8436c2777d1bdc534c246c4b94b3cb9cccab Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 12 Sep 2022 19:29:23 +0200 Subject: [PATCH 11/11] Fix msbuild syntax --- eng/SourceBuild.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 9db33dc54d305b..d574e5a53ce440 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -38,7 +38,7 @@ $(InnerBuildArgs) /p:RuntimeOS=$(TargetRidWithoutPlatform) $(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable) $(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId) - $(InnerBuildArgs Condition="'$(ContinuousIntegrationBuild)' != ''") /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild) + $(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild) $(InnerBuildArgs) /p:BuildDebPackage=false $(InnerBuildArgs) /p:EnableNgenOptimization=false