diff --git a/CHANGELOG.md b/CHANGELOG.md index f1091eb..65420c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed bugs in 'DscTagging' +- Fixed bugs in 'DscTagging' and added parameter 'BuildNumber'. ## [0.9.0] - 2023-02-08 diff --git a/source/DSCResources/DscTagging/DscTagging.schema.psm1 b/source/DSCResources/DscTagging/DscTagging.schema.psm1 index 03ed1ad..a254889 100644 --- a/source/DSCResources/DscTagging/DscTagging.schema.psm1 +++ b/source/DSCResources/DscTagging/DscTagging.schema.psm1 @@ -4,6 +4,10 @@ configuration DscTagging { [System.Version] $Version, + [Parameter()] + [int] + $BuildNumber, + [Parameter(Mandatory = $true)] [string] $Environment, @@ -85,7 +89,7 @@ configuration DscTagging { { Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\DscTagging' ValueName = 'BuildNumber' - ValueData = "$($env:BUILD_BUILDID)" + ValueData = $BuildNumber ValueType = 'String' Ensure = 'Present' Force = $true diff --git a/tests/Unit/DSCResources/Assets/Config/DscTagging.yml b/tests/Unit/DSCResources/Assets/Config/DscTagging.yml index 7fea1bc..ef9c5cd 100644 --- a/tests/Unit/DSCResources/Assets/Config/DscTagging.yml +++ b/tests/Unit/DSCResources/Assets/Config/DscTagging.yml @@ -1,5 +1,6 @@ Version: 1.0.0 Environment: Dev +BuildNumber: 100 NodeVersion: NodeRole: FileServer DisableGitCommitId: false