parameters: # Agent OS identifier and used as job name agentOs: '' # Agent pool pool: {} # Additional variables variables: {} # Build strategy - matrix strategy: {} # Job timeout timeoutInMinutes: 180 phases: - template: /eng/common/templates/job/job.yml parameters: name: ${{ parameters.agentOs }} ${{ if eq(parameters.agentOs, 'Windows_NT') }}: enableMicrobuild: true enablePublishBuildArtifacts: true enablePublishBuildAssets: true enablePublishTestResults: true enableTelemetry: true helixRepo: dotnet/core-sdk pool: ${{ parameters.pool }} ${{ if ne(parameters.strategy, '') }}: strategy: ${{ parameters.strategy }} variables: - _TeamName: Roslyn-Project-System - _BuildArgs: '' - _SignType: test - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-Symbol-Server-PATs - group: DotNet-HelixApi-Access - _DotNetPublishToBlobFeed: true - _SignType: real - _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed) /p:DotnetPublishSdkAssetsBlobFeedUrl=$(_PublishBlobFeedUrl) /p:DotNetPublishSdkAssetsBlobFeedKey=$(dotnetcli-storage-key) /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) /p:PB_PublishType=blob /p:DotnetPublishChecksumsBlobFeedUrl=$(_PublishChecksumsBlobFeedUrl) /p:DotNetPublishChecksumsBlobFeedKey=$(dotnetclichecksums-storage-key) /p:DotNetSignType=real /p:TeamName=$(_TeamName) steps: - checkout: self clean: true - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - script: 'eng\setbuildinfo.bat $(_BuildArchitecture) $(_BuildConfig)' displayName: Set test info (Windows) - script: build.cmd $(TestParameter) -pack -publish -ci -Configuration $(_BuildConfig) -Architecture $(_BuildArchitecture) $(_BuildArgs) $(SignBuildParameters) $(_AdditionalBuildParameters) displayName: Build env: DOTNET_CLI_UI_LANGUAGE: $(_DOTNET_CLI_UI_LANGUAGE) DropSuffix: $(_DropSuffix) - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: - script: 'eng/setbuildinfo.sh $(_BuildArchitecture) $(_BuildConfig)' displayName: Set test info (Non-Windows) - ${{ if eq(parameters.agentOs, 'Linux') }}: - script: ./build.sh $(TestParameter) --pack --publish --ci --noprettyprint --configuration $(_BuildConfig) $(_DockerParameter) --architecture $(_BuildArchitecture) $(_LinuxPortable) $(_RuntimeIdentifier) $(_BuildArgs) $(_AdditionalBuildParameters) displayName: Build env: DropSuffix: $(_DropSuffix) - ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}: - script: ./build.sh $(TestParameter) --pack --publish --ci --noprettyprint --configuration $(_BuildConfig) $(_BuildArgs) $(_AdditionalBuildParameters) displayName: Build - ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: CopyFiles@2 displayName: Gather Asset Manifests inputs: SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' TargetFolder: '$(Build.StagingDirectory)/AssetManifests' continueOnError: ${{ parameters.continueOnError }} condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'), eq(variables['_PublishBuildAssetManifest'], 'true')) - task: PublishBuildArtifacts@1 displayName: Push Asset Manifests inputs: PathtoPublish: '$(Build.StagingDirectory)/AssetManifests' PublishLocation: Container ArtifactName: AssetManifests continueOnError: ${{ parameters.continueOnError }} condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'), eq(variables['_PublishBuildAssetManifest'], 'true'))