From 95a889ac06fea658913ec8b12b511f980f166e66 Mon Sep 17 00:00:00 2001 From: Rosario Pulella Date: Sat, 25 Sep 2021 12:40:12 -0400 Subject: [PATCH 01/10] Document our CI pipeline and its compoents --- CI-and-Infrastructure.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CI-and-Infrastructure.md diff --git a/CI-and-Infrastructure.md b/CI-and-Infrastructure.md new file mode 100644 index 0000000..44cd641 --- /dev/null +++ b/CI-and-Infrastructure.md @@ -0,0 +1,9 @@ +## CI Processes + +### Azure Pipelines +The [Azure instance](https://dev.azure.com/dotnet/CommunityToolkit) runs all of our CI processes. Our Azure pipelines configuration is found at the root of the project, [azure-pipelines.yml](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/azure-pipelines.yml) + +**Jobs** are specified in the pipelines config. The status and results of jobs are reported as [Github Checks](https://docs.github.com/en/github/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks). The status and results of individual steps for each job are visible on azure ( usually directly linked to in Github Checks ). + +### Cake +A lot of the pipeline jobs make use of [Cake Tasks](https://cakebuild.net/docs/writing-builds/tasks/) defined in [build/build.cake](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.cake). Cake Tasks are invoked threw [build/build.ps1](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.ps1) in the pipelines config and the various task can be ran from powershell using the **Target** option, for example `.\build.ps1 -Target UpdateHeaders`. It is recommended that the build scripts are invoked from the build directory. \ No newline at end of file From ac4c091343e0ba5c2f8e0cd127ae30a16f1da45a Mon Sep 17 00:00:00 2001 From: Rosario Pulella Date: Tue, 28 Sep 2021 17:11:29 -0400 Subject: [PATCH 02/10] Add info about the major CI tasks --- CI-and-Infrastructure.md | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/CI-and-Infrastructure.md b/CI-and-Infrastructure.md index 44cd641..a2cca82 100644 --- a/CI-and-Infrastructure.md +++ b/CI-and-Infrastructure.md @@ -1,9 +1,27 @@ -## CI Processes - -### Azure Pipelines -The [Azure instance](https://dev.azure.com/dotnet/CommunityToolkit) runs all of our CI processes. Our Azure pipelines configuration is found at the root of the project, [azure-pipelines.yml](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/azure-pipelines.yml) +# CI Pipeline +An [Azure instance](https://dev.azure.com/dotnet/CommunityToolkit) runs our CI pipeline. Our Azure pipelines configuration is found at the root of the project, [azure-pipelines.yml](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/azure-pipelines.yml) **Jobs** are specified in the pipelines config. The status and results of jobs are reported as [Github Checks](https://docs.github.com/en/github/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks). The status and results of individual steps for each job are visible on azure ( usually directly linked to in Github Checks ). +The CI pipeline get triggered to run on `main`, `dev/*` or `rel/*` branches when new commits get pushed to or PRs are opened targeting those branches. + ### Cake -A lot of the pipeline jobs make use of [Cake Tasks](https://cakebuild.net/docs/writing-builds/tasks/) defined in [build/build.cake](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.cake). Cake Tasks are invoked threw [build/build.ps1](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.ps1) in the pipelines config and the various task can be ran from powershell using the **Target** option, for example `.\build.ps1 -Target UpdateHeaders`. It is recommended that the build scripts are invoked from the build directory. \ No newline at end of file +A lot of the pipeline jobs make use of [Cake Tasks](https://cakebuild.net/docs/writing-builds/tasks/) defined in [build/build.cake](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.cake). Cake Tasks are invoked threw [build/build.ps1](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.ps1) in the pipelines config and the various task can be ran from powershell using the **Target** option, for example `.\build.ps1 -Target UpdateHeaders`. It is recommended that the build scripts are invoked from the build directory. + +## CI Tasks +The CI pipeline preforms five tasks when triggered to run on a branch. + +### Check formatting +Various formatting checks are run very early on in the CI pipeline. Currently we verify that all `*.cs` files contain the .NET Foundation license at the top of the file and we check all `*.xaml` with XAML Styler. + +### Build +All our projects are built, this includes libraries, tests, and the Sample app. While this step primarily to feed into building the packages, it also makes sure that there are not compilation issues with the libraries, as well no compilation issues with the sample app. This helps make sure that the sample app is always an accurate example of using the libraries. + +### Test +Once all the libraries are built the our tests are ran, see [Testing](Testing.md). + +### Publishing +The libraries are packaged into NuGet packages and automatically published to our Azure Feeds, see [Preview Packages](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Preview-Packages). + +### Package analysis +We perform analysis on the changes of in size of packages as well how much the sizes of apps using these packages change. \ No newline at end of file From 9aeb9323e18d30d39f950aedbbe344efb8a3ffd2 Mon Sep 17 00:00:00 2001 From: Rosario Pulella Date: Wed, 29 Sep 2021 11:13:25 -0400 Subject: [PATCH 03/10] Formating --- CI-and-Infrastructure.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/CI-and-Infrastructure.md b/CI-and-Infrastructure.md index a2cca82..0367d4b 100644 --- a/CI-and-Infrastructure.md +++ b/CI-and-Infrastructure.md @@ -1,21 +1,29 @@ # CI Pipeline -An [Azure instance](https://dev.azure.com/dotnet/CommunityToolkit) runs our CI pipeline. Our Azure pipelines configuration is found at the root of the project, [azure-pipelines.yml](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/azure-pipelines.yml) +An [Azure instance](https://dev.azure.com/dotnet/CommunityToolkit) runs our CI pipeline. +Our Azure pipelines configuration is found at the root of the project, [azure-pipelines.yml](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/azure-pipelines.yml) -**Jobs** are specified in the pipelines config. The status and results of jobs are reported as [Github Checks](https://docs.github.com/en/github/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks). The status and results of individual steps for each job are visible on azure ( usually directly linked to in Github Checks ). +**Jobs** are specified in the pipelines config. +The status and results of jobs are reported as [Github Checks](https://docs.github.com/en/github/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks). +The status and results of individual steps for each job are visible on azure ( usually directly linked to in Github Checks ). The CI pipeline get triggered to run on `main`, `dev/*` or `rel/*` branches when new commits get pushed to or PRs are opened targeting those branches. ### Cake -A lot of the pipeline jobs make use of [Cake Tasks](https://cakebuild.net/docs/writing-builds/tasks/) defined in [build/build.cake](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.cake). Cake Tasks are invoked threw [build/build.ps1](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.ps1) in the pipelines config and the various task can be ran from powershell using the **Target** option, for example `.\build.ps1 -Target UpdateHeaders`. It is recommended that the build scripts are invoked from the build directory. +A lot of the pipeline jobs make use of [Cake Tasks](https://cakebuild.net/docs/writing-builds/tasks/) defined in [build/build.cake](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.cake). +Cake Tasks are invoked threw [build/build.ps1](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.ps1) in the pipelines config and the various task can be ran from powershell using the **Target** option, for example `.\build.ps1 -Target UpdateHeaders`. +It is recommended that the build scripts are invoked from the build directory. ## CI Tasks The CI pipeline preforms five tasks when triggered to run on a branch. ### Check formatting -Various formatting checks are run very early on in the CI pipeline. Currently we verify that all `*.cs` files contain the .NET Foundation license at the top of the file and we check all `*.xaml` with XAML Styler. +Various formatting checks are run very early on in the CI pipeline. +Currently we verify that all `*.cs` files contain the .NET Foundation license at the top of the file and we check all `*.xaml` with XAML Styler. ### Build -All our projects are built, this includes libraries, tests, and the Sample app. While this step primarily to feed into building the packages, it also makes sure that there are not compilation issues with the libraries, as well no compilation issues with the sample app. This helps make sure that the sample app is always an accurate example of using the libraries. +All our projects are built, this includes libraries, tests, and the Sample app. +While this step primarily to feed into building the packages, it also makes sure that there are not compilation issues with the libraries, as well no compilation issues with the sample app. +This helps make sure that the sample app is always an accurate example of using the libraries. ### Test Once all the libraries are built the our tests are ran, see [Testing](Testing.md). From f7b18c7ee86b41b4d7d11fd5ac75914f97dada27 Mon Sep 17 00:00:00 2001 From: Rosario Pulella Date: Wed, 29 Sep 2021 11:15:47 -0400 Subject: [PATCH 04/10] Fix verbage --- CI-and-Infrastructure.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI-and-Infrastructure.md b/CI-and-Infrastructure.md index 0367d4b..82f726a 100644 --- a/CI-and-Infrastructure.md +++ b/CI-and-Infrastructure.md @@ -28,8 +28,8 @@ This helps make sure that the sample app is always an accurate example of using ### Test Once all the libraries are built the our tests are ran, see [Testing](Testing.md). -### Publishing +### Publish The libraries are packaged into NuGet packages and automatically published to our Azure Feeds, see [Preview Packages](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Preview-Packages). -### Package analysis +### Analyze We perform analysis on the changes of in size of packages as well how much the sizes of apps using these packages change. \ No newline at end of file From 928063d7768df6f1252ebb8a22c5a6f5e4d71857 Mon Sep 17 00:00:00 2001 From: Rosario Pulella Date: Wed, 29 Sep 2021 11:23:11 -0400 Subject: [PATCH 05/10] Fix links to other wiki pages --- CI-and-Infrastructure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI-and-Infrastructure.md b/CI-and-Infrastructure.md index 82f726a..61c912b 100644 --- a/CI-and-Infrastructure.md +++ b/CI-and-Infrastructure.md @@ -26,7 +26,7 @@ While this step primarily to feed into building the packages, it also makes sure This helps make sure that the sample app is always an accurate example of using the libraries. ### Test -Once all the libraries are built the our tests are ran, see [Testing](Testing.md). +Once all the libraries are built the our tests are ran, see [Testing](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Testing). ### Publish The libraries are packaged into NuGet packages and automatically published to our Azure Feeds, see [Preview Packages](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Preview-Packages). From 4a18a20dc2be4b986297cea9ca76588c5ff5ac80 Mon Sep 17 00:00:00 2001 From: Rosario Pulella Date: Wed, 29 Sep 2021 12:42:40 -0400 Subject: [PATCH 06/10] Add docs on adding to the CI pipeline --- CI-and-Infrastructure.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CI-and-Infrastructure.md b/CI-and-Infrastructure.md index 61c912b..30b63b5 100644 --- a/CI-and-Infrastructure.md +++ b/CI-and-Infrastructure.md @@ -6,6 +6,9 @@ Our Azure pipelines configuration is found at the root of the project, [azure-pi The status and results of jobs are reported as [Github Checks](https://docs.github.com/en/github/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks). The status and results of individual steps for each job are visible on azure ( usually directly linked to in Github Checks ). +Jobs can be added and modified in the pipelines config file. +Checkout the [Azure Pipelines Doc](https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops) for more info. + The CI pipeline get triggered to run on `main`, `dev/*` or `rel/*` branches when new commits get pushed to or PRs are opened targeting those branches. ### Cake @@ -13,6 +16,11 @@ A lot of the pipeline jobs make use of [Cake Tasks](https://cakebuild.net/docs/w Cake Tasks are invoked threw [build/build.ps1](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.ps1) in the pipelines config and the various task can be ran from powershell using the **Target** option, for example `.\build.ps1 -Target UpdateHeaders`. It is recommended that the build scripts are invoked from the build directory. +Cake tasks can be added to the cake file, either to be executed directly from the pipelines config or to be invoked manually. +Also any task can be added as a dependency to another Task. +When `.\build.ps1` is ran (without any options), it runs the Task "Default" and thus all its dependencies. +This task if not typically used in the build pipeline, but it is useful for locally running a most of the CI pipeline locally in order to test changes locally without having to wait on the CI Server. + ## CI Tasks The CI pipeline preforms five tasks when triggered to run on a branch. From 50409e31a5fd2a6419f93ca64451054bfee1744f Mon Sep 17 00:00:00 2001 From: Darren Batchelor Date: Fri, 1 Oct 2021 11:19:57 -0700 Subject: [PATCH 07/10] Updated doc with changes --- CI-and-Infrastructure.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CI-and-Infrastructure.md b/CI-and-Infrastructure.md index 30b63b5..8af4531 100644 --- a/CI-and-Infrastructure.md +++ b/CI-and-Infrastructure.md @@ -13,7 +13,7 @@ The CI pipeline get triggered to run on `main`, `dev/*` or `rel/*` branches when ### Cake A lot of the pipeline jobs make use of [Cake Tasks](https://cakebuild.net/docs/writing-builds/tasks/) defined in [build/build.cake](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.cake). -Cake Tasks are invoked threw [build/build.ps1](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.ps1) in the pipelines config and the various task can be ran from powershell using the **Target** option, for example `.\build.ps1 -Target UpdateHeaders`. +Cake Tasks are invoked through [build/build.ps1](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.ps1) in the pipelines config, and the various tasks can be ran from powershell using the **Target** option, for example `.\build.ps1 -Target UpdateHeaders`. It is recommended that the build scripts are invoked from the build directory. Cake tasks can be added to the cake file, either to be executed directly from the pipelines config or to be invoked manually. @@ -22,22 +22,22 @@ When `.\build.ps1` is ran (without any options), it runs the Task "Default" and This task if not typically used in the build pipeline, but it is useful for locally running a most of the CI pipeline locally in order to test changes locally without having to wait on the CI Server. ## CI Tasks -The CI pipeline preforms five tasks when triggered to run on a branch. +The CI pipeline performs five tasks when triggered to run on a branch. ### Check formatting Various formatting checks are run very early on in the CI pipeline. Currently we verify that all `*.cs` files contain the .NET Foundation license at the top of the file and we check all `*.xaml` with XAML Styler. ### Build -All our projects are built, this includes libraries, tests, and the Sample app. -While this step primarily to feed into building the packages, it also makes sure that there are not compilation issues with the libraries, as well no compilation issues with the sample app. +All our projects are built - this includes libraries, tests, and the Sample app. +While this step is primarily used to feed into the package build process, it also makes sure that there are not compilation issues with the libraries, as well no compilation issues with the sample app. This helps make sure that the sample app is always an accurate example of using the libraries. ### Test -Once all the libraries are built the our tests are ran, see [Testing](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Testing). +Once all the libraries are built, our tests are ran - see [Testing](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Testing). ### Publish -The libraries are packaged into NuGet packages and automatically published to our Azure Feeds, see [Preview Packages](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Preview-Packages). +The libraries are packaged into NuGet packages and automatically published to our Azure Feeds - see [Preview Packages](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Preview-Packages). ### Analyze -We perform analysis on the changes of in size of packages as well how much the sizes of apps using these packages change. \ No newline at end of file +We perform analysis on the changes in the size of packages, as well as how much the sizes of apps using these packages change. \ No newline at end of file From 24a187fbc210c5122537b78193d4346aca218905 Mon Sep 17 00:00:00 2001 From: Darren Batchelor Date: Wed, 10 Nov 2021 15:23:21 -0800 Subject: [PATCH 08/10] Implemented changes --- CI-and-Infrastructure.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CI-and-Infrastructure.md b/CI-and-Infrastructure.md index 8af4531..4462e37 100644 --- a/CI-and-Infrastructure.md +++ b/CI-and-Infrastructure.md @@ -1,20 +1,21 @@ # CI Pipeline An [Azure instance](https://dev.azure.com/dotnet/CommunityToolkit) runs our CI pipeline. -Our Azure pipelines configuration is found at the root of the project, [azure-pipelines.yml](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/azure-pipelines.yml) +Our Azure pipelines configuration is found at the root of the repository, e.g. [azure-pipelines.yml](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/azure-pipelines.yml) **Jobs** are specified in the pipelines config. -The status and results of jobs are reported as [Github Checks](https://docs.github.com/en/github/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks). +The status and results of jobs are reported as [Github Checks](https://docs.github.com/github/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks). The status and results of individual steps for each job are visible on azure ( usually directly linked to in Github Checks ). Jobs can be added and modified in the pipelines config file. -Checkout the [Azure Pipelines Doc](https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops) for more info. +Checkout the [Azure Pipelines Doc](https://docs.microsoft.com/azure/devops/pipelines/) for more info. The CI pipeline get triggered to run on `main`, `dev/*` or `rel/*` branches when new commits get pushed to or PRs are opened targeting those branches. ### Cake A lot of the pipeline jobs make use of [Cake Tasks](https://cakebuild.net/docs/writing-builds/tasks/) defined in [build/build.cake](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.cake). Cake Tasks are invoked through [build/build.ps1](https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/main/build/build.ps1) in the pipelines config, and the various tasks can be ran from powershell using the **Target** option, for example `.\build.ps1 -Target UpdateHeaders`. -It is recommended that the build scripts are invoked from the build directory. + +_Note: It is recommended that the build scripts are invoked from the build directory._ Cake tasks can be added to the cake file, either to be executed directly from the pipelines config or to be invoked manually. Also any task can be added as a dependency to another Task. @@ -34,10 +35,10 @@ While this step is primarily used to feed into the package build process, it als This helps make sure that the sample app is always an accurate example of using the libraries. ### Test -Once all the libraries are built, our tests are ran - see [Testing](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Testing). +Once all the libraries are built, our tests are ran - see [[Testing]]. ### Publish -The libraries are packaged into NuGet packages and automatically published to our Azure Feeds - see [Preview Packages](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki/Preview-Packages). +The libraries are packaged into NuGet packages and automatically published to our Azure Feeds - see [[Preview Packages]]. ### Analyze We perform analysis on the changes in the size of packages, as well as how much the sizes of apps using these packages change. \ No newline at end of file From dc8637d30da9d2e1dc50b3e78e8ce013a9868152 Mon Sep 17 00:00:00 2001 From: Darren Batchelor Date: Thu, 11 Nov 2021 13:36:32 -0800 Subject: [PATCH 09/10] Add link to the Sidebar --- _sidebar.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_sidebar.md b/_sidebar.md index 5fc2753..b4131f2 100644 --- a/_sidebar.md +++ b/_sidebar.md @@ -44,6 +44,7 @@ * [[Accessibility Guideline]] ♿ * [[Building XAML Controls]] 🎛 * [[Fabric Bot Services]] 🤖 +* [[CI and Infrastructure]] ### Project Structure From 11c0266464c952b9cff4fd083299dfa1d47a4e33 Mon Sep 17 00:00:00 2001 From: Darren Batchelor Date: Thu, 11 Nov 2021 13:57:11 -0800 Subject: [PATCH 10/10] emoji for CI & Infrastructure --- _sidebar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_sidebar.md b/_sidebar.md index b4131f2..35f4992 100644 --- a/_sidebar.md +++ b/_sidebar.md @@ -44,7 +44,7 @@ * [[Accessibility Guideline]] ♿ * [[Building XAML Controls]] 🎛 * [[Fabric Bot Services]] 🤖 -* [[CI and Infrastructure]] +* [[CI and Infrastructure]] 👾 ### Project Structure