Skip to content

Commit

Permalink
Adding support for self-hosted pools (#154)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kuqin12 and makubacki committed May 31, 2023
1 parent 3d4b2cd commit 9868552
Show file tree
Hide file tree
Showing 16 changed files with 182 additions and 583 deletions.
73 changes: 7 additions & 66 deletions .sync/Files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,83 +27,24 @@
# set up to use the YAML file. The file is simply available for pipelines to be connected
# if needed.
group:
# Azure Pipelines - Custom - microsoft/mu_feature_config
- files:
- source: .sync/azure_pipelines/custom/mu_feature_config/Ubuntu-GCC5.yml
dest: .azurepipelines/Ubuntu-GCC5.yml
template: true
- source: .sync/azure_pipelines/custom/mu_feature_config/Windows-VS.yml
dest: .azurepipelines/Windows-VS.yml
template: true
repos: |
microsoft/mu_feature_config
# Azure Pipelines - Custom - microsoft/mu_feature_ipmi
- files:
- source: .sync/azure_pipelines/custom/mu_feature_ipmi/Ubuntu-GCC5.yml
dest: .azurepipelines/Ubuntu-GCC5.yml
template: true
- source: .sync/azure_pipelines/custom/mu_feature_ipmi/Windows-VS.yml
dest: .azurepipelines/Windows-VS.yml
template: true
repos: |
microsoft/mu_feature_ipmi
# Azure Pipelines - Custom - microsoft/mu_feature_mm_supv
- files:
- source: .sync/azure_pipelines/custom/mu_feature_mm_supv/Ubuntu-GCC5.yml
dest: .azurepipelines/Ubuntu-GCC5.yml
template: true
- source: .sync/azure_pipelines/custom/mu_feature_mm_supv/Windows-VS.yml
dest: .azurepipelines/Windows-VS.yml
template: true
repos: |
microsoft/mu_feature_mm_supv
# Azure Pipelines - Custom - microsoft/mu_oem_sample
- files:
- source: .sync/azure_pipelines/custom/mu_oem_sample/Ubuntu-GCC5.yml
dest: .azurepipelines/Ubuntu-GCC5.yml
template: true
- source: .sync/azure_pipelines/custom/mu_oem_sample/Windows-VS.yml
dest: .azurepipelines/Windows-VS.yml
template: true
repos: |
microsoft/mu_oem_sample
# Azure Pipelines - Matrix Dependent - All
- files:
- source: .sync/azure_pipelines/matrix_dependent/Ubuntu-CLANGPDB.yml
dest: .azurepipelines/Ubuntu-CLANGPDB.yml
template: true
- source: .sync/azure_pipelines/matrix_dependent/Ubuntu-GCC5.yml
dest: .azurepipelines/Ubuntu-GCC5.yml
template: true
- source: .sync/azure_pipelines/matrix_dependent/Windows-CLANGPDB.yml
dest: .azurepipelines/Windows-CLANGPDB.yml
template: true
- source: .sync/azure_pipelines/matrix_dependent/Windows-VS.yml
dest: .azurepipelines/Windows-VS.yml
template: true
repos: |
microsoft/mu_basecore
# Azure Pipelines - Matrix Dependent - GCC & VS Only
- files:
- source: .sync/azure_pipelines/matrix_dependent/Ubuntu-GCC5.yml
dest: .azurepipelines/Ubuntu-GCC5.yml
template: true
- source: .sync/azure_pipelines/matrix_dependent/Windows-VS.yml
dest: .azurepipelines/Windows-VS.yml
- source: .sync/azure_pipelines/MuDevOpsWrapper.yml
dest: .azurepipelines/MuDevOpsWrapper.yml
template: true
repos: |
microsoft/mu_basecore
microsoft/mu_common_intel_min_platform
microsoft/mu_feature_dfci
microsoft/mu_plus
microsoft/mu_silicon_arm_tiano
microsoft/mu_silicon_intel_tiano
microsoft/mu_tiano_platforms
microsoft/mu_tiano_plus
microsoft/mu_feature_config
microsoft/mu_oem_sample
microsoft/mu_feature_ipmi
microsoft/mu_feature_mm_supv
# Azure Pipelines - Ignored Repos
# - microsoft/mu
Expand Down
90 changes: 90 additions & 0 deletions .sync/azure_pipelines/MuDevOpsWrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
## @file
# Azure Pipeline build file for a build using mu_devops.
#
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there
# instead of the file in this repo.
#
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##

{% import '../../../Version.njk' as sync_version -%}

resources:
repositories:
- repository: mu_devops
type: github
endpoint: microsoft
name: microsoft/mu_devops
ref: refs/tags/{{ sync_version.mu_devops }}

parameters:
- name: do_ci_build
displayName: Perform Stuart CI Build
type: boolean
default: true
- name: do_ci_setup
displayName: Perform Stuart CI Setup
type: boolean
default: true
- name: do_non_ci_build
displayName: Perform non-CI Stuart Build
type: boolean
default: false
- name: do_non_ci_setup
displayName: Perform non-CI Stuart Setup
type: boolean
default: false
- name: do_pr_eval
displayName: Perform Stuart PR Evaluation
type: boolean
default: true
- name: container_build
displayName: Flag for whether this repo should do stuart_setup
type: boolean
default: false
- name: os_type
displayName: OS type on the self-hosted agent pools
type: string
values:
- Windows_NT
- Linux
default: Windows_NT
- name: build_matrix
displayName: Build matrix for this repository
type: object
- name: pool_name
displayName: Variable name that hosts pool name to be used for self-hosted agents
type: string
default: pool_name
- name: extra_install_step
displayName: Extra Install Steps
type: stepList
default:
- script: echo No extra steps provided
- name: extra_jobs
displayName: Extra Jobs to be run after build
type: jobList
default: []

jobs:
- template: Jobs/PrGate.yml@mu_devops
parameters:
do_ci_build: ${{ parameters.do_ci_build }}
do_ci_setup: ${{ parameters.do_ci_setup }}
do_pr_eval: ${{ parameters.do_pr_eval }}
do_non_ci_setup: ${{ parameters.do_non_ci_setup }}
do_non_ci_build: ${{ parameters.do_non_ci_build }}
build_matrix: ${{ parameters.build_matrix }}
os_type: ${{ parameters.os_type }}
pool_name: ${{ parameters.pool_name }}
extra_install_step: ${{ parameters.extra_install_step }}
tool_chain_tag: $(tool_chain_tag)
vm_image: $(vm_image)
container_build: ${{ parameters.container_build }}
linux_container_image: {{ sync_version.linux_build_container }}

- ${{ parameters.extra_jobs }}
46 changes: 0 additions & 46 deletions .sync/azure_pipelines/custom/mu_feature_config/Ubuntu-GCC5.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .sync/azure_pipelines/custom/mu_feature_config/Windows-VS.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .sync/azure_pipelines/custom/mu_feature_ipmi/Ubuntu-GCC5.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .sync/azure_pipelines/custom/mu_feature_ipmi/Windows-VS.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .sync/azure_pipelines/custom/mu_feature_mm_supv/Ubuntu-GCC5.yml

This file was deleted.

Loading

0 comments on commit 9868552

Please sign in to comment.