From 23586f9255bf7d360012d99385e4bb31fe18da80 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 2 Feb 2022 12:30:43 -0800 Subject: [PATCH] Don't run Mac/Linux in official build (#1291) These don't contribute official artifacts and otherwise would need to switch to 1ES pools. --- azure-pipelines.yml | 125 ++++++++++++++++++++++---------------------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 00e9bfc8..f9f0a2ef 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -97,69 +97,70 @@ stages: artifactType: Container parallel: true - - job: Linux - pool: - vmImage: ubuntu-20.04 - variables: - - name: _SignType - value: none - - name: MSBUILDDISABLENODEREUSE - value: 1 - - ${{ if and(eq(variables['System.TeamProject'], 'internal'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _OfficialBuildArgs - value: -p:OfficialBuildId=$(Build.BuildNumber) - # else - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - - name: _OfficialBuildArgs - value: '' - steps: - - checkout: self - clean: true - - script: eng/common/cibuild.sh - --configuration $(_BuildConfig) - --prepareMachine - displayName: Build - - task: PublishBuildArtifacts@1 - displayName: Upload TestResults - condition: always() - continueOnError: true - inputs: - pathtoPublish: artifacts/TestResults/$(_BuildConfig)/ - artifactName: $(Agent.Os)_$(Agent.JobName) TestResults - artifactType: Container - parallel: true + - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: + - job: Linux + pool: + vmImage: ubuntu-20.04 + variables: + - name: _SignType + value: none + - name: MSBUILDDISABLENODEREUSE + value: 1 + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - name: _OfficialBuildArgs + value: -p:OfficialBuildId=$(Build.BuildNumber) + # else + - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: + - name: _OfficialBuildArgs + value: '' + steps: + - checkout: self + clean: true + - script: eng/common/cibuild.sh + --configuration $(_BuildConfig) + --prepareMachine + displayName: Build + - task: PublishBuildArtifacts@1 + displayName: Upload TestResults + condition: always() + continueOnError: true + inputs: + pathtoPublish: artifacts/TestResults/$(_BuildConfig)/ + artifactName: $(Agent.Os)_$(Agent.JobName) TestResults + artifactType: Container + parallel: true - - job: Mac - pool: - vmImage: macOS-11 - variables: - - name: _SignType - value: none - - name: MSBUILDDISABLENODEREUSE - value: 1 - - ${{ if and(eq(variables['System.TeamProject'], 'internal'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _OfficialBuildArgs - value: -p:OfficialBuildId=$(Build.BuildNumber) - # else - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - - name: _OfficialBuildArgs - value: '' - steps: - - checkout: self - clean: true - - script: eng/common/cibuild.sh - --configuration $(_BuildConfig) - --prepareMachine - displayName: Build - - task: PublishBuildArtifacts@1 - displayName: Upload TestResults - condition: always() - continueOnError: true - inputs: - pathtoPublish: artifacts/TestResults/$(_BuildConfig)/ - artifactName: $(Agent.Os)_$(Agent.JobName) TestResults - artifactType: Container - parallel: true + - job: Mac + pool: + vmImage: macOS-11 + variables: + - name: _SignType + value: none + - name: MSBUILDDISABLENODEREUSE + value: 1 + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - name: _OfficialBuildArgs + value: -p:OfficialBuildId=$(Build.BuildNumber) + # else + - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: + - name: _OfficialBuildArgs + value: '' + steps: + - checkout: self + clean: true + - script: eng/common/cibuild.sh + --configuration $(_BuildConfig) + --prepareMachine + displayName: Build + - task: PublishBuildArtifacts@1 + displayName: Upload TestResults + condition: always() + continueOnError: true + inputs: + pathtoPublish: artifacts/TestResults/$(_BuildConfig)/ + artifactName: $(Agent.Os)_$(Agent.JobName) TestResults + artifactType: Container + parallel: true - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - template: eng\common\templates\post-build\post-build.yml