Skip to content

Commit 9868552

Browse files
kuqin12makubacki
andauthored
Adding support for self-hosted pools (#154)
This change added support for self-hosted agent pools for potentially onboarding Windows on ARM systems as there is no plan for Microsoft hosted Windows ARM agents as of today. The main change is around the flag of installing tools or not. The existing routine will expect the incoming flag being a boolean type, which does not work when this parameter is being populated using a variable (string). This change will update the flag to string type as well. After changing, the only file being synced to individual repos is `MuDevOpsWrapper.yml`. And each repo can configure their own build matrix for build target, architecture list, run on selfhost agents or not, etc. This is considered a breaking change, due to: 1. `Steps/PrGate.yml` updated the `extra_install_steps` to be invoked before `stuart_setup` and `stuart_update`. But this change does not knowingly break the existing consumers. 2. `Jobs/PrGate.yml` updated the parameters to accept `parameters.build_matrix`, which needs the consumers to update top level yaml script to comply with the updated template. --------- Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
1 parent 3d4b2cd commit 9868552

16 files changed

Lines changed: 182 additions & 583 deletions

File tree

.sync/Files.yml

Lines changed: 7 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -27,83 +27,24 @@
2727
# set up to use the YAML file. The file is simply available for pipelines to be connected
2828
# if needed.
2929
group:
30-
# Azure Pipelines - Custom - microsoft/mu_feature_config
31-
- files:
32-
- source: .sync/azure_pipelines/custom/mu_feature_config/Ubuntu-GCC5.yml
33-
dest: .azurepipelines/Ubuntu-GCC5.yml
34-
template: true
35-
- source: .sync/azure_pipelines/custom/mu_feature_config/Windows-VS.yml
36-
dest: .azurepipelines/Windows-VS.yml
37-
template: true
38-
repos: |
39-
microsoft/mu_feature_config
40-
41-
# Azure Pipelines - Custom - microsoft/mu_feature_ipmi
42-
- files:
43-
- source: .sync/azure_pipelines/custom/mu_feature_ipmi/Ubuntu-GCC5.yml
44-
dest: .azurepipelines/Ubuntu-GCC5.yml
45-
template: true
46-
- source: .sync/azure_pipelines/custom/mu_feature_ipmi/Windows-VS.yml
47-
dest: .azurepipelines/Windows-VS.yml
48-
template: true
49-
repos: |
50-
microsoft/mu_feature_ipmi
51-
52-
# Azure Pipelines - Custom - microsoft/mu_feature_mm_supv
53-
- files:
54-
- source: .sync/azure_pipelines/custom/mu_feature_mm_supv/Ubuntu-GCC5.yml
55-
dest: .azurepipelines/Ubuntu-GCC5.yml
56-
template: true
57-
- source: .sync/azure_pipelines/custom/mu_feature_mm_supv/Windows-VS.yml
58-
dest: .azurepipelines/Windows-VS.yml
59-
template: true
60-
repos: |
61-
microsoft/mu_feature_mm_supv
62-
63-
# Azure Pipelines - Custom - microsoft/mu_oem_sample
64-
- files:
65-
- source: .sync/azure_pipelines/custom/mu_oem_sample/Ubuntu-GCC5.yml
66-
dest: .azurepipelines/Ubuntu-GCC5.yml
67-
template: true
68-
- source: .sync/azure_pipelines/custom/mu_oem_sample/Windows-VS.yml
69-
dest: .azurepipelines/Windows-VS.yml
70-
template: true
71-
repos: |
72-
microsoft/mu_oem_sample
73-
74-
# Azure Pipelines - Matrix Dependent - All
75-
- files:
76-
- source: .sync/azure_pipelines/matrix_dependent/Ubuntu-CLANGPDB.yml
77-
dest: .azurepipelines/Ubuntu-CLANGPDB.yml
78-
template: true
79-
- source: .sync/azure_pipelines/matrix_dependent/Ubuntu-GCC5.yml
80-
dest: .azurepipelines/Ubuntu-GCC5.yml
81-
template: true
82-
- source: .sync/azure_pipelines/matrix_dependent/Windows-CLANGPDB.yml
83-
dest: .azurepipelines/Windows-CLANGPDB.yml
84-
template: true
85-
- source: .sync/azure_pipelines/matrix_dependent/Windows-VS.yml
86-
dest: .azurepipelines/Windows-VS.yml
87-
template: true
88-
repos: |
89-
microsoft/mu_basecore
90-
9130
# Azure Pipelines - Matrix Dependent - GCC & VS Only
9231
- files:
93-
- source: .sync/azure_pipelines/matrix_dependent/Ubuntu-GCC5.yml
94-
dest: .azurepipelines/Ubuntu-GCC5.yml
95-
template: true
96-
- source: .sync/azure_pipelines/matrix_dependent/Windows-VS.yml
97-
dest: .azurepipelines/Windows-VS.yml
32+
- source: .sync/azure_pipelines/MuDevOpsWrapper.yml
33+
dest: .azurepipelines/MuDevOpsWrapper.yml
9834
template: true
9935
repos: |
36+
microsoft/mu_basecore
10037
microsoft/mu_common_intel_min_platform
10138
microsoft/mu_feature_dfci
10239
microsoft/mu_plus
10340
microsoft/mu_silicon_arm_tiano
10441
microsoft/mu_silicon_intel_tiano
10542
microsoft/mu_tiano_platforms
10643
microsoft/mu_tiano_plus
44+
microsoft/mu_feature_config
45+
microsoft/mu_oem_sample
46+
microsoft/mu_feature_ipmi
47+
microsoft/mu_feature_mm_supv
10748
10849
# Azure Pipelines - Ignored Repos
10950
# - microsoft/mu
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
## @file
2+
# Azure Pipeline build file for a build using mu_devops.
3+
#
4+
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there
5+
# instead of the file in this repo.
6+
#
7+
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops
8+
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml
9+
#
10+
# Copyright (c) Microsoft Corporation.
11+
# SPDX-License-Identifier: BSD-2-Clause-Patent
12+
##
13+
14+
{% import '../../../Version.njk' as sync_version -%}
15+
16+
resources:
17+
repositories:
18+
- repository: mu_devops
19+
type: github
20+
endpoint: microsoft
21+
name: microsoft/mu_devops
22+
ref: refs/tags/{{ sync_version.mu_devops }}
23+
24+
parameters:
25+
- name: do_ci_build
26+
displayName: Perform Stuart CI Build
27+
type: boolean
28+
default: true
29+
- name: do_ci_setup
30+
displayName: Perform Stuart CI Setup
31+
type: boolean
32+
default: true
33+
- name: do_non_ci_build
34+
displayName: Perform non-CI Stuart Build
35+
type: boolean
36+
default: false
37+
- name: do_non_ci_setup
38+
displayName: Perform non-CI Stuart Setup
39+
type: boolean
40+
default: false
41+
- name: do_pr_eval
42+
displayName: Perform Stuart PR Evaluation
43+
type: boolean
44+
default: true
45+
- name: container_build
46+
displayName: Flag for whether this repo should do stuart_setup
47+
type: boolean
48+
default: false
49+
- name: os_type
50+
displayName: OS type on the self-hosted agent pools
51+
type: string
52+
values:
53+
- Windows_NT
54+
- Linux
55+
default: Windows_NT
56+
- name: build_matrix
57+
displayName: Build matrix for this repository
58+
type: object
59+
- name: pool_name
60+
displayName: Variable name that hosts pool name to be used for self-hosted agents
61+
type: string
62+
default: pool_name
63+
- name: extra_install_step
64+
displayName: Extra Install Steps
65+
type: stepList
66+
default:
67+
- script: echo No extra steps provided
68+
- name: extra_jobs
69+
displayName: Extra Jobs to be run after build
70+
type: jobList
71+
default: []
72+
73+
jobs:
74+
- template: Jobs/PrGate.yml@mu_devops
75+
parameters:
76+
do_ci_build: ${{ parameters.do_ci_build }}
77+
do_ci_setup: ${{ parameters.do_ci_setup }}
78+
do_pr_eval: ${{ parameters.do_pr_eval }}
79+
do_non_ci_setup: ${{ parameters.do_non_ci_setup }}
80+
do_non_ci_build: ${{ parameters.do_non_ci_build }}
81+
build_matrix: ${{ parameters.build_matrix }}
82+
os_type: ${{ parameters.os_type }}
83+
pool_name: ${{ parameters.pool_name }}
84+
extra_install_step: ${{ parameters.extra_install_step }}
85+
tool_chain_tag: $(tool_chain_tag)
86+
vm_image: $(vm_image)
87+
container_build: ${{ parameters.container_build }}
88+
linux_container_image: {{ sync_version.linux_build_container }}
89+
90+
- ${{ parameters.extra_jobs }}

.sync/azure_pipelines/custom/mu_feature_config/Ubuntu-GCC5.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.sync/azure_pipelines/custom/mu_feature_config/Windows-VS.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.sync/azure_pipelines/custom/mu_feature_ipmi/Ubuntu-GCC5.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.sync/azure_pipelines/custom/mu_feature_ipmi/Windows-VS.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.sync/azure_pipelines/custom/mu_feature_mm_supv/Ubuntu-GCC5.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)