Skip to content

Commit

Permalink
New YML files for the CI pipeline for each feature and onboarding gui…
Browse files Browse the repository at this point in the history
…delines (#189)
  • Loading branch information
kythant committed Apr 8, 2022
1 parent e9d6a5c commit ad626a4
Show file tree
Hide file tree
Showing 11 changed files with 127 additions and 1 deletion.
7 changes: 7 additions & 0 deletions SamplesCI-DeploymentManager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "DeploymentManager"
7 changes: 7 additions & 0 deletions SamplesCI-Insights.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "Insights"
7 changes: 7 additions & 0 deletions SamplesCI-Installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "Installer"
7 changes: 7 additions & 0 deletions SamplesCI-Notifications.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "Notifications"
7 changes: 7 additions & 0 deletions SamplesCI-PhotoEditor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "PhotoEditor"
7 changes: 7 additions & 0 deletions SamplesCI-ResourceManagement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "ResourceManagement"
7 changes: 7 additions & 0 deletions SamplesCI-TextRendering.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "TextRendering"
7 changes: 7 additions & 0 deletions SamplesCI-Unpackaged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "Unpackaged"
7 changes: 7 additions & 0 deletions SamplesCI-Windowing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "Windowing"
3 changes: 2 additions & 1 deletion docs/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ Please specify which release this PR should align with. e.g., 1.0, 1.1, 1.1 Prev
- [ ] Samples set the minimum supported OS version to Windows 10 version 1809.
- [ ] Samples build clean with no warnings or errors.
- [ ] **[For new samples]**: Samples have completed the [sample guidelines checklist](https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/docs/samples-guidelines.md#checklist) and follow [standardization/naming guidelines](https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/docs/samples-guidelines.md#standardization-and-naming).
- [ ] I have commented on my PR `/azp run` to have the CI build run on my branch. This must be done right before merging to ensure the build is up to date and accurate.
- [ ] If I am onboarding a new feature, then I must have correctly setup a new CI pipeline for my feature with the correct triggers and path filters laid out in the "Onboarding Samples CI Pipeline for new feature" section in samples-guidelines.md.
- [ ] I have commented on my PR `/azp run` to have the CI build run on my branch with the right feature pipeline. This must be done right before merging to ensure the build is up to date and accurate.
62 changes: 62 additions & 0 deletions docs/samples-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,68 @@ The `main` branch represents the head of development, so it may include experime

Samples should build on all supported platforms (x64, x86, ARM64) and configurations (Debug, Release). Samples should set the minimum version to Windows 10 version 1809.

### Onboarding Samples CI Pipeline for new feature
PRs with new features must be setup with a new CI pipeline specific to each feature.

#### Steps:
##### Create a new yml file at the root named SamplesCI-<FeatureName>.yml.
It should have the contents below:
```
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
stages:
- template: WindowsAppSDK-SamplesCI.yml
parameters:
FeatureDirectory: "<FeatureName>"
```
##### Creating the pipeline

Go to https://dev.azure.com/ms/ProjectReunion/_build
-> Click New Pipeline
-> GitHub
-> Select Repository "microsoft/WindowsAppSDK-Samples"
-> Configure your pipeline: Select "Existing Azure Pipelines YAML File"
-> Branch: "<YourPRBranch>" and Path: "SamplesCI-<FeatureName>.yml" -> Continue
(Branch will be set to main later but can't be done right now because it doesn't exist on main yet)
-> Click Run

Warning: On the first run, you might need to permit resources for the pipeline to run. If you don't have the permission, please ask the repo admins to do so.

##### Configuring the settings on the pipeline

Once you have started your run on the previous step, you can click the three dots on the top right,
which will bring up a menu option with "Edit pipeline" and this is where you want to go to.
This will bring you to the yml itself. Click the three dots on the top right again and select "Triggers"

Triggers must have these settings below

##### Continuous Integration
- Check "Override the YAML continuous integration trigger from here"
- Click the "Disable continuous integration" radio button
##### Pull request validation
- Check "Override the YAML pull request trigger from here"
and click "Enable pull request validation"
Branch Filters
- Include "refs/heads/main"
Path Filters
- Include "Samples/<FeatureName>"
Forks
- Check "Build pull requests from forks of this repository"
Comments
- Check "Require a team member's comment before building a pull request"
- Click the "On all pull requests" radio button

##### Lastly rename the pipeline to "SamplesCI-<FeatureName>". That can be done by clicking on the name on top of the page.

##### Setup status checks on https://github.com/microsoft/WindowsAppSDK-Samples/settings/branches
In Branch Protection rules

Click "Edit" on the main branch and add your new pipeline to the collection of other pipelines in "Require status checks to pass before merging"

Warning: it might take a while for your new pipeline to show up. Please don't just add the the check with the individual job with a specific config and platform. Make sure to add the full "SamplesCI-<FeatureName>"

If you do not have permissions to modify these settings, please ask the repo admins to help you do so.


### Deploy and test

Deploy and test your samples on Desktop.
Expand Down

0 comments on commit ad626a4

Please sign in to comment.