This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
Enable resource modules to opt-in to publish example configurations to PowerShell Gallery #234
Labels
enhancement
The issue is an enhancement request.
Love some feedback on this, if there are any thoughts, suggestions or problems around this.
The proposal is to allow the test framework to publish the examples in the AppVeyor deploy step, but only if it is a ‘master’ branch build (
$env:APPVEYOR_REPO_BRANCH -eq 'master'
).It should deploy all scripts that passes
Test-ScriptFileInfo
. That way the contributors can control which examples, under the ‘Examples’ folder, are published . By adding script file information to an example, a resource module automatically opt-in to publish that example to the PowerShell Gallery (if already activated in the appveyor.yml).I suggest adding this as a new cmdlet in the appveyor.yml deply script step (
Invoke-AppVeyorDeployTask
). This is so that same functionality can be used for both the "default shared"-model and the "harness"-model, and also so that it is possible to manually run the deploy step if need be.For the Publish-Script to work each repo that opt-in must have the API Key as a secure environment variable in appveyor.yml - for DSC Resource Kit resource modules, this should be the same account (at least what I'm thinking now).
Published examples must have the same configuration name as the file name to be able to deploy in Azure Automation. Today the test framework looks for a configuration named
Example
in the example script file and tries to compile the example, that need to be changed in the test framework to be able to validate examples that should be published to PowerShell Gallery. Simplest is to try calling bothExample
(as today) and the same name as the filename, since examples published to the PowerShell Gallery must have the same file name as the configuration name.These are the requirements/dependencies for publishing to PowerShell Gallery (updated if new requirements/dependencies are found).
Test-ScriptFileInfo
.'^[0-9]+-'
) before publish (so they still work with auto-documentation).Done by contributors:
Example of script metadata, #Requires statement and comment-based help:
The text was updated successfully, but these errors were encountered: