diff --git a/eng/Signing.props b/eng/Signing.props index 7def3013b89414..3d5e9960834385 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -47,7 +47,7 @@ - + false @@ -65,11 +65,11 @@ CertificateName="MicrosoftSHA2" /> - + - + diff --git a/eng/Subsets.props b/eng/Subsets.props index 8c389ed8fcca75..d328c72ff6194b 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -258,7 +258,7 @@ - + diff --git a/eng/pipelines/common/upload-intermediate-artifacts-step.yml b/eng/pipelines/common/upload-intermediate-artifacts-step.yml new file mode 100644 index 00000000000000..a0741b7b6820f2 --- /dev/null +++ b/eng/pipelines/common/upload-intermediate-artifacts-step.yml @@ -0,0 +1,20 @@ +parameters: + name: '' + +steps: +- task: CopyFiles@2 + displayName: Prepare job-specific intermediate artifacts subdirectory + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)' + Contents: | + Shipping/**/* + NonShipping/**/* + TargetFolder: '$(Build.StagingDirectory)/IntermediateArtifacts/${{ parameters.name }}' + CleanTargetFolder: true + +- task: PublishBuildArtifacts@1 + displayName: Publish intermediate artifacts + inputs: + pathToPublish: '$(Build.StagingDirectory)/IntermediateArtifacts' + artifactName: IntermediateArtifacts + artifactType: container diff --git a/eng/pipelines/common/upload-unsigned-artifacts-step.yml b/eng/pipelines/common/upload-unsigned-artifacts-step.yml deleted file mode 100644 index c4fea2adaa634b..00000000000000 --- a/eng/pipelines/common/upload-unsigned-artifacts-step.yml +++ /dev/null @@ -1,20 +0,0 @@ -parameters: - name: '' - -steps: -- task: CopyFiles@2 - displayName: Prepare job-specific intermediate unsigned artifacts subdirectory - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)' - Contents: | - Shipping/**/* - NonShipping/**/* - TargetFolder: '$(Build.StagingDirectory)/UnsignedArtifacts/${{ parameters.name }}' - CleanTargetFolder: true - -- task: PublishBuildArtifacts@1 - displayName: Publish intermediate unsigned artifacts - inputs: - pathToPublish: '$(Build.StagingDirectory)/UnsignedArtifacts' - artifactName: IntermediateUnsignedArtifacts - artifactType: container diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 42b1adffd09562..82499e2741796a 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -259,7 +259,6 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} - signCrossDac: ${{ parameters.signBinaries }} - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools')) }}: # Publish test native components for consumption by test execution. @@ -284,7 +283,7 @@ jobs: # Save packages using the prepare-signed-artifacts format. - ${{ if and(eq(parameters.isOfficialBuild, true), ne(parameters.testGroup, 'clrTools')) }}: - - template: /eng/pipelines/common/upload-unsigned-artifacts-step.yml + - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml parameters: name: ${{ parameters.platform }} diff --git a/eng/pipelines/coreclr/templates/crossdac-build.yml b/eng/pipelines/coreclr/templates/crossdac-build.yml index 99f04c82d17725..575e09f3c31b56 100644 --- a/eng/pipelines/coreclr/templates/crossdac-build.yml +++ b/eng/pipelines/coreclr/templates/crossdac-build.yml @@ -2,7 +2,6 @@ parameters: archType: '' osGroup: '' osSubgroup: '' - signCrossDac: false steps: # Always build the crossdac, that way we know in CI/PR if things break to build. @@ -31,23 +30,6 @@ steps: !**/sharedFramework/**/* TargetFolder: '$(buildMuslDacStagingPath)' - # Sign diagnostic files on Windows - - ${{ if eq(parameters.signCrossDac, true) }}: - - powershell: >- - eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 - /p:DiagnosticsFilesRoot="$(buildLinuxDacStagingPath)" - /p:SignDiagnostics=true - /p:DotNetSignType=$(SignType) - -projects $(Build.SourcesDirectory)\eng\empty.csproj - displayName: Sign Linux CrossDac - - powershell: >- - eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 - /p:DiagnosticsFilesRoot="$(buildMuslDacStagingPath)" - /p:SignDiagnostics=true - /p:DotNetSignType=$(SignType) - -projects $(Build.SourcesDirectory)\eng\empty.csproj - displayName: Sign Linux-musl CrossDac - - ${{ if eq(parameters.osGroup, 'Linux') }}: - task: CopyFiles@2 displayName: Gather runtime for CrossDac diff --git a/eng/pipelines/coreclr/templates/crossdac-pack.yml b/eng/pipelines/coreclr/templates/crossdac-pack.yml index f876a85d33febb..c782e363306f6d 100644 --- a/eng/pipelines/coreclr/templates/crossdac-pack.yml +++ b/eng/pipelines/coreclr/templates/crossdac-pack.yml @@ -42,6 +42,8 @@ jobs: value: '/p:OfficialBuildId=$(Build.BuildNumber)' - name: crossDacArgs value: '/p:CrossDacArtifactsDir=$(crossDacArtifactPath)/$(buildCrossDacArtifactName)' + - name: SignType + value: $[ coalesce(variables.OfficialSignType, 'real') ] - ${{ parameters.variables }} dependsOn: @@ -50,6 +52,19 @@ jobs: - ${{ parameters.runtimeFlavor }}_${{ parameters.runtimeVariant }}_product_build_${{ platform }}_${{ parameters.buildConfig }} steps: + # Install MicroBuild for signing the package + - ${{ if eq(parameters.isOfficialBuild, true) }}: + - template: /eng/pipelines/common/restore-internal-tools.yml + + - task: MicroBuildSigningPlugin@2 + displayName: Install MicroBuild plugin for Signing + inputs: + signType: $(SignType) + zipSources: false + feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + continueOnError: false + condition: and(succeeded(), in(variables['SignType'], 'real', 'test')) + - task: DownloadBuildArtifacts@0 displayName: Download CrossDac artifacts inputs: @@ -59,8 +74,18 @@ jobs: - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset crossdacpack -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) $(crossDacArgs) -ci displayName: Build crossdac packaging + # Sign diagnostic files + - ${{ if eq(parameters.isOfficialBuild, true) }}: + - powershell: >- + eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 + /p:PackagesFolder="$(Build.SourcesDirectory)/artifacts/packages/$(buildConfig)" + /p:SignDiagnosticsPackages=true + /p:DotNetSignType=$(SignType) + -projects $(Build.SourcesDirectory)\eng\empty.csproj + displayName: Sign CrossDac package and contents + # Save packages using the prepare-signed-artifacts format. - - template: /eng/pipelines/common/upload-unsigned-artifacts-step.yml + - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml parameters: name: ${{ parameters.platform }} diff --git a/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml b/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml index 884ca0177e7f81..30032b7da22eee 100644 --- a/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml +++ b/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml @@ -7,7 +7,7 @@ parameters: steps: # Upload build artifacts (packages) to pipeline only if official, to save storage space. - ${{ if eq(parameters.isOfficialBuild, true) }}: - - template: /eng/pipelines/common/upload-unsigned-artifacts-step.yml + - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml parameters: name: ${{ parameters.name }} diff --git a/eng/pipelines/libraries/build-job.yml b/eng/pipelines/libraries/build-job.yml index d21a511d148af5..c0dd92d3e0555c 100644 --- a/eng/pipelines/libraries/build-job.yml +++ b/eng/pipelines/libraries/build-job.yml @@ -129,7 +129,7 @@ jobs: # platform-specific jobs' nupkgs automatically flow through the matching platform-specific # Installer build, but AllConfigurations should only be uploaded once, here. - ${{ if eq(parameters.isOfficialAllConfigurations, true) }}: - - template: /eng/pipelines/common/upload-unsigned-artifacts-step.yml + - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml parameters: name: Libraries_AllConfigurations diff --git a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml index 121644bfaa6924..2a1a11339633da 100644 --- a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml +++ b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml @@ -37,9 +37,9 @@ jobs: in(variables['SignType'], 'real', 'test')) - task: DownloadBuildArtifacts@0 - displayName: Download IntermediateUnsignedArtifacts + displayName: Download IntermediateArtifacts inputs: - artifactName: IntermediateUnsignedArtifacts + artifactName: IntermediateArtifacts downloadPath: $(Build.SourcesDirectory)\artifacts\PackageDownload - script: >- diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 057dfd4635af9c..260a35e1c24144 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -72,7 +72,7 @@ stages: jobTemplate: /eng/pipelines/coreclr/templates/crossdac-pack.yml buildConfig: release platforms: - - Linux_musl_x64 + - windows_x64 jobParameters: isOfficialBuild: ${{ variables.isOfficialBuild }} crossDacPlatforms: @@ -120,7 +120,7 @@ stages: buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) nameSuffix: AllSubsets_Mono isOfficialBuild: ${{ variables.isOfficialBuild }} - extraStepsTemplate: /eng/pipelines/common/upload-unsigned-artifacts-step.yml + extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml extraStepsParameters: name: MonoRuntimePacks @@ -151,7 +151,7 @@ stages: nameSuffix: AllSubsets_Mono_LLVMJIT runtimeVariant: LLVMJIT isOfficialBuild: ${{ variables.isOfficialBuild }} - extraStepsTemplate: /eng/pipelines/common/upload-unsigned-artifacts-step.yml + extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml extraStepsParameters: name: MonoRuntimePacks #LLVMAOT @@ -164,7 +164,7 @@ stages: nameSuffix: AllSubsets_Mono_LLVMAOT runtimeVariant: LLVMAOT isOfficialBuild: ${{ variables.isOfficialBuild }} - extraStepsTemplate: /eng/pipelines/common/upload-unsigned-artifacts-step.yml + extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml extraStepsParameters: name: MonoRuntimePacks diff --git a/eng/pipelines/runtimelab.yml b/eng/pipelines/runtimelab.yml index dc205da3682b13..facd5bc264aedf 100644 --- a/eng/pipelines/runtimelab.yml +++ b/eng/pipelines/runtimelab.yml @@ -92,7 +92,7 @@ stages: extraStepsTemplate: /eng/pipelines/runtimelab/runtimelab-post-build-steps.yml extraStepsParameters: uploadLibrariesTests: ${{ eq(variables.isOfficialBuild, false) }} - uploadUnsignedArtifacts: false + uploadIntermediateArtifacts: false ${{ if eq(variables.isOfficialBuild, false) }}: buildArgs: -s clr+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true ${{ if eq(variables.isOfficialBuild, true) }}: @@ -115,7 +115,7 @@ stages: ${{ if eq(variables.isOfficialBuild, true) }}: extraStepsTemplate: /eng/pipelines/runtimelab/runtimelab-post-build-steps.yml extraStepsParameters: - uploadUnsignedArtifacts: true + uploadIntermediateArtifacts: true isOfficialBuild: true librariesBinArtifactName: libraries_bin_official_allconfigurations diff --git a/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml b/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml index 124b38f0819ea7..bd471c303b30df 100644 --- a/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml +++ b/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml @@ -9,7 +9,7 @@ parameters: isOfficialBuild: false uploadLibrariesTests: false uploadRuntimeTests: false - uploadUnsignedArtifacts: false + uploadIntermediateArtifacts: false steps: # Build coreclr native test output @@ -69,7 +69,7 @@ steps: displayName: Build Assets # Upload unsigned artifacts - - ${{ if eq(parameters.uploadUnsignedArtifacts, true) }}: - - template: /eng/pipelines/common/upload-unsigned-artifacts-step.yml + - ${{ if eq(parameters.uploadIntermediateArtifacts, true) }}: + - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml parameters: name: ${{ parameters.platform }}${{ parameters.nameSuffix }} diff --git a/src/installer/pkg/projects/Directory.Build.props b/src/installer/pkg/projects/Directory.Build.props index 9d6ae93d467c39..b9ad8328b4d290 100644 --- a/src/installer/pkg/projects/Directory.Build.props +++ b/src/installer/pkg/projects/Directory.Build.props @@ -1,6 +1,5 @@ - AnyCPU @@ -46,22 +45,9 @@ true - - NetCore - VS.Redist.Common - - - + - - - - @@ -168,5 +154,9 @@ $(PackageRID) + + + + diff --git a/src/installer/pkg/projects/Directory.Build.targets b/src/installer/pkg/projects/Directory.Build.targets index 383e5549c36e98..e29724f0f85eaf 100644 --- a/src/installer/pkg/projects/Directory.Build.targets +++ b/src/installer/pkg/projects/Directory.Build.targets @@ -1,32 +1,13 @@ - - - - - - $(Version) - true - - - - true - - - @@ -38,16 +19,6 @@ - - .Mono - - - .Mono.LLVM - - - .Mono.LLVM.AOT - - - + + + - + - - + + + + runtimes/$(PackageTargetRuntime)/native + + + tools + + + + + + + - - - + - - - - - + + + + + + + true - true + true - + runtimes/$(PackageTargetRuntime)/native true @@ -213,163 +199,6 @@ - - - - - - - - - - - - <_PkgProjDependencyWithoutTFM Include="@(PkgProjDependency)" Condition="'%(PkgProjDependency.TargetFramework)' == '' AND '%(PkgProjDependency.TargetRuntime)' == '' AND '%(PkgProjDependency.DoNotExpand)' != 'true'" /> - <_AllPkgProjTFMs Include="%(PkgProjDependency.TargetFramework)" Condition="'%(PkgProjDependency.DependencyKind)' == 'Direct'" /> - - - - - %(_AllPkgProjTFMs.Identity) - - - - - - - - - - - - - - - $(BuildTargetPath)$(Id).props - $(BuildTargetPath)$(Id.Replace('.Internal', '')).PlatformManifest.txt - - - - - - - - - - - - - - <_propsFileTemplateFile Condition="'%(_depprojDataFile.PropsFile)' == 'true'">%(_depprojDataFile.Identity) - - - - <_runtimeDependencyItems>@(RuntimeDependency) - <_filledPropsFileContent>$([System.IO.File]::ReadAllText('$(_propsFileTemplateFile)') - .Replace("__PackageId__", "$(Id.Replace('.', '_'))") - .Replace("__PreferredPackages__", "$(Id);$(_runtimeDependencyItems)")) - - - <_filledPropsFile>$(IntermediateOutputPath)$(MSBuildProjectName).props - - - - - - - - - - - - - <_platformManifestFileTemplateFile Condition="'%(_depprojDataFile.PlatformManifestFile)' == 'true'">%(_depprojDataFile.Identity) - - - - <_runtimeDependencyItems>@(RuntimeDependency) - <_filledPlatformManifestFileContent>$([System.IO.File]::ReadAllText('$(_platformManifestFileTemplateFile)') - .Replace("__PackageId__", "$(Id)")) - - - <_filledPlatformManifestFile>$(IntermediateOutputPath)PlatformManifest.txt - - - - - - - - - - - - FrameworkList.xml - $(IntermediateOutputPath)$(FrameworkListFilename) - - - - - - - - - - - - - - - - $(FrameworkListTargetPath) - - - - - - - - - - - - - diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj index 50aa1919abb0c5..000ba4fe483997 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj @@ -4,7 +4,6 @@ HostVersion dotnet-host - true diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.pkgproj b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.pkgproj index 203b5dcaebef3e..06f4c389123734 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.pkgproj +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.pkgproj @@ -2,7 +2,6 @@ HostPolicyVersion - true diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.pkgproj b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.pkgproj index 58653556eef241..5a49dbb69b2260 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.pkgproj +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.pkgproj @@ -4,7 +4,6 @@ HostResolverVersion dotnet-hostfxr - true diff --git a/src/installer/pkg/projects/host-packages.proj b/src/installer/pkg/projects/host-packages.proj new file mode 100644 index 00000000000000..86981092e730e0 --- /dev/null +++ b/src/installer/pkg/projects/host-packages.proj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/installer/publish/prepare-artifacts.proj b/src/installer/publish/prepare-artifacts.proj index a2643b27131f7d..4a5ff2ddd3cd01 100644 --- a/src/installer/publish/prepare-artifacts.proj +++ b/src/installer/publish/prepare-artifacts.proj @@ -56,15 +56,6 @@ - - - - - @@ -152,7 +143,6 @@ diff --git a/src/installer/signing/Directory.Build.props b/src/installer/signing/Directory.Build.props deleted file mode 100644 index 7c45d0300be126..00000000000000 --- a/src/installer/signing/Directory.Build.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - $(NetCoreAppCurrent) - - - true - - diff --git a/src/installer/signing/Directory.Build.targets b/src/installer/signing/Directory.Build.targets deleted file mode 100644 index 7d95c6c7b7f9d9..00000000000000 --- a/src/installer/signing/Directory.Build.targets +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - $([System.DateTime]::UtcNow) - - - - - - - $([System.DateTime]::UtcNow.Subtract($([System.DateTime]::Parse('$(SignStartTime)')))) - - - - - - - - - - - diff --git a/src/installer/signing/SignBinaries.proj b/src/installer/signing/SignBinaries.proj deleted file mode 100644 index 8b1f6811f442f4..00000000000000 --- a/src/installer/signing/SignBinaries.proj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/installer/signing/SignBurnBundleFiles.proj b/src/installer/signing/SignBurnBundleFiles.proj deleted file mode 100644 index 55c7a8c5810de0..00000000000000 --- a/src/installer/signing/SignBurnBundleFiles.proj +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/src/installer/signing/SignBurnEngineFiles.proj b/src/installer/signing/SignBurnEngineFiles.proj deleted file mode 100644 index 382eb202318fb5..00000000000000 --- a/src/installer/signing/SignBurnEngineFiles.proj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/installer/signing/SignFinalPackages.proj b/src/installer/signing/SignFinalPackages.proj deleted file mode 100644 index 35e3d8428b7cfc..00000000000000 --- a/src/installer/signing/SignFinalPackages.proj +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/installer/signing/SignMsiFiles.proj b/src/installer/signing/SignMsiFiles.proj deleted file mode 100644 index 55dd18dca67327..00000000000000 --- a/src/installer/signing/SignMsiFiles.proj +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/installer/signing/SignR2RBinaries.proj b/src/installer/signing/SignR2RBinaries.proj deleted file mode 100644 index f2f60ef725faac..00000000000000 --- a/src/installer/signing/SignR2RBinaries.proj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -