Skip to content

Commit 170b872

Browse files
authored
Introduce extra_build_args to Jobs/PrGate.yml. Move extra_install_steps to after stuart_update call. (#292)
extra_install_step is moved to after stuart_update. extra_install_steps can be used to pass a call to another stuart_update to include the --codeql parameter.
1 parent 020324d commit 170b872

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

Jobs/PrGate.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ parameters:
3737
displayName: Perform Stuart PR Evaluation
3838
type: boolean
3939
default: true
40+
- name: extra_build_args
41+
displayName: Extra Build Command Arguments
42+
type: string
43+
default: 'CODE_COVERAGE=TRUE CC_FLATTEN=TRUE CC_FULL=TRUE'
4044
- name: extra_post_build_steps
4145
displayName: Extra Post-Build Steps
4246
type: stepList
@@ -166,4 +170,4 @@ jobs:
166170
self_host_agent: true
167171
${{ else }}:
168172
self_host_agent: false
169-
extra_build_args: CODE_COVERAGE=TRUE CC_FLATTEN=TRUE CC_FULL=TRUE
173+
extra_build_args: ${{ parameters.extra_build_args }}

Steps/PrGate.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,6 @@ steps:
123123
- ${{ if eq(parameters.install_tools, true) }}:
124124
- template: InstallCoverageTools.yml
125125

126-
# Potential Extra steps
127-
- ${{ if eq(parameters.self_host_agent, false) }}:
128-
- ${{ parameters.extra_install_step }}
129-
- ${{ else }}:
130-
- bash: echo "##[warning]A self-hosted agent build requested extra install steps. Those are not supported right now."
131-
132126
# Build repo
133127
- ${{ if eq(parameters.do_ci_setup, true) }}:
134128
- task: CmdLine@2
@@ -150,6 +144,12 @@ steps:
150144
script: stuart_update -c ${{ parameters.build_file }} -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}
151145
condition: and(gt(variables.pkg_count, 0), succeeded())
152146

147+
# Potential Extra steps
148+
- ${{ if eq(parameters.self_host_agent, false) }}:
149+
- ${{ parameters.extra_install_step }}
150+
- ${{ else }}:
151+
- bash: echo "##[warning]A self-hosted agent build requested extra install steps. Those are not supported right now."
152+
153153
- ${{ if eq(parameters.do_non_ci_build, true) }}:
154154
- task: CmdLine@2
155155
displayName: Build and Test ${{ parameters.build_pkgs }} ${{ parameters.build_archs}}

0 commit comments

Comments
 (0)