diff --git a/.vsts-ci.yml b/.vsts-ci.yml index d14d1293e..4c70535d7 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -1,3 +1,5 @@ +# Pipeline: https://dnceng.visualstudio.com/internal/_build?definitionId=286 + trigger: batch: true branches: @@ -23,339 +25,370 @@ variables: - group: DotNet-Installer-SDLValidation-Params - name: _PublishUsingPipelines value: true - - name: _InternalRuntimeDownloadArgs value: '' - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs 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) - - template: /eng/common/templates/variables/pool-providers.yml +# Set the MicroBuild plugin installation directory to the agent temp directory to avoid SDL tool scanning. +- name: MicroBuildOutputFolderOverride + value: $(Agent.TempDirectory) -stages: -- stage: Build - jobs: - # This job is for build retry configuration. - - job: Publish_Build_Configuration - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2022preview.amd64.open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: +resources: + repositories: + - repository: 1esPipelines + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +extends: + ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines + ${{ else }}: + template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines + parameters: + containers: + alpine315WithNode: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-WithNode + cblMariner20Fpm: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm + centosStream8: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8 + debianStretch: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch + fedora36: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36 + ubuntu2204: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04 + ubuntu1804Cross: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross + ubuntu2204DebPkg: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg + sdl: + sourceAnalysisPool: name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2022preview.amd64 - steps: - - publish: $(Build.SourcesDirectory)\eng\buildConfiguration - artifact: buildConfiguration - displayName: Publish Build Config - - ## PR-only jobs - - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - - ## Windows - - - template: eng/build.yml - parameters: - agentOs: Windows_NT - jobName: Build_Debug_x64 - buildConfiguration: Debug - buildArchitecture: x64 - additionalBuildParameters: '/p:PublishInternalAsset=true' - runTests: true - - ## Linux - - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Ubuntu_22_04_Debug_x64 - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04' - buildConfiguration: Debug - buildArchitecture: x64 - linuxPortable: true - runTests: true - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Fedora_36_Debug_x64 - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36' - buildConfiguration: Debug - buildArchitecture: x64 - linuxPortable: true - runTests: true - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_CentOS_8_Stream_Debug_x64 - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' - buildConfiguration: Debug - buildArchitecture: x64 - linuxPortable: false - runTests: true - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Debian_Stretch_Debug_x64 - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch' - buildConfiguration: Debug - buildArchitecture: x64 - additionalBuildParameters: '/p:BuildSdkDeb=true' - linuxPortable: false - runTests: true - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Arm64_Debug - buildConfiguration: Debug - buildArchitecture: arm64 - runtimeIdentifier: 'linux-arm64' - linuxPortable: true - # Never run tests on arm64 - runTests: false - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Linux_musl_Debug_x64 - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-WithNode' - buildConfiguration: Debug - buildArchitecture: x64 - runtimeIdentifier: 'linux-musl-x64' - # Pass in HostOSName when running on alpine - additionalBuildParameters: '/p:HostOSName="linux-musl"' - linuxPortable: false - runTests: true - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_LinuxPortable_Release_x64 - buildConfiguration: Release - buildArchitecture: x64 - linuxPortable: true - runTests: true - - # MacOS - - - template: eng/build.yml - parameters: - agentOs: Darwin - jobName: Build_Release_x64 - buildConfiguration: Release - buildArchitecture: x64 - runTests: true - - ## Official/PGO instrumentation Builds - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ## Windows - - - template: eng/build.yml - parameters: - agentOs: Windows_NT - jobName: Build_Release_x64 - buildConfiguration: Release - buildArchitecture: x64 - additionalBuildParameters: '/p:PublishInternalAsset=true' - runTests: false - - template: eng/build.yml - parameters: - agentOs: Windows_NT - jobName: Build_Release_x86 - buildConfiguration: Release - buildArchitecture: x86 - runTests: false - - template: eng/build.yml - parameters: - agentOs: Windows_NT - jobName: Build_Release_arm64 - buildConfiguration: Release - buildArchitecture: arm64 - runTests: false - - ## Linux - - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Arm_Release - buildConfiguration: Release - buildArchitecture: arm - runtimeIdentifier: 'linux-arm' - linuxPortable: true - runTests: false - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Arm64_Release - buildConfiguration: Release - buildArchitecture: arm64 - runtimeIdentifier: 'linux-arm64' - linuxPortable: true - runTests: false - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Linux_musl_Release_arm - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross' - buildConfiguration: Release - buildArchitecture: arm - runtimeIdentifier: 'linux-musl-arm' - additionalBuildParameters: '/p:OSName="linux-musl"' - linuxPortable: false - runTests: false - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Linux_musl_Release_arm64 - buildConfiguration: Release - buildArchitecture: arm64 - runtimeIdentifier: 'linux-musl-arm64' - additionalBuildParameters: '/p:OSName="linux-musl"' - linuxPortable: false - runTests: false - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Linux_musl_Release_x64 - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-WithNode' - buildConfiguration: Release - buildArchitecture: x64 - runtimeIdentifier: 'linux-musl-x64' - # Pass in HostOSName when running on alpine - additionalBuildParameters: '/p:HostOSName="linux-musl"' - linuxPortable: false - runTests: false - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Linux_Portable_Deb_Release_x64 - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg' - buildConfiguration: Release - buildArchitecture: x64 - # Do not publish zips and tarballs. The linux-x64 binaries are - # already published by Build_LinuxPortable_Release_x64 - additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true' - linuxPortable: true - runTests: false - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Linux_Portable_Rpm_Release_x64 - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm' - buildConfiguration: Release - buildArchitecture: x64 - # Do not publish zips and tarballs. The linux-x64 binaries are - # already published by Build_LinuxPortable_Release_x64 - additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:IsRPMBasedDistro=true' - linuxPortable: true - runTests: false - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_Linux_Portable_Rpm_Release_Arm64 - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm' - buildConfiguration: Release - buildArchitecture: arm64 - runtimeIdentifier: 'linux-arm64' - # Do not publish zips and tarballs. The linux-x64 binaries are - # already published by Build_LinuxPortable_Release_x64 - additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true /p:IsRPMBasedDistro=true' - linuxPortable: true - runTests: false - - template: eng/build.yml - parameters: - agentOs: Linux - jobName: Build_LinuxPortable_Release_x64 - buildConfiguration: Release - buildArchitecture: x64 - linuxPortable: true - runTests: false - - # MacOS - - - template: eng/build.yml - parameters: - agentOs: Darwin - jobName: Build_Release_x64 - buildConfiguration: Release - buildArchitecture: x64 - runTests: false - - template: eng/build.yml - parameters: - agentOs: Darwin - jobName: Build_Release_arm64 - runtimeIdentifier: 'osx-arm64' - buildConfiguration: Release - buildArchitecture: arm64 - runTests: false - - ## Windows PGO Instrumentation builds - - - template: eng/build.yml - parameters: - agentOs: Windows_NT - pgoInstrument: true - jobName: Build_Release_x64 - buildConfiguration: Release - buildArchitecture: x64 - additionalBuildParameters: '/p:PublishInternalAsset=true' - runTests: false - - template: eng/build.yml - parameters: - agentOs: Windows_NT - pgoInstrument: true - jobName: Build_Release_x86 - buildConfiguration: Release - buildArchitecture: x86 - runTests: false - - template: eng/build.yml - parameters: - agentOs: Windows_NT - pgoInstrument: true - jobName: Build_Release_arm64 - buildConfiguration: Release - buildArchitecture: arm64 - runTests: false - - ## Linux PGO Instrumentation builds - - - template: eng/build.yml - parameters: - agentOs: Linux - pgoInstrument: true - jobName: Build_LinuxPortable_Release_x64 - buildConfiguration: Release - buildArchitecture: x64 - linuxPortable: true - runTests: false - - - template: eng/build.yml - parameters: - agentOs: Linux - pgoInstrument: true - jobName: Build_Release_arm64 - buildConfiguration: Release - buildArchitecture: arm64 - linuxPortable: true - runTests: false - - - template: /eng/common/templates/jobs/source-build.yml - -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - stage: Publish - dependsOn: - - Build - jobs: - - template: /eng/common/templates/job/publish-build-assets.yml - parameters: - publishUsingPipelines: true - publishAssetsImmediately: true + image: 1es-windows-2022 + os: windows + # Temporary to workaround MicroBuild issues. + credscan: + enabled: false + justificationForDisabling: 'CredScan is failing on the MicroBuild signing plugin. "MicroBuild/Plugins/nuget.config" has changing content and thus cannot be baselined.' + stages: + - stage: Build + jobs: + # Build Retry Configuration + - job: Publish_Build_Configuration pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + image: 1es-windows-2022-open + os: windows ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2022.amd64 + image: 1es-windows-2022 + os: windows + steps: + - task: 1ES.PublishPipelineArtifact@1 + displayName: Publish Build Config + inputs: + targetPath: $(Build.SourcesDirectory)\eng\buildConfiguration + artifactName: buildConfiguration + + # PR-only jobs + - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: + # Windows + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + jobName: Build_Debug_x64 + buildConfiguration: Debug + buildArchitecture: x64 + additionalBuildParameters: '/p:PublishInternalAsset=true' + runTests: true + + # Linux + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Ubuntu_22_04_Debug_x64 + container: ubuntu2204 + buildConfiguration: Debug + buildArchitecture: x64 + linuxPortable: true + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Fedora_36_Debug_x64 + container: fedora36 + buildConfiguration: Debug + buildArchitecture: x64 + linuxPortable: true + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_CentOS_8_Stream_Debug_x64 + container: centosStream8 + buildConfiguration: Debug + buildArchitecture: x64 + linuxPortable: false + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Debian_Stretch_Debug_x64 + container: debianStretch + buildConfiguration: Debug + buildArchitecture: x64 + additionalBuildParameters: '/p:BuildSdkDeb=true' + linuxPortable: false + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Arm64_Debug + buildConfiguration: Debug + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + linuxPortable: true + # Never run tests on arm64 + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Debug_x64 + container: alpine315WithNode + buildConfiguration: Debug + buildArchitecture: x64 + runtimeIdentifier: 'linux-musl-x64' + # Pass in HostOSName when running on alpine + additionalBuildParameters: '/p:HostOSName="linux-musl"' + linuxPortable: false + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_LinuxPortable_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + linuxPortable: true + runTests: true + + # MacOS + - template: eng/build.yml@self + parameters: + agentOs: Darwin + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + runTests: true + + # Official/PGO instrumentation Builds + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + # Windows + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + additionalBuildParameters: '/p:PublishInternalAsset=true' + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + jobName: Build_Release_x86 + buildConfiguration: Release + buildArchitecture: x86 + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + jobName: Build_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + runTests: false + + # Linux + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Arm_Release + buildConfiguration: Release + buildArchitecture: arm + runtimeIdentifier: 'linux-arm' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Arm64_Release + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Release_arm + container: ubuntu1804Cross + buildConfiguration: Release + buildArchitecture: arm + runtimeIdentifier: 'linux-musl-arm' + additionalBuildParameters: '/p:OSName="linux-musl"' + linuxPortable: false + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-musl-arm64' + additionalBuildParameters: '/p:OSName="linux-musl"' + linuxPortable: false + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Release_x64 + container: alpine315WithNode + buildConfiguration: Release + buildArchitecture: x64 + runtimeIdentifier: 'linux-musl-x64' + # Pass in HostOSName when running on alpine + additionalBuildParameters: '/p:HostOSName="linux-musl"' + linuxPortable: false + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_Portable_Deb_Release_x64 + container: ubuntu2204DebPkg + buildConfiguration: Release + buildArchitecture: x64 + # Do not publish zips and tarballs. The linux-x64 binaries are + # already published by Build_LinuxPortable_Release_x64 + additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_Portable_Rpm_Release_x64 + container: cblMariner20Fpm + buildConfiguration: Release + buildArchitecture: x64 + # Do not publish zips and tarballs. The linux-x64 binaries are + # already published by Build_LinuxPortable_Release_x64 + additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:IsRPMBasedDistro=true' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_Portable_Rpm_Release_Arm64 + container: cblMariner20Fpm + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + # Do not publish zips and tarballs. The linux-x64 binaries are + # already published by Build_LinuxPortable_Release_x64 + additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true /p:IsRPMBasedDistro=true' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_LinuxPortable_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + linuxPortable: true + runTests: false + + # MacOS + - template: eng/build.yml@self + parameters: + agentOs: Darwin + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Darwin + jobName: Build_Release_arm64 + runtimeIdentifier: 'osx-arm64' + buildConfiguration: Release + buildArchitecture: arm64 + runTests: false + + # Windows PGO Instrumentation builds + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + pgoInstrument: true + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + additionalBuildParameters: '/p:PublishInternalAsset=true' + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + pgoInstrument: true + jobName: Build_Release_x86 + buildConfiguration: Release + buildArchitecture: x86 + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + pgoInstrument: true + jobName: Build_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + runTests: false + + # Linux PGO Instrumentation builds + - template: eng/build.yml@self + parameters: + agentOs: Linux + pgoInstrument: true + jobName: Build_LinuxPortable_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + pgoInstrument: true + jobName: Build_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + linuxPortable: true + runTests: false + + # Source Build + - template: /eng/common/templates-official/jobs/source-build.yml@self + + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - stage: Publish + dependsOn: + - Build + jobs: + - template: /eng/common/templates-official/job/publish-build-assets.yml@self + parameters: + publishUsingPipelines: true + publishAssetsImmediately: true + pool: + name: $(DncEngInternalBuildPool) + image: 1es-windows-2022 + os: windows diff --git a/.vsts-pr.yml b/.vsts-pr.yml index d14d1293e..f5c697bab 100644 --- a/.vsts-pr.yml +++ b/.vsts-pr.yml @@ -59,7 +59,7 @@ stages: ## Windows - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Windows_NT jobName: Build_Debug_x64 @@ -70,7 +70,7 @@ stages: ## Linux - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Ubuntu_22_04_Debug_x64 @@ -79,7 +79,7 @@ stages: buildArchitecture: x64 linuxPortable: true runTests: true - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Fedora_36_Debug_x64 @@ -88,7 +88,7 @@ stages: buildArchitecture: x64 linuxPortable: true runTests: true - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_CentOS_8_Stream_Debug_x64 @@ -97,7 +97,7 @@ stages: buildArchitecture: x64 linuxPortable: false runTests: true - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Debian_Stretch_Debug_x64 @@ -107,7 +107,7 @@ stages: additionalBuildParameters: '/p:BuildSdkDeb=true' linuxPortable: false runTests: true - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Arm64_Debug @@ -117,7 +117,7 @@ stages: linuxPortable: true # Never run tests on arm64 runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Linux_musl_Debug_x64 @@ -129,7 +129,7 @@ stages: additionalBuildParameters: '/p:HostOSName="linux-musl"' linuxPortable: false runTests: true - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_LinuxPortable_Release_x64 @@ -140,7 +140,7 @@ stages: # MacOS - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Darwin jobName: Build_Release_x64 @@ -154,7 +154,7 @@ stages: ## Windows - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Windows_NT jobName: Build_Release_x64 @@ -162,14 +162,14 @@ stages: buildArchitecture: x64 additionalBuildParameters: '/p:PublishInternalAsset=true' runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Windows_NT jobName: Build_Release_x86 buildConfiguration: Release buildArchitecture: x86 runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Windows_NT jobName: Build_Release_arm64 @@ -179,7 +179,7 @@ stages: ## Linux - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Arm_Release @@ -188,7 +188,7 @@ stages: runtimeIdentifier: 'linux-arm' linuxPortable: true runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Arm64_Release @@ -197,7 +197,7 @@ stages: runtimeIdentifier: 'linux-arm64' linuxPortable: true runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Linux_musl_Release_arm @@ -208,7 +208,7 @@ stages: additionalBuildParameters: '/p:OSName="linux-musl"' linuxPortable: false runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Linux_musl_Release_arm64 @@ -218,7 +218,7 @@ stages: additionalBuildParameters: '/p:OSName="linux-musl"' linuxPortable: false runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Linux_musl_Release_x64 @@ -230,7 +230,7 @@ stages: additionalBuildParameters: '/p:HostOSName="linux-musl"' linuxPortable: false runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Linux_Portable_Deb_Release_x64 @@ -242,7 +242,7 @@ stages: additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true' linuxPortable: true runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Linux_Portable_Rpm_Release_x64 @@ -254,7 +254,7 @@ stages: additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:IsRPMBasedDistro=true' linuxPortable: true runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_Linux_Portable_Rpm_Release_Arm64 @@ -267,7 +267,7 @@ stages: additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true /p:IsRPMBasedDistro=true' linuxPortable: true runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux jobName: Build_LinuxPortable_Release_x64 @@ -278,14 +278,14 @@ stages: # MacOS - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Darwin jobName: Build_Release_x64 buildConfiguration: Release buildArchitecture: x64 runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Darwin jobName: Build_Release_arm64 @@ -296,7 +296,7 @@ stages: ## Windows PGO Instrumentation builds - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Windows_NT pgoInstrument: true @@ -305,7 +305,7 @@ stages: buildArchitecture: x64 additionalBuildParameters: '/p:PublishInternalAsset=true' runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Windows_NT pgoInstrument: true @@ -313,7 +313,7 @@ stages: buildConfiguration: Release buildArchitecture: x86 runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Windows_NT pgoInstrument: true @@ -324,7 +324,7 @@ stages: ## Linux PGO Instrumentation builds - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux pgoInstrument: true @@ -334,7 +334,7 @@ stages: linuxPortable: true runTests: false - - template: eng/build.yml + - template: eng/build-pr.yml parameters: agentOs: Linux pgoInstrument: true diff --git a/NuGet.config b/NuGet.config index da45fdba4..341157ce4 100644 --- a/NuGet.config +++ b/NuGet.config @@ -28,7 +28,6 @@ - diff --git a/eng/Signing.props b/eng/Signing.props index 0d49f78d1..852eea4b0 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -39,12 +39,6 @@ - - - - - - - - 1.0.2-beta4.22406.1 - 1.0.2-beta4.22406.1 - 1.1.0-rc.22558.1 - 1.1.0-rc.23410.2 1.1.0-rc.23410.2 1.1.0-rc.23410.2 1.1.0-rc.23410.2 @@ -160,14 +154,10 @@ - 5.0.403 6.0.302 7.0.100 - 5.0.17 6.0.14 7.0.3 - 5.0.17-servicing.22215.4 - 5.0.17-servicing.22218.2 6.0.7-servicing.22322.3 6.0.7-servicing.22322.2 7.0.0-rtm.22518.7 @@ -203,33 +193,6 @@ $(MicrosoftDotNetCommonItemTemplates60PackageVersion) $(MicrosoftDotNetCommonItemTemplates60PackageVersion) 6.0.$(AspNetCoreTemplateFeature60) - - $(MicrosoftWinFormsProjectTemplates50PackageVersion) - $(MicrosoftWPFProjectTemplates50PackageVersion) - $(NUnit3DotNetNewTemplatePackageVersion) - $(MicrosoftDotNetCommonItemTemplates50PackageVersion) - $(MicrosoftDotNetCommonItemTemplates50PackageVersion) - 5.0.17 - - 4.8.1-servicing.19605.5 - 3.1.2-servicing.20066.4 - 1.7.2 - 3.1.27 - $(MicrosoftDotNetCommonItemTemplates31PackageVersion) - 3.1.32 - 3.2.1 - - 4.8.0-rc2.19462.10 - 3.0.0 - 1.6.5 - 2.0.0-preview8.19373.1 - $(MicrosoftDotNetCommonItemTemplates30PackageVersion) - 3.0.3 - - 1.5.3 - 1.0.2-beta3 - $(MicrosoftDotNetCommonItemTemplates21PackageVersion) - 2.1.34 diff --git a/eng/build-pr.yml b/eng/build-pr.yml new file mode 100644 index 000000000..831d96781 --- /dev/null +++ b/eng/build-pr.yml @@ -0,0 +1,261 @@ +parameters: +# Agent OS identifier and used as job name +- name: agentOs + type: string + +# Job name +- name: jobName + type: string + +# Container to run the build in, if any +- name: container + type: string + default: '' + +# Job timeout +- name: timeoutInMinutes + type: number + default: 180 + +# Build configuration (Debug, Release) +- name: buildConfiguration + type: string + values: + - Debug + - Release + +# Build architecture +- name: buildArchitecture + type: string + values: + - arm + - arm64 + - x64 + - x86 + +# Linux portable. If true, passes portable switch to build +- name: linuxPortable + type: boolean + default: false + +# Runtime Identifier +- name: runtimeIdentifier + type: string + default: '' + +# UI lang +- name: dotnetCLIUILanguage + type: string + default: '' + +# Additional parameters +- name: additionalBuildParameters + type: string + default: '' + +# Run tests +- name: runTests + type: boolean + default: true + +# PGO instrumentation jobs +- name: pgoInstrument + type: boolean + default: false + +- name: isBuiltFromVmr + displayName: True when build is running from dotnet/dotnet + type: boolean + default: false + +jobs: +- template: common/templates/job/job.yml + parameters: + # Set up the name of the job. + ${{ if parameters.pgoInstrument }}: + name: PGO_${{ parameters.agentOs }}_${{ parameters.jobName }} + ${{ if not(parameters.pgoInstrument) }}: + name: ${{ parameters.agentOs }}_${{ parameters.jobName }} + + # Set up the pool/machine info to be used based on the Agent OS + ${{ if eq(parameters.agentOs, 'Windows_NT') }}: + enableMicrobuild: true + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals windows.vs2019.amd64.open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals windows.vs2019.amd64 + ${{ if eq(parameters.agentOs, 'Linux') }}: + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + container: ${{ parameters.container }} + ${{ if eq(parameters.agentOs, 'Darwin') }}: + pool: + vmImage: 'macOS-latest' + + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + ${{ if parameters.isBuiltFromVmr }}: + enableSbom: false + ${{ else }}: + enablePublishBuildAssets: true + enablePublishUsingPipelines: true + enableTelemetry: true + helixRepo: dotnet/installer + workspace: + clean: all + + variables: + # Test variables + - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: + - _PackArg: '-pack' + - ${{ if parameters.runTests }}: + - _TestArg: '-test' + - ${{ else }}: + - _TestArg: '' + - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: + - _PackArg: '--pack' + - ${{ if parameters.runTests }}: + - _TestArg: '--test' + - ${{ else }}: + - _TestArg: '' + + - ${{ if parameters.pgoInstrument }}: + - _PgoInstrument: '/p:PgoInstrument=true' + - _PackArg: '' + - ${{ else }}: + - _PgoInstrument: '' + + - ${{ if parameters.linuxPortable }}: + - _LinuxPortable: '--linux-portable' + - ${{ else }}: + - _LinuxPortable: '' + + - ${{ if ne(parameters.runtimeIdentifier, '') }}: + - _RuntimeIdentifier: '--runtime-id ${{ parameters.runtimeIdentifier }}' + - ${{ else }}: + - _RuntimeIdentifier: '' + + - _AgentOSName: ${{ parameters.agentOs }} + - _TeamName: Roslyn-Project-System + - _SignType: test + - _BuildArgs: '/p:DotNetSignType=$(_SignType) $(_PgoInstrument)' + + - ${{ if parameters.isBuiltFromVmr }}: + - installerRoot: '$(Build.SourcesDirectory)/src/installer' + - _SignType: test + - _PushToVSFeed: false + - _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:TeamName=$(_TeamName) + /p:DotNetPublishUsingPipelines=true + /p:PublishToSymbolServer=false + $(_PgoInstrument) + - ${{ else }}: + - installerRoot: '$(Build.SourcesDirectory)' + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - group: DotNet-HelixApi-Access + - _PushToVSFeed: true + - _SignType: real + - _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:DotNetSignType=$(_SignType) + /p:TeamName=$(_TeamName) + /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) + $(_PgoInstrument) + + - template: /eng/common/templates/variables/pool-providers.yml + + steps: + - checkout: self + clean: true + - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: + - ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(installerRoot)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(installerRoot)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - script: $(installerRoot)/build.cmd + $(_TestArg) $(_PackArg) + -publish -ci -sign + -Configuration ${{ parameters.buildConfiguration }} + -Architecture ${{ parameters.buildArchitecture }} + $(_BuildArgs) + ${{ parameters.additionalBuildParameters }} + $(_InternalRuntimeDownloadArgs) + displayName: Build + env: + DOTNET_CLI_UI_LANGUAGE: ${{ parameters.dotnetCLIUILanguage }} + + - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: + - ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(installerRoot)/eng/common/SetupNugetSources.sh + arguments: $(installerRoot)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - ${{ if eq(parameters.agentOs, 'Linux') }}: + - script: $(installerRoot)/build.sh + $(_TestArg) $(_PackArg) + --publish --ci + --noprettyprint + --configuration ${{ parameters.buildConfiguration }} + --architecture ${{ parameters.buildArchitecture }} + $(_LinuxPortable) + $(_RuntimeIdentifier) + $(_BuildArgs) + ${{ parameters.additionalBuildParameters }} + $(_InternalRuntimeDownloadArgs) + displayName: Build + + - ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}: + - script: $(installerRoot)/build.sh + $(_TestArg) + --pack --publish --ci + --noprettyprint + --configuration ${{ parameters.buildConfiguration }} + --architecture ${{ parameters.buildArchitecture }} + $(_RuntimeIdentifier) + $(_BuildArgs) + ${{ parameters.additionalBuildParameters }} + $(_InternalRuntimeDownloadArgs) + displayName: Build + + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testRunner: XUnit + testResultsFiles: 'artifacts/TestResults/${{ parameters.buildConfiguration }}/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + platform: '$(BuildPlatform)' + configuration: '${{ parameters.buildConfiguration }}' + condition: ne(variables['_TestArg'], '') + + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(installerRoot)/artifacts' + Contents: | + log/${{ parameters.buildConfiguration }}/**/* + TestResults/${{ parameters.buildConfiguration }}/**/* + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true + condition: always() + + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true + condition: always() diff --git a/eng/build.yml b/eng/build.yml index ea389797c..4f947ea8f 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -1,9 +1,9 @@ parameters: - # Agent OS identifier and used as job name +# Agent OS identifier and used as job name - name: agentOs type: string - # Job name +# Job name - name: jobName type: string @@ -12,7 +12,7 @@ parameters: type: string default: '' - # Job timeout +# Job timeout - name: timeoutInMinutes type: number default: 180 @@ -69,36 +69,42 @@ parameters: default: false jobs: -- template: common/templates/job/job.yml +- template: common/templates-official/job/job.yml parameters: # Set up the name of the job. ${{ if parameters.pgoInstrument }}: name: PGO_${{ parameters.agentOs }}_${{ parameters.jobName }} ${{ if not(parameters.pgoInstrument) }}: name: ${{ parameters.agentOs }}_${{ parameters.jobName }} - - ## Set up the pool/machine info to be used based on the Agent OS + + # Set up the pool/machine info to be used based on the Agent OS ${{ if eq(parameters.agentOs, 'Windows_NT') }}: enableMicrobuild: true pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64.open + image: 1es-windows-2019-open + os: windows ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 + image: 1es-windows-2019 + os: windows ${{ if eq(parameters.agentOs, 'Linux') }}: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + image: 1es-ubuntu-2004-open + os: linux ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + image: 1es-ubuntu-2004 + os: linux container: ${{ parameters.container }} ${{ if eq(parameters.agentOs, 'Darwin') }}: pool: - vmImage: 'macOS-latest' + name: Azure Pipelines + image: macOS-latest + os: macOS timeoutInMinutes: ${{ parameters.timeoutInMinutes }} ${{ if parameters.isBuiltFromVmr }}: @@ -111,8 +117,8 @@ jobs: workspace: clean: all -# Test parameters variables: + # Test variables - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - _PackArg: '-pack' - ${{ if parameters.runTests }}: @@ -168,7 +174,7 @@ jobs: /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) $(_PgoInstrument) - - template: /eng/common/templates/variables/pool-providers.yml + - template: /eng/common/templates-official/variables/pool-providers.yml steps: - checkout: self @@ -245,13 +251,13 @@ jobs: inputs: SourceFolder: '$(installerRoot)/artifacts' Contents: | - log/${{ parameters.buildConfiguration }}/**/* - TestResults/${{ parameters.buildConfiguration }}/**/* + log/${{ parameters.buildConfiguration }}/**/* + TestResults/${{ parameters.buildConfiguration }}/**/* TargetFolder: '$(Build.ArtifactStagingDirectory)' continueOnError: true condition: always() - - task: PublishBuildArtifacts@1 + - task: 1ES.PublishBuildArtifacts@1 displayName: Publish Logs to VSTS inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' diff --git a/src/redist/targets/BundledTemplates.targets b/src/redist/targets/BundledTemplates.targets index 4ab2c37a7..fab8b99fa 100644 --- a/src/redist/targets/BundledTemplates.targets +++ b/src/redist/targets/BundledTemplates.targets @@ -58,52 +58,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -111,10 +65,6 @@ - - - -