[release/6.0.1xx] Enable online and offline source-build tarball build in all PRs (#14711)

* Enable online and offline source-build tarball build in all PRs (#14620)

* Fix source-build CI to not run tarball build when tarball creation fails (#14678)

* Fix source-build CI to not run tarball build when tarball creation failed

* Bad fix

* Revert test patch
This commit is contained in:
Michael Simons 2022-10-11 16:35:00 -05:00 committed by GitHub
parent b389d53439
commit 96efc2a855
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 22 deletions

View file

@ -375,10 +375,10 @@ stages:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml
parameters:
dependsOn: Source_Build_Create_Tarball
condition: eq(dependencies.Source_Build_Create_Tarball.outputs['Tarball_Build_Check._includeTarballBuild'], 'true')
- ${{ 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
# https://github.com/dotnet/core-sdk/issues/248
# - template: /eng/build.yml

View file

@ -74,15 +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

View file

@ -1,9 +1,6 @@
# Builds a source-build tarball
parameters:
# Custom condition to apply to the job
condition: true
# Dependent jobs that must be completed before this job will run
dependsOn:
@ -32,7 +29,6 @@ jobs:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
parameters:
architecture: x64
condition: ${{ parameters.condition }}
dependsOn: ${{ parameters.dependsOn }}
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
excludeSdkContentTests: true
@ -86,7 +82,6 @@ jobs:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
parameters:
architecture: arm64
condition: ${{ parameters.condition }}
dependsOn: ${{ parameters.dependsOn }}
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
excludeSdkContentTests: true
@ -108,7 +103,7 @@ jobs:
architecture: x64
# Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status.
# The bootstrap build will shortcut if the stage 1 build failed.
condition: and(${{ parameters.condition }}, succeededOrFailed())
condition: succeededOrFailed()
dependsOn: Build_Tarball_x64
excludeSdkContentTests: true
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}