Skip to content

Commit

Permalink
Added yaml format config settings 'singleQuote' and 'bracketSpacing' (#…
Browse files Browse the repository at this point in the history
…99)

* Added yaml format config settings 'singleQuote' and 'bracketSpacing' and reformatted all yaml files.

* updated changelog
  • Loading branch information
raandree committed Mar 21, 2021
1 parent 82de9ce commit 5e7126f
Show file tree
Hide file tree
Showing 19 changed files with 111 additions and 108 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"files.associations": {
"*.ps1xml": "xml"
},
"yaml.format.singleQuote": true,
"yaml.format.bracketSpacing": true,
"cSpell.words": [
"COMPANYNAME",
"ICONURI",
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed issue in Merge-Hashtable where it did not merge hashtables correctly when these
are included in an array.
- Formatting in all files with VSCode formatting according to the 'settings.json' file taken from Sampler
- Added yaml format config settings 'singleQuote' and 'bracketSpacing' and reformatted all yaml files according to the new settings.

## [0.0.39] - 2020-09-29

Expand Down
6 changes: 3 additions & 3 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ major-version-bump-message: '\s?(breaking|major|breaking\schange)'
minor-version-bump-message: '(adds?|features?|minor)\b'
patch-version-bump-message: '\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
assembly-informational-format: "{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}"
assembly-informational-format: '{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}'
branches:
master:
tag: preview
Expand All @@ -14,12 +14,12 @@ branches:
tag: useBranchName
increment: Minor
regex: f(eature(s)?)?[\/-]
source-branches: ["master"]
source-branches: ['master']
hotfix:
tag: fix
increment: Patch
regex: (hot)?fix(es)?[\/-]
source-branches: ["master"]
source-branches: ['master']

ignore:
sha: []
Expand Down
158 changes: 79 additions & 79 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,41 @@ trigger:
- CHANGELOG.md
tags:
include:
- "v*"
- 'v*'
exclude:
- "*-*"
- '*-*'

stages:
- stage: Build
jobs:
- job: Package_Module
displayName: "Package Module"
displayName: 'Package Module'
pool:
vmImage: "ubuntu 16.04"
vmImage: 'ubuntu 16.04'
steps:
- task: GitVersion@5
name: gitVersion
displayName: "Evaluate Next Version"
displayName: 'Evaluate Next Version'
inputs:
runtime: "core"
configFilePath: "GitVersion.yml"
runtime: 'core'
configFilePath: 'GitVersion.yml'

- task: PowerShell@2
name: package
displayName: "Build & Package Module"
displayName: 'Build & Package Module'
inputs:
filePath: "./build.ps1"
arguments: "-ResolveDependency -tasks pack"
filePath: './build.ps1'
arguments: '-ResolveDependency -tasks pack'
pwsh: true
env:
ModuleVersion: $(gitVersion.NuGetVersionV2)

- task: PublishBuildArtifacts@1
displayName: "Publish Build Artifact"
displayName: 'Publish Build Artifact'
inputs:
pathToPublish: "output/"
artifactName: "output"
publishLocation: "Container"
pathToPublish: 'output/'
artifactName: 'output'
publishLocation: 'Container'

- stage: Test
dependsOn: Build
Expand Down Expand Up @@ -75,114 +75,114 @@ stages:
# testRunTitle: 'HQRM'

- job: Test_Unit_Windows
displayName: "Unit Windows"
displayName: 'Unit Windows'
pool:
vmImage: "windows-2019"
timeoutInMinutes: "0"
vmImage: 'windows-2019'
timeoutInMinutes: '0'
steps:
- powershell: |
$repositoryOwner,$repositoryName = $env:BUILD_REPOSITORY_NAME -split '/'
echo "##vso[task.setvariable variable=RepositoryOwner;isOutput=true]$repositoryOwner"
echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName"
name: dscBuildVariable
displayName: "Set Environment Variables"
displayName: 'Set Environment Variables'
- task: DownloadBuildArtifacts@0
displayName: "Download Build Artifact"
displayName: 'Download Build Artifact'
inputs:
buildType: "current"
downloadType: "single"
artifactName: "output"
downloadPath: "$(Build.SourcesDirectory)"
buildType: 'current'
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'
- task: PowerShell@2
name: test
displayName: "Run Unit Test"
displayName: 'Run Unit Test'
inputs:
filePath: "./build.ps1"
filePath: './build.ps1'
arguments: "-Tasks test -PesterScript 'tests/Unit'"
pwsh: false
- task: PublishTestResults@2
displayName: "Publish Test Results"
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: "NUnit"
testResultsFiles: "output/testResults/NUnit*.xml"
testRunTitle: "Unit (Windows Server Core)"
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Unit (Windows Server Core)'
- task: PublishCodeCoverageResults@1
displayName: "Publish Code Coverage"
displayName: 'Publish Code Coverage'
condition: succeededOrFailed()
inputs:
codeCoverageTool: "JaCoCo"
summaryFileLocation: "output/testResults/CodeCov*.xml"
pathToSources: "$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)"
codeCoverageTool: 'JaCoCo'
summaryFileLocation: 'output/testResults/CodeCov*.xml'
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- job: Test_Unit_ubuntu
displayName: "Unit ubuntu"
displayName: 'Unit ubuntu'
pool:
vmImage: "ubuntu-latest"
timeoutInMinutes: "0"
vmImage: 'ubuntu-latest'
timeoutInMinutes: '0'
steps:
- powershell: |
$repositoryOwner,$repositoryName = $env:BUILD_REPOSITORY_NAME -split '/'
echo "##vso[task.setvariable variable=RepositoryOwner;isOutput=true]$repositoryOwner"
echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName"
name: dscBuildVariable
displayName: "Set Environment Variables"
displayName: 'Set Environment Variables'
- task: DownloadBuildArtifacts@0
displayName: "Download Build Artifact"
displayName: 'Download Build Artifact'
inputs:
buildType: "current"
downloadType: "single"
artifactName: "output"
downloadPath: "$(Build.SourcesDirectory)"
buildType: 'current'
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'
- task: PowerShell@2
name: test
displayName: "Run Unit Test"
displayName: 'Run Unit Test'
inputs:
filePath: "./build.ps1"
filePath: './build.ps1'
arguments: "-Tasks test -PesterScript 'tests/Unit'"
pwsh: true
- task: PublishTestResults@2
displayName: "Publish Test Results"
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: "NUnit"
testResultsFiles: "output/testResults/NUnit*.xml"
testRunTitle: "Unit (Ubuntu)"
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Unit (Ubuntu)'
- task: PublishCodeCoverageResults@1
displayName: "Publish Code Coverage"
displayName: 'Publish Code Coverage'
condition: succeededOrFailed()
inputs:
codeCoverageTool: "JaCoCo"
summaryFileLocation: "output/testResults/CodeCov*.xml"
pathToSources: "$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)"
codeCoverageTool: 'JaCoCo'
summaryFileLocation: 'output/testResults/CodeCov*.xml'
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- job: Test_Integration
displayName: "Integration"
displayName: 'Integration'
pool:
vmImage: "windows-2019"
timeoutInMinutes: "0"
vmImage: 'windows-2019'
timeoutInMinutes: '0'
steps:
- task: DownloadBuildArtifacts@0
displayName: "Download Build Artifact"
displayName: 'Download Build Artifact'
inputs:
buildType: "current"
downloadType: "single"
artifactName: "output"
downloadPath: "$(Build.SourcesDirectory)"
buildType: 'current'
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'
- task: PowerShell@2
name: test
displayName: "Run Integration Test"
displayName: 'Run Integration Test'
inputs:
filePath: "./build.ps1"
filePath: './build.ps1'
arguments: "-Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0"
pwsh: false
- task: PublishTestResults@2
displayName: "Publish Test Results"
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: "NUnit"
testResultsFiles: "output/testResults/NUnit*.xml"
testRunTitle: "Integration (ubuntu-latest)"
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Integration (ubuntu-latest)'

- stage: Deploy
dependsOn: Test
Expand All @@ -198,33 +198,33 @@ stages:
)
jobs:
- job: Deploy_Module
displayName: "Deploy Module"
displayName: 'Deploy Module'
pool:
vmImage: "ubuntu 16.04"
vmImage: 'ubuntu 16.04'
steps:
- task: DownloadBuildArtifacts@0
displayName: "Download Build Artifact"
displayName: 'Download Build Artifact'
inputs:
buildType: "current"
downloadType: "single"
artifactName: "output"
downloadPath: "$(Build.SourcesDirectory)"
buildType: 'current'
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'
- task: PowerShell@2
name: publishRelease
displayName: "Publish Release"
displayName: 'Publish Release'
inputs:
filePath: "./build.ps1"
arguments: "-tasks publish"
filePath: './build.ps1'
arguments: '-tasks publish'
pwsh: true
env:
GitHubToken: $(GitHubToken)
GalleryApiToken: $(GalleryApiToken)
- task: PowerShell@2
name: sendChangelogPR
displayName: "Send Changelog PR"
displayName: 'Send Changelog PR'
inputs:
filePath: "./build.ps1"
arguments: "-tasks Create_ChangeLog_GitHub_PR"
filePath: './build.ps1'
arguments: '-tasks Create_ChangeLog_GitHub_PR'
pwsh: true
env:
GitHubToken: $(GitHubToken)
8 changes: 4 additions & 4 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ VersionedOutputDirectory: true
####################################################
# Defining 'Workflows' (suite of InvokeBuild tasks) to be run using their alias
BuildWorkflow:
".": # "." is the default Invoke-Build workflow. It is called when no -Tasks is specified to the build.ps1
'.': # "." is the default Invoke-Build workflow. It is called when no -Tasks is specified to the build.ps1
- build
- test
# - hqrmtest
Expand Down Expand Up @@ -93,13 +93,13 @@ Pester: #Passthru, OutputFile, CodeCoverageOutputFile not supported
# CodeCoverageMergedOutputFile: JaCoCo_Merged.xml
DscTest:
ExcludeTag:
- "Common Tests - New Error-Level Script Analyzer Rules"
- 'Common Tests - New Error-Level Script Analyzer Rules'

