11===================================================
2- Project MU Developer Operations (DevOps) Repository
2+ Project Mu Developer Operations (DevOps) Repository
33===================================================
44
55|Latest Mu DevOps Release Version (latest SemVer) | |Commits Since Last Release | |Sync Mu DevOps Files to Mu Repos | |Containers Build |
@@ -29,24 +29,103 @@ You can find a high-level summary of the latest changes since the last release b
2929
3030.. _`latest draft release` : https://github.com/microsoft/mu_devops/releases
3131
32+ Table of Contents
33+ =================
34+
35+ 1. `Project Mu Developer Operations (DevOps) Repository `_
36+
37+ 2. `Table of Contents `_
38+
39+ 3. `Continuous Integration (CI) `_
40+
41+ 4. `Conventions `_
42+
43+ 5. `Containers `_
44+
45+ 6. `GitHub Automation Workflow Overview `_
46+
47+ - `Leaf Workflows & Reusable Workflows `_
48+
49+ - `Reusable Workflows `_
50+
51+ - `Leaf Workflows `_
52+
53+ 7. `GitHub Automation Workflow Summary `_
54+
55+ - `Auto Merge `_
56+
57+ - `Auto Approver `_
58+
59+ - `File Synchronization `_
60+
61+ - `Initial Issue Triage `_
62+
63+ - `Issue Assignment `_
64+
65+ - `Label Automation `_
66+
67+ - `Pull Request Validator `_
68+
69+ - `Release Drafting `_
70+
71+ - `Scheduled Maintenance `_
72+
73+ - `Stale Detection `_
74+
75+ 8. `GitHub Action Summary `_
76+
77+ - `Submodule Release Updater `_
78+
79+ 9. `Links `_
80+
3281Continuous Integration (CI)
3382===========================
3483
35- There are two broad categories of CI - Core CI and Platform CI.
84+ There are two broad categories of CI - Core CI and Platform CI. You may see these terms used in the repo.
3685 - **Core CI ** - Focused on building and testing all packages in Edk2 without an actual target platform.
3786 - **Platform CI ** - Focused on building a single target platform and confirming functionality on that platform.
3887
3988Conventions
4089===========
4190
42- - Files extension should be `*.yml `. `*.yaml ` is also supported but in edk2 we use those for our package
43- configuration.
44- - Shared templates should be contributed to the `mu_devops ` repository.
45- - Platform CI files should be placed in a `<PlatformPkg>/.azurepipelines ` folder in the platform repository.
46- - Top level CI files should be named `<HostOs><ToolChainTag>.yml `
91+ - Shared templates in Project Mu repos are encouraged to be maintained in this repository.
4792
48- GitHub Automation
49- =================
93+ - The `.github ` directory contains GitHub collateral for this repository.
94+
95+ - Some of the files are shared GitHub actions or workflows used (referenced) by other repositories as well.
96+
97+ - Files that are synced to other repositories should be placed in the `.sync ` folder.
98+
99+ - Some files are synced back to this repository (`mu_devops `).
100+
101+ - Azure Pipelines job and step templates should respectively be placed in the `Jobs ` and `Steps ` directories.
102+
103+ - YAML files should have the extensions `*.yml `.
104+
105+ - An exception is the markdown configuration file (`.markdownlint.yaml `) that uses `.yaml ` for consistency with
106+ pre-existing conventions across Mu repos.
107+
108+ Containers
109+ ==========
110+
111+ This repo maintains containers used throughout Project Mu projects. Containers provide well-defined, ready-to-go
112+ images and result in improved performance, portability, and consistency of build environments. Project Mu leverages
113+ containers for both server-side builds (e.g. pull requests and continuous integration) and for local developer builds.
114+
115+ At this time, containers are only offered for Linux. If you want to get started quickly and receive the smoothest
116+ build experience, it is recommended to use containers where available.
117+
118+ The `Containers ` directory contains the actual dockerfiles for building the containers. The containers are actually
119+ built (in pull requests to dockerfiles and merges to the `main ` branch) in the `.github/workflows/Build-Containers.yml `
120+ workflow. On any change to a dockerfile a new container is built and pushed to the Microsoft GitHub container registry
121+ as a container package associated with this repo. The latest Project Mu container builds are available in the
122+ `Packages - Mu DevOps `_ container feed and more information is available in the `Container Readme file `_.
123+
124+ .. _`Container Readme file` : https://github.com/microsoft/mu_devops/blob/main/Containers/Readme.md
125+ .. _`Packages - Mu DevOps` : https://github.com/orgs/microsoft/packages?repo_name=mu_devops
126+
127+ GitHub Automation Workflow Overview
128+ ===================================
50129
51130This repository also drives automation of Project Mu GitHub repositories.
52131
@@ -76,6 +155,57 @@ These workflow are only designed to call reusable workflows. They should not dir
76155actual GitHub Actions used by Project Mu are centrally tracked/updated in the single-copy reusable workflow files
77156in the Mu DevOps repo. This allows dependabot to update the actions here at once.
78157
158+ GitHub Automation Workflow Summary
159+ ==================================
160+
161+ Following is a brief summary of the actual workflows in the repository.
162+
163+ Auto Merge
164+ ----------
165+
166+ As automated bots pick up mundane tasks like syncing PIP module updates, submodules, files, and so on, an increasing
167+ number of pull requests can accumulate that essentially update dependencies we expect to be updated over time. In most
168+ cases, we simply care that the new update passes CI checks.
169+
170+ Therefore, Project Mu repos auto merge certain pull requests to reduce human burden of approving these requests in all
171+ of the Project Mu repos. Individual repos can opt out of this functionality by removing the leaf workflow sync to their
172+ repo, however, it is recommended to keep this flow enabled for consistency across all repos.
173+
174+ To see more about this flow look in these files:
175+
176+ - The main reusable workflow file:
177+
178+ - `.github/workflows/AutoMerger.yml `
179+
180+ - The leaf workflow
181+
182+ - `.sync/workflows/leaf/auto-merge.yml `
183+
184+ A Project Mu repo simply needs to sync `.sync/workflows/leaf/auto-merge.yml ` to their repo in `Files.yml ` and the
185+ auto merge workflow will run in the repo.
186+
187+ Auto Approver
188+ -------------
189+
190+ Auto approves pull requests from allowed bot accounts. As part of reducing dependency overhead, this workflow first
191+ approves pull requests that are then auto merged after CI status checks complete. If a CI status check (e.g. build)
192+ fails, the pull request will not be merged.
193+
194+ Note: This is currently disabled in most Project Mu repos.
195+
196+ To see more about this flow look in these files:
197+
198+ - The main reusable workflow file:
199+
200+ - `.github/workflows/AutoApprover.yml `
201+
202+ - The leaf workflow
203+
204+ - `.sync/workflows/leaf/auto-approve.yml `
205+
206+ A Project Mu repo simply needs to sync `.sync/workflows/leaf/auto-approve.yml ` to their repo in `Files.yml ` and the
207+ auto approve workflow will run in the repo.
208+
79209File Synchronization
80210--------------------
81211
@@ -105,6 +235,41 @@ changes.
105235
106236.. _`Project Mu UEFI Bot` : https://github.com/uefibot
107237
238+ Initial Issue Triage
239+ --------------------
240+
241+ This repo syncs `GitHub issue form templates `_ to many Project Mu repos. Part of initial triage for incoming issues
242+ involves parsing data in the issue form to apply the appropriate labels so the issue is ready for triage by a human.
243+
244+ Issues need to be triaged by a human when the `state:needs-triage ` label is present. This workflow can parse details
245+ provided in issue forms to apply additional labels. For example, the `state:needs-owner ` label is applied if the user
246+ indicates they are not fixing the issue, the `urgency:<level> ` label is applied based on user selection in the urgency
247+ dropdown, etc.
248+
249+ A Project Mu repo simply needs to sync `.sync/workflows/leaf/triage-issues.yml ` to their repo and the issue triage
250+ workflow will run in the repo.
251+
252+ .. _`GitHub issue form templates` : https://github.com/microsoft/mu_devops/tree/main/.sync/github_templates/ISSUE_TEMPLATE
253+
254+ This workflow works in concert with other issue workflows such as `.sync/workflows/leaf/issue-assignment.yml ` to
255+ automate labels in issues based on the state of the issue.
256+
257+ Issue Assignment
258+ ----------------
259+
260+ A generic workflow that contains actions applied when GitHub issues are assigned. Currently, the workflow removes
261+ labels from the issue that are no longer relevant after it is assigned.
262+
263+ To see more about this flow look in these files:
264+
265+ - The main reusable workflow file:
266+
267+ - `.github/workflows/IssueAssignment.yml `
268+
269+ - The leaf workflow
270+
271+ - `.sync/workflows/leaf/issue-assignment.yml `
272+
108273Label Automation
109274----------------
110275
@@ -124,15 +289,16 @@ Labels are synced to all repos on a regular schedule that is the same for all re
124289Labels are automatically applied to issues and pull request on creation/modification and can be applied based on file
125290paths modified a pull request or content in the body of the issue or pull request.
126291
127- Stale Detection
128- ---------------
292+ Pull Request Validator
293+ ----------------------
129294
130- Stale issues and pull requests are automatically labeled and closed after a configured amount of time.
295+ Validates pull request formatting against requirements defined in the workflow. This workflow is not intended to
296+ strictly validate exact formatting details but provide hints when simple, broad changes are needed to enhance the
297+ quality of pull request verbiage.
131298
132- This is provided by the ` .github/workflows/Stale.yml ` reusable workflow.
299+ - The leaf workflow
133300
134- Individual repositories can control the label and time settings but it is strongly recommended to use the default
135- values defined in the reusable workflow for consistency.
301+ - `.sync/workflows/leaf/pull-request-formatting-validator.yml `
136302
137303Release Drafting
138304----------------
@@ -150,64 +316,43 @@ The draft release should be converted to an actual release any time the minor or
150316To see more about this flow look in these files:
151317
152318- The main reusable workflow file:
319+
153320 - .github/workflows/ReleaseDrafter.yml
321+
154322- The configuration file for the reusable workflow:
323+
155324 - .sync/workflows/config/release-draft/release-draft-config.yml
325+
156326 - This will be synced to .github/release-draft-config.yml in repos using release drafter
157327
158328A Project Mu repo simply needs to sync `.sync/workflows/leaf/release-draft.yml ` and the config file
159329`.sync/workflows/config/release-draft/release-draft-config.yml ` to their repo and adjust any parameters needed in the
160330sync process (like repo default branch name) and the release draft workflow will run in the repo.
161331
162- Initial Issue Triage
163- --------------------
164-
165- This repo syncs `GitHub issue form templates `_ to many Project Mu repos. Part of initial triage for incoming issues
166- involves parsing data in the issue form to apply the appropriate labels so the issue is ready for triage by a human.
167-
168- Issues need to be triaged by a human when the `state:needs-triage ` label is present. This workflow can parse details
169- provided in issue forms to apply additional labels. For example, the `state:needs-owner ` label is applied if the user
170- indicates they are not fixing the issue, the `urgency:<level> ` label is applied based on user selection in the urgency
171- dropdown, etc.
172-
173- A Project Mu repo simply needs to sync `.sync/workflows/leaf/triage-issues.yml ` to their repo and the issue triage
174- workflow will run in the repo.
175-
176- .. _`GitHub issue form templates` : https://github.com/microsoft/mu_devops/tree/main/.sync/github_templates/ISSUE_TEMPLATE
177-
178- This workflow works in concert with other issue workflows such as `.sync/workflows/leaf/issue-assignment.yml ` to
179- automate labels in issues based on the state of the issue.
332+ Scheduled Maintenance
333+ ---------------------
180334
181- Auto Merge
182- ----------
335+ Performs regularly scheduled maintenance-related tasks such as closing pull requests and issues marked stale. Similar
336+ tasks can be added to the workflow over time.
183337
184- As automated bots pick up mundane tasks like syncing PIP module updates, submodules, files, and so on, an increasing
185- number of pull requests can accumulate that essentially update dependencies we expect to be updated over time. In most
186- cases, we simply care that the new update passes CI checks.
338+ The leaf workflow contains the primary implementation and is directly synced to subscribed repos:
187339
188- Therefore, Project Mu repos auto merge certain pull requests to reduce human burden of approving these requests in all
189- of the Project Mu repos. Individual repos can opt out of this functionality by removing the leaf workflow sync to their
190- repo, however, it is recommended to keep this flow enabled for consistency across all repos.
340+ - `.sync/workflows/leaf/scheduled-maintenance.yml `
191341
192- To see more about this flow look in these files:
342+ Stale Detection
343+ ---------------
193344
194- - The main reusable workflow file:
195- - `.github/workflows/AutoMerger.yml `
196- - The leaf workflow
197- - `.sync/workflows/leaf/auto-merge.yml `
345+ Stale issues and pull requests are automatically labeled and closed after a configured amount of time.
198346
199- A Project Mu repo simply needs to sync `.sync/workflows/leaf/auto-merge.yml ` to their repo in `Files.yml ` and the
200- auto merge workflow will run in the repo.
347+ This is provided by the `.github/workflows/Stale.yml ` reusable workflow.
201348
202- Pull Request Validator
203- ----------------------
349+ Individual repositories can control the label and time settings but it is strongly recommended to use the default
350+ values defined in the reusable workflow for consistency.
204351
205- Validates pull request formatting against requirements defined in the workflow. This workflow is not intended to
206- strictly validate exact formatting details but provide hints when simple, broad changes are needed to enhance the
207- quality of pull request verbiage.
352+ GitHub Action Summary
353+ =====================
208354
209- - The leaf workflow
210- - `.sync/workflows/leaf/pull-request-formatting-validator.yml `
355+ Following is a brief summary of the GitHub Actions maintained in the repository.
211356
212357Submodule Release Updater
213358-------------------------
@@ -217,8 +362,11 @@ that has a new GitHub release available. The leaf workflow can easily be synced
217362the GitHub action.
218363
219364- The GitHub action
365+
220366 - `.github/actions/submodule-release-updater `
367+
221368- The leaf workflow
369+
222370 - `.sync/workflows/leaf/submodule-release-update.yml `
223371
224372Links
0 commit comments