Skip to content

Commit ff806e3

Browse files
authored
Add IBC switch and disable by default (#47670)
1 parent 9e36193 commit ff806e3

File tree

3 files changed

+38
-4
lines changed

3 files changed

+38
-4
lines changed

eng/pipelines/templates/stages/vmr-build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ parameters:
1111
type: string
1212
default: ''
1313

14+
- name: desiredIbc
15+
type: string
16+
default: ''
17+
1418
# Scope of jobs which are executed
1519
- name: scope
1620
type: string
@@ -396,6 +400,7 @@ stages:
396400
parameters:
397401
vmrBranch: ${{ parameters.vmrBranch }}
398402
desiredSigning: ${{ parameters.desiredSigning }}
403+
desiredIBC: ${{ parameters.desiredIBC }}
399404
jobs:
400405

401406
- template: ../jobs/vmr-build.yml
@@ -901,7 +906,7 @@ stages:
901906
- AzureLinux_x64_Cross_Alpine_arm64
902907
- AzureLinux_x64_Cross_arm
903908
- AzureLinux_x64_Cross_Alpine_arm
904-
909+
905910
- template: ../jobs/vmr-build.yml
906911
parameters:
907912
buildName: Windows

eng/pipelines/templates/variables/vmr-build.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ parameters:
99
type: string
1010
default: ''
1111

12+
- name: desiredIBC
13+
displayName: IBC on/IBC off/default IBC parameters
14+
type: string
15+
default: ''
16+
1217
variables:
1318
- ${{ if ne(parameters.vmrBranch, '') }}:
1419
- name: VmrBranch
@@ -27,10 +32,24 @@ variables:
2732
value: ${{ and(eq(variables['System.TeamProject'], 'internal'), notin(variables['Build.Reason'], 'PullRequest')) }}
2833

2934
## Note: The use of if expressons underneath the variable is necessary to get the updated isOfficialBuild value
30-
- name: ibcEnabled
31-
${{ if eq(variables['isOfficialBuild'], true) }}:
35+
- ${{ if eq(parameters.desiredIBC, 'Enabled') }}:
36+
- name: ibcEnabled
3237
value: true
33-
${{ else }}:
38+
- ${{ elseif eq(parameters.desiredIBC, 'Disabled') }}:
39+
- name: ibcEnabled
40+
value: false
41+
- ${{ elseif or(startsWith(parameters.desiredIBC, 'Default'), eq(parameters.desiredIBC, '')) }}:
42+
# Enable IBC on the internal project if the, branch is a main or release branch
43+
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), and(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), contains(variables['Build.SourceBranch'], '-preview')))) }}:
44+
# IBC disabled until Mismatched MVIDs issue resolved. https://github.com/dotnet/source-build/issues/4954
45+
- name: ibcEnabled
46+
value: false
47+
# No IBC otherwise.
48+
- ${{ else }}:
49+
- name: ibcEnabled
50+
value: false
51+
- ${{ else }}:
52+
- name: ibcEnabled
3453
value: false
3554

3655
- name: officialBuildParameter

src/SourceBuild/content/eng/pipelines/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ parameters:
3939
- Unsigned
4040
- Default (unsigned for manual and non-main/release builds)
4141

42+
- name: desiredIBC
43+
displayName: 'Enable IBC?'
44+
type: string
45+
default: 'Default (disabled for manual and non-main/release builds)'
46+
values:
47+
- Enabled
48+
- Disabled
49+
- Default (disabled for manual and non-main/release builds)
50+
4251
variables:
4352
# enable source-only build for pipelines that contain the -source-build string
4453
- name: isSourceOnlyBuild
@@ -152,6 +161,7 @@ extends:
152161
isBuiltFromVmr: true
153162
isSourceOnlyBuild: ${{ variables.isSourceOnlyBuild }}
154163
desiredSigning: ${{ parameters.desiredSigning }}
164+
desiredIBC: ${{ parameters.desiredIBC }}
155165
${{ if eq(variables.isScheduleTrigger, 'true') }}:
156166
scope: full
157167
${{ elseif eq(variables.isSourceOnlyBuildLite, 'true') }}:

0 commit comments

Comments
 (0)