Skip to content

Commit

Permalink
Web updates (#803)
Browse files Browse the repository at this point in the history
  • Loading branch information
BernieWhite authored Jun 17, 2021
1 parent 3be4692 commit 65255bb
Show file tree
Hide file tree
Showing 268 changed files with 3,673 additions and 1,707 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and deploy docs
on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.8.5'
architecture: 'x64'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install wheel
python3 -m pip install -r requirements-docs.txt
- name: Build site
run: mkdocs build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
.vs/
reports/
out/
site/
**/bin/
**/obj/
**/__pycache__/
BenchmarkDotNet.Artifacts/
results/
*.zip
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"Qualys",
"RBAC",
"SKUs",
"TLDR",
"VNET",
"VNETs",
"agentpool",
Expand Down
99 changes: 95 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@
"presentation": {
"clear": true,
"panel": "dedicated"
},
"linux":{
"options": {
"shell": {
"executable": "pwsh",
"args": [
"-c"
]
}
}
}
},
{
Expand All @@ -32,6 +42,16 @@
"presentation": {
"clear": true,
"panel": "dedicated"
},
"linux":{
"options": {
"shell": {
"executable": "pwsh",
"args": [
"-c"
]
}
}
}
},
{
Expand Down Expand Up @@ -59,13 +79,33 @@
"presentation": {
"clear": true,
"panel": "dedicated"
},
"linux":{
"options": {
"shell": {
"executable": "pwsh",
"args": [
"-c"
]
}
}
}
},
{
"label": "clean",
"type": "shell",
"command": "Invoke-Build Clean",
"problemMatcher": []
"problemMatcher": [],
"linux":{
"options": {
"shell": {
"executable": "pwsh",
"args": [
"-c"
]
}
}
}
},
{
"label": "script-analyzer",
Expand All @@ -81,7 +121,17 @@
"label": "build-docs",
"type": "shell",
"command": "Invoke-Build BuildHelp",
"problemMatcher": []
"problemMatcher": [],
"linux":{
"options": {
"shell": {
"executable": "pwsh",
"args": [
"-c"
]
}
}
}
},
{
"label": "scaffold-docs",
Expand All @@ -94,20 +144,61 @@
"detail": "Generate rule and baseline documentation.",
"type": "shell",
"command": "Invoke-Build BuildDocs",
"problemMatcher": []
"problemMatcher": [],
"linux":{
"options": {
"shell": {
"executable": "pwsh",
"args": [
"-c"
]
}
}
}
},
{
"label": "Export data",
"detail": "Export a list of resource providers from an Azure subscription.",
"type": "shell",
"command": "Invoke-Build ExportData",
"problemMatcher": []
"problemMatcher": [],
"linux":{
"options": {
"shell": {
"executable": "pwsh",
"args": [
"-c"
]
}
}
}
},
{
"label": "benchmark",
"type": "shell",
"command": "Invoke-Build Benchmark",
"problemMatcher": [],
"presentation": {
"clear": true,
"panel": "dedicated"
},
"linux":{
"options": {
"shell": {
"executable": "pwsh",
"args": [
"-c"
]
}
}
}
},
{
"label": "Serve docs",
"detail": "Build and run documentation site locally.",
"type": "shell",
"command": "mkdocs serve",
"problemMatcher": [],
"presentation": {
"clear": true,
"panel": "dedicated"
Expand Down
2 changes: 1 addition & 1 deletion BaselineToc.Doc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Document 'baseline' {
'Obsolete' | BlockQuote
}

Import-Module .\out\modules\PSRule.Rules.Azure;
Import-Module ./out/modules/PSRule.Rules.Azure;
$rules = @(Get-PSRule -Module PSRule.Rules.Azure -Baseline $baselineName -WarningAction SilentlyContinue);
$ruleCount = $rules.Length;

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ Rule documentation requires the following annotations:

- Rules are stored in `src/PSRule.Rules.Azure/rules/`.
- Rules are organized into separate `.Rule.ps1` files based on service.
- Rule documentation in English is stored in `docs/rules/en/`.
- Additional cultures can be added in a subdirectory under `docs/rules/`.
- Rule documentation in English is stored in `docs/en/rules/`.
- Additional cultures can be added in a subdirectory under `docs/`.
- Use pre-conditions to limit the type of resource a rule applies to.

Each rule **must** meet the following requirements:
Expand Down
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,28 +291,28 @@ For walk through examples of `PSRule.Rules.Azure` module usage see:

PSRule for Azure includes rules across five pillars of the [Microsoft Azure Well-Architected Framework][AWAF].

- [Rules for architecture excellence](docs/rules/en/module.md)
- [Cost Optimization](docs/rules/en/module.md#cost-optimization)
- [Operational Excellence](docs/rules/en/module.md#operational-excellence)
- [Performance Efficiency](docs/rules/en/module.md#performance-efficiency)
- [Reliability](docs/rules/en/module.md#reliability)
- [Security](docs/rules/en/module.md#security)
- [Rules for architecture excellence](docs/en/rules/module.md)
- [Cost Optimization](docs/en/rules/module.md#cost-optimization)
- [Operational Excellence](docs/en/rules/module.md#operational-excellence)
- [Performance Efficiency](docs/en/rules/module.md#performance-efficiency)
- [Reliability](docs/en/rules/module.md#reliability)
- [Security](docs/en/rules/module.md#security)

To view a list of rules by Azure resources see:

- [Rules by resource](docs/rules/en/resource.md)
- [Rules by resource](docs/en/rules/resource.md)

## Baseline reference

The following baselines are included within `PSRule.Rules.Azure`.

- [Azure.Default](docs/baselines/en/Azure.Default.md) - Default baseline for Azure rules.
- [Azure.Preview](docs/baselines/en/Azure.Preview.md) - Includes Azure features in preview.
- [Azure.All](docs/baselines/en/Azure.All.md) - Includes all Azure rules.
- [Azure.GA_2020_06](docs/baselines/en/Azure.GA_2020_06.md) - Baseline for GA rules released June 2020 or prior.
- [Azure.GA_2020_09](docs/baselines/en/Azure.GA_2020_09.md) - Baseline for GA rules released September 2020 or prior.
- [Azure.GA_2020_12](docs/baselines/en/Azure.GA_2020_12.md) - Baseline for GA rules released December 2020 or prior.
- [Azure.GA_2021_03](docs/baselines/en/Azure.GA_2021_03.md) - Baseline for GA rules released March 2021 or prior.
- [Azure.Default](docs/en/baselines/Azure.Default.md) - Default baseline for Azure rules.
- [Azure.Preview](docs/en/baselines/Azure.Preview.md) - Includes Azure features in preview.
- [Azure.All](docs/en/baselines/Azure.All.md) - Includes all Azure rules.
- [Azure.GA_2020_06](docs/en/baselines/Azure.GA_2020_06.md) - Baseline for GA rules released June 2020 or prior.
- [Azure.GA_2020_09](docs/en/baselines/Azure.GA_2020_09.md) - Baseline for GA rules released September 2020 or prior.
- [Azure.GA_2020_12](docs/en/baselines/Azure.GA_2020_12.md) - Baseline for GA rules released December 2020 or prior.
- [Azure.GA_2021_03](docs/en/baselines/Azure.GA_2021_03.md) - Baseline for GA rules released March 2021 or prior.

## Language reference

Expand All @@ -322,24 +322,24 @@ PSRule for Azure extends PowerShell with the following cmdlets.

The following commands exist in the `PSRule.Rules.Azure` module:

- [Export-AzRuleData](docs/commands/PSRule.Rules.Azure/en-US/Export-AzRuleData.md) - Export resource configuration data from Azure subscriptions.
- [Export-AzRuleTemplateData](docs/commands/PSRule.Rules.Azure/en-US/Export-AzRuleTemplateData.md) - Export resource configuration data from Azure templates.
- [Get-AzRuleTemplateLink](docs/commands/PSRule.Rules.Azure/en-US/Get-AzRuleTemplateLink.md) - Get a metadata link to a Azure template file.
- [Export-AzRuleData](docs/commands/Export-AzRuleData.md) - Export resource configuration data from Azure subscriptions.
- [Export-AzRuleTemplateData](docs/commands/Export-AzRuleTemplateData.md) - Export resource configuration data from Azure templates.
- [Get-AzRuleTemplateLink](docs/commands/Get-AzRuleTemplateLink.md) - Get a metadata link to a Azure template file.

### Concepts

The following conceptual topics exist in the `PSRule.Rules.Azure` module:

- [Azure metadata link](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Metadata_Link.md)
- [Configuration](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Configuration.md)
- [Azure_AKSMinimumVersion](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Configuration.md#azure_aksminimumversion)
- [Azure_AKSNodeMinimumMaxPods](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Configuration.md#azure_aksnodeminimummaxpods)
- [Azure_AllowedRegions](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Configuration.md#azure_allowedregions)
- [Azure_MinimumCertificateLifetime](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Configuration.md#azure_minimumcertificatelifetime)
- [AZURE_PARAMETER_FILE_EXPANSION](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Configuration.md#azure_parameter_file_expansion)
- [AZURE_POLICY_WAIVER_MAX_EXPIRY](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Configuration.md#azure_policy_waiver_max_expiry)
- [AZURE_RESOURCE_GROUP](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Configuration.md#azure_resource_group)
- [AZURE_SUBSCRIPTION](docs/concepts/PSRule.Rules.Azure/en-US/about_PSRule_Azure_Configuration.md#azure_subscription)
- [Azure metadata link](docs/concepts/about_PSRule_Azure_Metadata_Link.md)
- [Configuration](docs/concepts/about_PSRule_Azure_Configuration.md)
- [Azure_AKSMinimumVersion](docs/concepts/about_PSRule_Azure_Configuration.md#azure_aksminimumversion)
- [Azure_AKSNodeMinimumMaxPods](docs/concepts/about_PSRule_Azure_Configuration.md#azure_aksnodeminimummaxpods)
- [Azure_AllowedRegions](docs/concepts/about_PSRule_Azure_Configuration.md#azure_allowedregions)
- [Azure_MinimumCertificateLifetime](docs/concepts/about_PSRule_Azure_Configuration.md#azure_minimumcertificatelifetime)
- [AZURE_PARAMETER_FILE_EXPANSION](docs/concepts/about_PSRule_Azure_Configuration.md#azure_parameter_file_expansion)
- [AZURE_POLICY_WAIVER_MAX_EXPIRY](docs/concepts/about_PSRule_Azure_Configuration.md#azure_policy_waiver_max_expiry)
- [AZURE_RESOURCE_GROUP](docs/concepts/about_PSRule_Azure_Configuration.md#azure_resource_group)
- [AZURE_SUBSCRIPTION](docs/concepts/about_PSRule_Azure_Configuration.md#azure_subscription)

## Related projects

Expand Down
4 changes: 2 additions & 2 deletions RuleToc.Doc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Document 'module' {
Title 'Rules for architecture excellence'

Import-Module .\out\modules\PSRule.Rules.Azure
Import-Module ./out/modules/PSRule.Rules.Azure
$rules = Get-PSRule -Module PSRule.Rules.Azure -Baseline Azure.All -WarningAction SilentlyContinue |
Add-Member -MemberType ScriptProperty -Name Category -Value { $this.Info.Annotations.category } -PassThru |
Add-Member -MemberType ScriptProperty -Name Pillar -Value { $this.Info.Annotations.pillar } -PassThru |
Expand Down Expand Up @@ -36,7 +36,7 @@ Document 'module' {
Document 'resource' {
Title 'Rules by resource'

Import-Module .\out\modules\PSRule.Rules.Azure
Import-Module ./out/modules/PSRule.Rules.Azure
$rules = Get-PSRule -Module PSRule.Rules.Azure -Baseline Azure.All -WarningAction SilentlyContinue |
Add-Member -MemberType ScriptProperty -Name Resource -Value { $this.Info.Annotations.resource } -PassThru |
Sort-Object -Property Resource;
Expand Down
4 changes: 2 additions & 2 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Please search the existing issues before filing new issues to avoid duplicates.

Support for this project/ product is limited to the resources listed above.

[issue]: https://github.com/microsoft/PSRule.Rules.Azure/issues
[discussion]: https://github.com/microsoft/PSRule.Rules.Azure/discussions
[issue]: https://github.com/Azure/PSRule.Rules.Azure/issues
[discussion]: https://github.com/Azure/PSRule.Rules.Azure/discussions
[troubleshooting guide]: docs/troubleshooting.md
Binary file added docs/assets/ms_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@keyframes heart {
0%, 40%, 80%, 100% {
transform: scale(1);
}
20%, 60% {
transform: scale(1.15);
}
}

.heart {
animation: heart 1000ms infinite;
color:#e91e63;
}

:root {
--md-success-invert-color: #fff;
--md-success-color: #107c10;
}
Loading

0 comments on commit 65255bb

Please sign in to comment.