Skip to content

Commit d13647a

Browse files
authored
Add support for Auto Documentation - Fixes #677 (#728)
1 parent 475885c commit d13647a

136 files changed

Lines changed: 1260 additions & 2104 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22
# Set default behavior to automatically normalize line endings.
33
###############################################################################
44
* text eol=crlf
5+
6+
# Ensure any exe files are treated as binary
7+
*.exe binary
8+
*.jpg binary
9+
*.xl* binary
10+
*.pfx binary

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
*.user
33
*.coverage
44
.vs
5+
.vscode
56
.psproj
67
.sln
78
markdownissues.txt
8-
TestResults.xml
99
output/

.vscode/analyzersettings.psd1

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
@{
2-
<#
3-
For the custom rules to work, the DscResource.Tests repo must be
4-
cloned. It is automatically clone as soon as any unit or
5-
integration tests are run.
6-
#>
7-
CustomRulePath = '.\DSCResource.Tests\DscResource.AnalyzerRules'
2+
CustomRulePath = '.\output\RequiredModules\DscResource.AnalyzerRules'
3+
includeDefaultRules = $true
84

95
IncludeRules = @(
106
# DSC Resource Kit style guideline rules.
@@ -43,11 +39,6 @@
4339
'PSUseDeclaredVarsMoreThanAssignments',
4440
'PSUsePSCredentialType',
4541

46-
<#
47-
This is to test all the DSC Resource Kit custom rules.
48-
The name of the function-blocks of each custom rule start
49-
with 'Measure*'.
50-
#>
5142
'Measure-*'
5243
)
5344
}

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"powershell.codeFormatting.whitespaceAroundOperator": true,
99
"powershell.codeFormatting.whitespaceAfterSeparator": true,
1010
"powershell.codeFormatting.ignoreOneLineBlock": false,
11+
"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline",
1112
"powershell.codeFormatting.preset": "Custom",
1213
"files.trimTrailingWhitespace": true,
1314
"files.insertFinalNewline": true,

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3030
- Improved integration test reliability by resetting the DSC LCM
3131
before executing each test using the `Reset-DscLcm`
3232
function - Fixes [Issue #686](https://github.com/dsccommunity/xPSDesiredStateConfiguration/issues/686).
33+
- Added build task `Generate_Conceptual_Help` to generate conceptual help
34+
for the DSC resource - Fixes [Issue #677](https://github.com/dsccommunity/xPSDesiredStateConfiguration/issues/677).
35+
- Added build task `Generate_Wiki_Content` to generate the wiki content
36+
that can be used to update the GitHub Wiki - Fixes [Issue #677](https://github.com/dsccommunity/xPSDesiredStateConfiguration/issues/677).
3337
- xDSCWebService:
3438
- Moved strings into localization file - Fixes [Issue #622](https://github.com/dsccommunity/xPSDesiredStateConfiguration/issues/622).
3539
- Corrected case of `CertificateThumbPrint` to `CertificateThumbprint`.
@@ -38,6 +42,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3842
- Updated build to use `Sampler.GitHubTasks` - Fixes [Issue #711](https://github.com/dsccommunity/xPSDesiredStateConfiguration/issues/711).
3943
- Added support for publishing code coverage to `CodeCov.io` and
4044
Azure Pipelines - Fixes [Issue #711](https://github.com/dsccommunity/xPSDesiredStateConfiguration/issues/711).
45+
- Updated vmImage used for build stage of CI to use `Windows-2019` to resolve
46+
issues with Wiki Generation of `xUploadFile` composite resource on Linux agents.
4147

4248
## [9.1.0] - 2020-02-19
4349

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Contributing
2+
3+
Please check out common DSC Community [contributing guidelines](https://dsccommunity.org/guidelines/contributing).
4+
5+
## Running the Tests
6+
7+
If want to know how to run this module's tests you can look at
8+
the [Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines/#running-tests).

README.md

Lines changed: 51 additions & 1124 deletions
Large diffs are not rendered by default.

RequiredModules.psd1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
ModuleBuilder = 'latest'
1414
ChangelogManagement = 'latest'
1515
Sampler = 'latest'
16+
MarkdownLinkCheck = 'latest'
1617
'Sampler.GitHubTasks' = 'latest'
1718
'DscResource.Test' = 'latest'
1819
'DscResource.AnalyzerRules' = 'latest'
20+
'DscResource.DocGenerator' = 'latest'
1921
'DscResource.Common' = 'latest'
2022
xDscResourceDesigner = 'latest'
2123
NetworkingDsc = '7.4.0.0'

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ stages:
2424
- job: Package_Module
2525
displayName: 'Package Module'
2626
pool:
27-
vmImage: 'ubuntu 16.04'
27+
vmImage: 'windows-2019'
2828
steps:
2929
- task: GitVersion@5
3030
name: gitversion
@@ -123,7 +123,7 @@ stages:
123123
displayName: 'Publish Code Coverage'
124124
dependsOn: Test_Unit_2016
125125
pool:
126-
vmImage: 'ubuntu 16.04'
126+
vmImage: 'ubuntu-16.04'
127127
timeoutInMinutes: 0
128128
steps:
129129
- task: DownloadPipelineArtifact@2
@@ -269,7 +269,7 @@ stages:
269269
- job: Deploy_Module
270270
displayName: 'Deploy Module'
271271
pool:
272-
vmImage: 'ubuntu 16.04'
272+
vmImage: 'ubuntu-16.04'
273273
steps:
274274
- task: DownloadPipelineArtifact@2
275275
displayName: 'Download Pipeline Artifact'

build.ps1

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ param
1818
[validateScript(
1919
{ Test-Path -Path $_ }
2020
)]
21-
$BuildConfig = './build.yaml',
21+
$BuildConfig,
2222

2323
[Parameter()]
2424
# A Specific folder to build the artefact into.
@@ -35,22 +35,34 @@ param
3535
[Parameter()]
3636
$RequiredModulesDirectory = $(Join-Path 'output' 'RequiredModules'),
3737

38+
[Parameter()]
39+
[object[]]
40+
$PesterScript,
41+
3842
# Filter which tags to run when invoking Pester tests
3943
# This is used in the Invoke-Pester.pester.build.ps1 tasks
4044
[Parameter()]
4145
[string[]]
4246
$PesterTag,
4347

44-
[Parameter()]
45-
[string[]]
46-
$PesterScript,
47-
4848
# Filter which tags to exclude when invoking Pester tests
4949
# This is used in the Invoke-Pester.pester.build.ps1 tasks
5050
[Parameter()]
5151
[string[]]
5252
$PesterExcludeTag,
5353

54+
# Filter which tags to run when invoking DSC Resource tests
55+
# This is used in the DscResource.Test.build.ps1 tasks
56+
[Parameter()]
57+
[string[]]
58+
$DscTestTag,
59+
60+
# Filter which tags to exclude when invoking DSC Resource tests
61+
# This is used in the DscResource.Test.build.ps1 tasks
62+
[Parameter()]
63+
[string[]]
64+
$DscTestExcludeTag,
65+
5466
[Parameter()]
5567
[Alias('bootstrap')]
5668
[switch]$ResolveDependency,
@@ -210,6 +222,22 @@ process
210222

211223
Begin
212224
{
225+
# Find build config if not specified
226+
if (-not $BuildConfig) {
227+
$config = Get-ChildItem -Path "$PSScriptRoot\*" -Include 'build.y*ml', 'build.psd1', 'build.json*' -ErrorAction:Ignore
228+
if (-not $config -or ($config -is [array] -and $config.Length -le 0)) {
229+
throw "No build configuration found. Specify path via -BuildConfig"
230+
}
231+
elseif ($config -is [array]) {
232+
if ($config.Length -gt 1) {
233+
throw "More than one build configuration found. Specify which one to use via -BuildConfig"
234+
}
235+
$BuildConfig = $config[0]
236+
}
237+
else {
238+
$BuildConfig = $config
239+
}
240+
}
213241
# Bootstrapping the environment before using Invoke-Build as task runner
214242

215243
if ($MyInvocation.ScriptName -notLike '*Invoke-Build.ps1')
@@ -308,7 +336,7 @@ Begin
308336
# If BuildConfig is a Yaml file, bootstrap powershell-yaml via ResolveDependency
309337
if ($BuildConfig -match '\.[yaml|yml]$')
310338
{
311-
$ResolveDependencyParams.add('WithYaml', $true)
339+
$ResolveDependencyParams.add('WithYaml', $True)
312340
}
313341

314342
$ResolveDependencyAvailableParams = (Get-Command -Name '.\Resolve-Dependency.ps1').parameters.keys

0 commit comments

Comments
 (0)