|
| 1 | +variables: |
| 2 | + - name: Build.Repository.Clean |
| 3 | + value: true |
| 4 | + - name: _TeamName |
| 5 | + value: DotNetCore |
| 6 | + - name: _RunAsPublic |
| 7 | + value: True |
| 8 | + - name: _RunAsInternal |
| 9 | + value: False |
| 10 | + - name: _InternalBuildArgs |
| 11 | + value: '' |
| 12 | + - name: _InternalPublishArg |
| 13 | + value: '' |
| 14 | + |
| 15 | + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
| 16 | + - name: _RunAsPublic |
| 17 | + value: False |
| 18 | + - name: _RunAsInternal |
| 19 | + value: True |
| 20 | + - name: _SignType |
| 21 | + value: real |
| 22 | + # Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT |
| 23 | + # DotNet-HelixApi-Access provides: HelixApiAccessToken |
| 24 | + - group: Publish-Build-Assets |
| 25 | + - group: DotNet-HelixApi-Access |
| 26 | + - group: SDL_Settings |
| 27 | + - name: _InternalPublishArg |
| 28 | + value: -publish |
| 29 | + - name: _InternalBuildArgs |
| 30 | + value: /p:DotNetSignType=$(_SignType) |
| 31 | + /p:TeamName=$(_TeamName) |
| 32 | + /p:DotNetPublishUsingPipelines=true |
| 33 | + /p:OfficialBuildId=$(BUILD.BUILDNUMBER) |
| 34 | + |
| 35 | +trigger: |
| 36 | + batch: true |
| 37 | + branches: |
| 38 | + include: |
| 39 | + - main |
| 40 | + - release/* |
| 41 | + |
| 42 | +pr: |
| 43 | + branches: |
| 44 | + include: |
| 45 | + - main |
| 46 | + - release/* |
| 47 | + |
| 48 | +stages: |
| 49 | +- stage: build |
| 50 | + displayName: Build |
| 51 | + jobs: |
| 52 | + - template: /eng/common/templates/jobs/jobs.yml |
| 53 | + parameters: |
| 54 | + enablePublishBuildArtifacts: true |
| 55 | + enablePublishBuildAssets: true |
| 56 | + enablePublishUsingPipelines: true |
| 57 | + variables: |
| 58 | + - _BuildConfig: Release |
| 59 | + jobs: |
| 60 | + - job: Build_Linux |
| 61 | + displayName: Linux |
| 62 | + timeoutInMinutes: 30 |
| 63 | + pool: |
| 64 | + vmImage: ubuntu-20.04 |
| 65 | + steps: |
| 66 | + - bash: | |
| 67 | + eng/common/cibuild.sh -configuration $(_BuildConfig) $(_InternalPublishArg) /p:ToolConfiguration=$(_BuildConfig) /p:ToolRid=linux-x64 $(_InternalBuildArgs) |
| 68 | + displayName: Build and Publish |
| 69 | +
|
| 70 | +############ POST BUILD ARCADE LOGIC ############ |
| 71 | +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
| 72 | + - template: eng\common\templates\post-build\post-build.yml |
| 73 | + parameters: |
| 74 | + publishingInfraVersion: 3 |
| 75 | + enableSourceLinkValidation: true |
| 76 | + enableSigningValidation: true |
| 77 | + enableSymbolValidation: false |
| 78 | + enableNugetValidation: true |
0 commit comments