Update source-build logic for PR validation

This commit is contained in:
MichaelSimons 2022-10-05 15:00:05 +00:00
parent c8a33190e6
commit 7f2e601b1f
3 changed files with 11 additions and 24 deletions

View file

@ -347,10 +347,11 @@ stages:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml
parameters:
dependsOn: Source_Build_Create_Tarball
# TODO: Enable once source-build is supported for 8.0 - https://github.com/dotnet/source-build/issues/3026
# - ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
# - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml
# parameters:
# dependsOn: Source_Build_Create_Tarball
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- stage: Publish

View file

@ -74,17 +74,3 @@ jobs:
displayName: Publish BuildLogs
continueOnError: true
condition: succeededOrFailed()
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
# Check if the tarball should be built now so the result can be used in the build tarball job condition.
# This prevents allocation of additional agents if the tarball build legs should be skipped.
# Only build the tarball if the PR touches source-build source.
- script: |
if curl "https://api.github.com/repos/dotnet/installer/pulls/$(System.PullRequest.PullRequestNumber)/files" | grep '"filename": "src/SourceBuild/*'
then
echo "##vso[task.setvariable variable=_includeTarballBuild;isoutput=true]true"
fi
displayName: Tarball Build Check
name: Tarball_Build_Check
# Disable tarball CI until .NET 8.0 is source-buildable
condition: false

View file

@ -42,13 +42,13 @@ jobs:
_EnablePoison: false
_ExcludeOmniSharpTests: true
_RunOnline: true
CentOSStream8-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOSStream8Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_RunOnline: false
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
CentOSStream8-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOSStream8Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_RunOnline: false
CentOSStream9-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOSStream9Container }}