Skip to content

Commit

Permalink
Migration to sampler (dsccommunity#121)
Browse files Browse the repository at this point in the history
* Migration to Sampler

* Migration to Sampler

* Fixed names

* Added GitVersion.yml

* Fixing "Access to the path '...\output\RequiredModules\powershell-yaml\0.4.2' is denied"

* Added on-prem pipeline

* Dependecy cleanup

* Updated lab scripts according to sampler update

* Added artifact publishing

* Typo

* Fixed timing issues when uploading GitVersion

* Added missing dependencies

* Updated chocolatey packages

* Updated download links

* Fixed duplicate entries

* Changed PSDepend file handling

* Added missing dependencies

* Added missing dependencies

* Error handling when uploading modules

* Updated config data

* Pack needs Datum structure for tests

* Adapted on-prem pipeline to new model

* Changed network adapter name according to the lab

* Updated to new versions

* Added new test 'Should not have duplicate node names' and formatting

* Using Recurse search in BeforeAll and some formatting

* Added zip extension

* Fixing lookup issues by adding the node to 'Resolve-NodeProperty' calls

* Changed MOF output path, contains the environment now

* Changed according to new paths and formatting

* Added GitVersion binaries

* Added pack task

* Formatting
  • Loading branch information
raandree authored Dec 31, 2021
1 parent a2d8263 commit 274d7ef
Show file tree
Hide file tree
Showing 96 changed files with 2,343 additions and 2,171 deletions.
19 changes: 17 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# Ensure these files are treated as binary
*.exe binary
# Needed for publishing of examples, build worker defaults to core.autocrlf=input.
* text eol=autocrlf

*.mof text eol=crlf
*.sh text eol=lf
*.svg eol=lf

# Ensure any exe files are treated as binary
*.exe binary
*.jpg binary
*.xl* binary
*.pfx binary
*.png binary
*.dll binary
*.so binary
*.zip binary
*.vsix binary
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/General.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: General question or documentation update
about: If you have a general question or documentation update suggestion around the resource module.
---
<!--
Your feedback and support is greatly appreciated, thanks for contributing!
-->
102 changes: 102 additions & 0 deletions .github/ISSUE_TEMPLATE/Problem_with_module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Problem with the module
description: If you have a problem using this module, want to report a bug, or suggest an enhancement to this module.
labels: []
assignees: []
body:
- type: markdown
attributes:
value: |
TITLE: Please be descriptive not sensationalist.
Your feedback and support is greatly appreciated, thanks for contributing!
Please provide information regarding your issue under each section below.
**Write N/A in sections that do not apply, or if the information is not available.**
- type: textarea
id: description
attributes:
label: Problem description
description: Details of the scenario you tried and the problem that is occurring, or the enhancement you are suggesting.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Verbose logs
description: |
Verbose logs showing the problem. **NOTE! Sensitive information should be obfuscated.** _Will be automatically formatted as plain text._
placeholder: |
Paste verbose logs here
render: text
validations:
required: true
- type: textarea
id: reproducible
attributes:
label: How to reproduce
description: Provide the steps to reproduce the problem.
validations:
required: true
- type: textarea
id: expectedBehavior
attributes:
label: Expected behavior
description: Describe what you expected to happen.
validations:
required: true
- type: textarea
id: currentBehavior
attributes:
label: Current behavior
description: Describe what actually happens.
validations:
required: true
- type: textarea
id: suggestedSolution
attributes:
label: Suggested solution
description: Do you have any suggestions how to solve the issue?
validations:
required: true
- type: textarea
id: targetNodeOS
attributes:
label: Operating system the target node is running
description: |
Please provide as much as possible about the node running CommonTasks2. _Will be automatically formatted as plain text._
To help with this information:
- On a Linux distribution, please provide the distribution name, version, and release. The following command can help get this information: `cat /etc/*-release && cat /proc/version`
- On a Windows OS please provide edition, version, build, and language. The following command can help get this information: `Get-ComputerInfo -Property @('OsName','OsOperatingSystemSKU','OSArchitecture','WindowsVersion','WindowsBuildLabEx','OsLanguage','OsMuiLanguages')`
placeholder: |
Add operating system information here
render: text
validations:
required: true
- type: textarea
id: targetNodePS
attributes:
label: PowerShell version and build the target node is running
description: |
Please provide the version and build of PowerShell the target node is running. _Will be automatically formatted as plain text._
To help with this information, please run this command: `$PSVersionTable`
placeholder: |
Add PowerShell information here
render: text
validations:
required: true
- type: textarea
id: moduleVersion
attributes:
label: Module version used
description: |
Please provide the version of the CommonTasks2 module that was used. _Will be automatically formatted as plain text._
To help with this information, please run this command: `Get-Module -Name 'CommonTasks2' -ListAvailable | ft Name,Version,Path`
placeholder: |
Add module information here
render: text
validations:
required: true

87 changes: 87 additions & 0 deletions .github/ISSUE_TEMPLATE/Problem_with_resource.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Problem with a resource
description: If you have a problem, bug, or enhancement with a resource in this resource module.
labels: []
assignees: []
body:
- type: markdown
attributes:
value: |
Please prefix the issue title (above) with the resource name, e.g. 'ResourceName: Short description of my issue'!
Your feedback and support is greatly appreciated, thanks for contributing!
- type: textarea
id: description
attributes:
label: Problem description
description: Details of the scenario you tried and the problem that is occurring.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Verbose logs
description: |
Verbose logs showing the problem. **NOTE! Sensitive information should be obfuscated.** _Will be automatically formatted as plain text._
placeholder: |
Paste verbose logs here
render: text
validations:
required: true
- type: textarea
id: configuration
attributes:
label: DSC configuration
description: |
The DSC configuration that is used to reproduce the issue (as detailed as possible). **NOTE! Sensitive information should be obfuscated.** _Will be automatically formatted as PowerShell code._
placeholder: |
Paste DSC configuration here
render: powershell
validations:
required: true
- type: textarea
id: suggestedSolution
attributes:
label: Suggested solution
description: Do you have any suggestions how to solve the issue?
validations:
required: true
- type: textarea
id: targetNodeOS
attributes:
label: Operating system the target node is running
description: |
Please provide as much as possible about the target node, for example edition, version, build, and language. _Will be automatically formatted as plain text._
On OS with WMF 5.1 the following command can help get this information: `Get-ComputerInfo -Property @('OsName','OsOperatingSystemSKU','OSArchitecture','WindowsVersion','WindowsBuildLabEx','OsLanguage','OsMuiLanguages')`
placeholder: |
Add operating system information here
render: text
validations:
required: true
- type: textarea
id: targetNodePS
attributes:
label: PowerShell version and build the target node is running
description: |
Please provide the version and build of PowerShell the target node is running. _Will be automatically formatted as plain text._
To help with this information, please run this command: `$PSVersionTable`
placeholder: |
Add PowerShell information here
render: text
validations:
required: true
- type: textarea
id: moduleVersion
attributes:
label: CommonTasks2 version
description: |
Please provide the version of the CommonTasks2 module that was used. _Will be automatically formatted as plain text._
To help with this information, please run this command: `Get-Module -Name 'CommonTasks2' -ListAvailable | ft Name,Version,Path`
placeholder: |
Add module information here
render: text
validations:
required: true

39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/Resource_proposal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: New resource proposal
description: If you have a new resource proposal that you think should be added to this resource module.
title: "NewResourceName: New resource proposal"
labels: []
assignees: []
body:
- type: markdown
attributes:
value: |
Please replace `NewResourceName` in the issue title (above) with your proposed resource name.
Thank you for contributing and making this resource module better!
- type: textarea
id: description
attributes:
label: Resource proposal
description: Provide information how this resource will/should work and how it will help users.
validations:
required: true
- type: textarea
id: proposedProperties
attributes:
label: Proposed properties
description: |
List all the proposed properties that the resource should have (key, required, write, and/or read). For each property provide a detailed description, the data type, if a default value should be used, and if the property is limited to a set of values.
value: |
Property | Type qualifier | Data type | Description | Default value | Allowed values
--- | --- | --- | --- | --- | ---
PropertyName | Key | String | Detailed description | None | None
validations:
required: true
- type: textarea
id: considerations
attributes:
label: Special considerations or limitations
description: |
Provide any considerations or limitations you can think of that a contributor should take in account when coding the proposed resource, and or what limitations a user will encounter or should consider when using the proposed resource.
validations:
required: true
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
blank_issues_enabled: false
contact_links:
- name: "Virtual PowerShell User Group #DSC channel"
url: https://dsccommunity.org/community/contact/
about: "To talk to the community and maintainers of DSC Community, please visit the #DSC channel."

63 changes: 63 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Pull Request

<!--
Thanks for submitting a Pull Request (PR) to this project.
Your contribution to this project is greatly appreciated!
TITLE: Please be descriptive not sensationalist.
Prepend the title with the [DscResourceName] if your PR is specific to a DSC resource.
Also prepend with [BREAKING CHANGE] if relevant.
i.e. [BREAKING CHANGE][xFile] Add security descriptor property
You may remove this comment block, and the other comment blocks, but please
keep the headers and the task list.
Try to keep your PRs atomic: changes grouped in smallest batch affecting a single logical unit.
-->

## Pull Request (PR) description

<!--
Replace this comment block with a description of your PR to provide context.
Please be describe the intent and link issue where the problem has been discussed.
try to link the issue that it fixes by providing the verb and ref: [fix|close #18]
After the description, please concisely list the changes as per keepachangelog.com
This **should** duplicate what you've updated in the changelog file.
### Added
- for new features [closes #15]
### Changed
- for changes in existing functionality.
### Deprecated
- for soon-to-be removed features.
### Security
- in case of vulnerabilities.
### Fixed
- for any bug fixes. [fix #52]
### Removed
- for now removed features.
-->

## Task list

<!--
To aid community reviewers in reviewing and merging your PR, please take
the time to run through the below checklist and make sure your PR has
everything updated as required.
Change to [x] for each task in the task list that applies to your PR.
For those task that don't apply to you PR, leave those as is.
-->

- [ ] The PR represents a single logical change. i.e. Cosmetic updates should go in different PRs.
- [ ] Added an entry under the Unreleased section of in the CHANGELOG.md as per [format](https://keepachangelog.com/en/1.0.0/).
- [ ] Local clean build passes without issue or fail tests (`build.ps1 -ResolveDependency`).
- [ ] Resource documentation added/updated in README.md.
- [ ] Resource parameter descriptions added/updated in README.md, schema.mof
and comment-based help.
- [ ] Comment-based help added/updated.
- [ ] Localization strings added/updated in all localization files as appropriate.
- [ ] Examples appropriately added/updated.
- [ ] Unit tests added/updated. See [DSC Resource Testing Guidelines](https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md).
- [ ] Integration tests added/updated (where possible). See [DSC Resource Testing Guidelines](https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md).
- [ ] New/changed code adheres to [DSC Resource Style Guidelines](https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md) and [Best Practices](https://github.com/PowerShell/DscResources/blob/master/BestPractices.md).
19 changes: 15 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
DSC/BuildOutput/*
output/

DSC/DscConfigurations/*
DSC/DscResources/*
Lab/testResults.xml
**.bak
*.local.*
!**/README.md
.kitchen/

*.suo
*.user
*.coverage
.vs
.psproj
.sln
markdownissues.txt
node_modules
package-lock.json
44 changes: 44 additions & 0 deletions .vscode/analyzersettings.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@{
CustomRulePath = '.\output\RequiredModules\DscResource.AnalyzerRules'
includeDefaultRules = $true
IncludeRules = @(
# DSC Resource Kit style guideline rules.
'PSAvoidDefaultValueForMandatoryParameter',
'PSAvoidDefaultValueSwitchParameter',
'PSAvoidInvokingEmptyMembers',
'PSAvoidNullOrEmptyHelpMessageAttribute',
'PSAvoidUsingCmdletAliases',
'PSAvoidUsingComputerNameHardcoded',
'PSAvoidUsingDeprecatedManifestFields',
'PSAvoidUsingEmptyCatchBlock',
'PSAvoidUsingInvokeExpression',
'PSAvoidUsingPositionalParameters',
'PSAvoidShouldContinueWithoutForce',
'PSAvoidUsingWMICmdlet',
'PSAvoidUsingWriteHost',
'PSDSCReturnCorrectTypesForDSCFunctions',
'PSDSCStandardDSCFunctionsInResource',
'PSDSCUseIdenticalMandatoryParametersForDSC',
'PSDSCUseIdenticalParametersForDSC',
'PSMisleadingBacktick',
'PSMissingModuleManifestField',
'PSPossibleIncorrectComparisonWithNull',
'PSProvideCommentHelp',
'PSReservedCmdletChar',
'PSReservedParams',
'PSUseApprovedVerbs',
'PSUseCmdletCorrectly',
'PSUseOutputTypeCorrectly',
'PSAvoidGlobalVars',
'PSAvoidUsingConvertToSecureStringWithPlainText',
'PSAvoidUsingPlainTextForPassword',
'PSAvoidUsingUsernameAndPasswordParams',
'PSDSCUseVerboseMessageInDSCResource',
'PSShouldProcess',
'PSUseDeclaredVarsMoreThanAssignments',
'PSUsePSCredentialType',

'Measure-*'
)

}
Loading

0 comments on commit 274d7ef

Please sign in to comment.