# Pipeline: https://dnceng.visualstudio.com/internal/_build?definitionId=286 trigger: batch: true branches: include: - main - master - release/* - internal/release/* variables: # Loose Variables - name: _PublishUsingPipelines value: false - ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}: - name: PostBuildSign value: false - ${{ else }}: - name: PostBuildSign value: true - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - name: Codeql.Enabled value: true - group: DotNet-DotNetCli-Storage - group: DotNet-Installer-SDLValidation-Params - name: _PublishUsingPipelines value: true - 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) # Only used for tracking purposes in MicroBuild tasks. # See: https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/650/MicroBuild-Signing?anchor=high-level-steps-to-enable-signing - name: TeamName value: DotNetCLI # Variable Groups - group: DotNetBuilds storage account read tokens # Variable Templates - template: /eng/common/templates-official/variables/pool-providers.yml resources: repositories: - repository: MicroBuildTemplate type: git name: 1ESPipelineTemplates/MicroBuildTemplate ref: refs/tags/release containers: - container: MuslArm image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm-alpine - container: MuslX64 image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode - container: PortableDeb image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg - container: PortableRpm image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm extends: template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate parameters: sdl: sourceAnalysisPool: name: $(DncEngInternalBuildPool) image: 1es-windows-2022-pt os: windows # TODO: Temporary # https://docs.opensource.microsoft.com/tools/cg/component-detection/variables/ componentgovernance: failOnAlert: false alertWarningLevel: Never ignoreDirectories: '.packages' customBuildTags: - ES365AIMigrationTooling stages: - stage: Build jobs: # Build Retry Configuration - job: Publish_Build_Configuration pool: name: $(DncEngInternalBuildPool) image: 1es-windows-2022-pt os: windows steps: - task: 1ES.PublishPipelineArtifact@1 displayName: Publish Build Config inputs: targetPath: $(Build.SourcesDirectory)\eng\buildConfiguration artifactName: buildConfiguration # 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: MuslArm 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: MuslX64 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: PortableDeb 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: PortableRpm 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: PortableRpm 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 - 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 - 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 - stage: Publish dependsOn: - Build jobs: - template: /eng/common/templates-official/job/publish-build-assets.yml@self parameters: publishUsingPipelines: true publishAssetsImmediately: true pool: ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2022.amd64