ModuleBuildTasks:
Sampler:
- "*.build.Sampler.ib.tasks" # this means: import (dot source) all aliases ending with .ib.tasks exported by sampler module
- '*.build.Sampler.ib.tasks' # this means: import (dot source) all aliases ending with .ib.tasks exported by sampler module
Sampler.GitHubTasks:
- "*.ib.tasks"
- '*.ib.tasks'

# Invoke-Build Header to be used to 'decorate' the terminal output of the tasks.
TaskHeader: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ NodeName: 9d8cc603-5c6f-4f6d-a54a-466a6180b589
#Description: Dev version of SRV01
role: Role1
Location: LON
ExampleProperty1: "From Node"
ExampleProperty1: 'From Node'
Test: '[TEST=Roles\Role1\Shared1\DestinationPath]'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NodeName: SRV02
Description: Dev version of SRV01
role: WindowsBase
Location: LON
ExampleProperty1: "From Node"
ExampleProperty1: 'From Node'

LCM_Config:
Settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NodeName: 9d8cc603-5c6f-4f6d-a54a-466b6180b589
#Description: Dev version of SRV01
role: MergingTest
Location: LON
ExampleProperty1: "From Node"
ExampleProperty1: 'From Node'
Test: '[TEST=Roles\Role1\Shared1\DestinationPath]'

configurations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ NodeName: 93a58ace-8629-4b2a-ada1-c7894c4a69f0
Description: PROD version of SRV01 (PRODSRV01)
role: Role1
Location: LON
ExampleProperty1: "From Node"
ExampleProperty1: 'From Node'
8 changes: 4 additions & 4 deletions tests/Integration/assets/DSC_ConfigData/Datum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ DatumStructure:
- StoreName: AllNodes
StoreProvider: Datum::File
StoreOptions:
Path: "./AllNodes"
Path: './AllNodes'

- StoreName: SiteData
StoreProvider: Datum::File
StoreOptions:
Path: "./SiteData"
Path: './SiteData'

- StoreName: Environments
StoreProvider: Datum::File
StoreOptions:
Path: "./Environments"
Path: './Environments'

- StoreName: Roles
StoreProvider: Datum::File
StoreOptions:
Path: "./Roles"
Path: './Roles'

ResolutionPrecedence:
- 'AllNodes\$($Node.Environment)\$($Node.Name)'
Expand Down

0 comments on commit 5e7126f

Please sign in to comment.