Infra changes to fail online builds when prebuilts exist (#17198)

This commit is contained in:
Michael Simons 2023-08-21 09:36:47 -05:00 committed by GitHub
parent 1a741e8932
commit 2cce0de687
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 19 deletions

View file

@ -87,28 +87,28 @@ stages:
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline
buildName: CentOSStream8_Offline_MsftSdk
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }}
container: ${{ parameters.centOSStream8Container }}
buildFromArchive: true # ✅
enablePoison: false # 🚫
excludeOmniSharpTests: true # ✅
runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
# CI - Stage 1 x64 legs ------------------------------------
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline
buildName: CentOSStream8_Offline_MsftSdk
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }}
container: ${{ parameters.centOSStream8Container }}
buildFromArchive: true # ✅
enablePoison: false # 🚫
excludeOmniSharpTests: true # ✅
runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline

View file

@ -167,7 +167,8 @@
AfterTargets="Build"
DependsOnTargets="
CheckIfPrebuiltsExistToPack;
CreatePrebuiltsTarballIfPrebuiltsExist"/>
CreatePrebuiltsTarballIfPrebuiltsExist;
ErrorOnPrebuilts"/>
<Target Name="CheckIfPrebuiltsExistToPack">
<!-- Directory existence doesn't mean there are files inside. Use a pattern to find files. -->
@ -190,4 +191,9 @@
<Message Text="Tarball '$(TarballFilePath)' was successfully created from '$(TarballWorkingDir)'" Importance="High" />
</Target>
<Target Name="ErrorOnPrebuilts"
Condition="'@(PrebuiltFile->Count())' != '0' AND '$(SkipErrorOnPrebuilts)' != 'true'">
<Error Text="@(PrebuiltFile->Count()) Prebuilts Exist" />
</Target>
</Project>