Merge pull request #12562 from MichaelSimons/ci-improvements

Enable offline build and capture artifacts in PR validation
This commit is contained in:
Michael Simons 2021-11-02 08:52:17 -05:00 committed by GitHub
parent 9e8b04bbff
commit 4eaf8ab130
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,13 +27,9 @@ jobs:
Fedora33-Online:
_runOnline: true
_Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
# TODO: Don't run offline in Pr validation until prebuilts are stabilized/removed, otherwise dependency flow continuously breaks PR validation.
# https://github.com/dotnet/source-build/issues/2490
${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
Fedora33-Offline:
_runOnline: false
_Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
Fedora33-Offline:
_runOnline: false
_Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
timeoutInMinutes: 210
variables:
_TarballDir: $(Build.StagingDirectory)/tarball
@ -85,10 +81,9 @@ jobs:
docker run --rm -v $(_TarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh ${customBuildArgs} -- /p:CleanWhileBuilding=true
displayName: Build Tarball
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- publish: '$(_TarballDir)/artifacts/$(_BuildArch)/$(_BuildConfig)/'
artifact: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt)
displayName: Publish Source Build Artifacts
- publish: '$(_TarballDir)/artifacts/$(_BuildArch)/$(_BuildConfig)/'
artifact: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt)
displayName: Publish Source Build Artifacts
- script: |
set -x