Skip to content

Commit aa90424

Browse files
authored
Merge branch 'main' into f/install-class-based-resource
2 parents f568f52 + 17a73d9 commit aa90424

File tree

176 files changed

+7688
-2078
lines changed

Some content is hidden

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

176 files changed

+7688
-2078
lines changed

.github/ISSUE_TEMPLATE/05_problem_with_command.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ body:
6767
6868
To help with this information:
6969
- 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`
70+
- On macOS, please provide the product version and build version. The following command can help get this information: `sw_vers`
7071
- 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')`
7172
placeholder: |
7273
Add operating system information here

.github/workflows/code-analysis-built-module.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ main ]
88
workflow_dispatch:
99

10-
# cSpell: ignore potatoqualitee codeql SARIF
10+
# cSpell: ignore codeql SARIF
1111
jobs:
1212
pssa:
1313
name: PSScriptAnalyzer
@@ -24,16 +24,29 @@ jobs:
2424
- name: Install GitVersion
2525
shell: powershell
2626
run: |
27-
dotnet tool install --global GitVersion.Tool
27+
dotnet tool install --global GitVersion.Tool --version 5.*
2828
- name: Run GitVersion
2929
shell: powershell
3030
run: |
3131
dotnet-gitversion | ConvertFrom-Json
32+
- name: Resolve dependencies
33+
shell: powershell
34+
run: |
35+
Write-Information -MessageData 'Resolving dependencies.' -InformationAction 'Continue'
36+
.\build.ps1 -ResolveDependency -Tasks 'noop'
37+
# This is a workaround for the issue: https://github.com/PoshCode/ModuleBuilder/pull/136
38+
- name: Patch ModuleBuilder
39+
shell: powershell
40+
run: |
41+
Write-Information -MessageData 'Patching ModuleBuilder v3.1.7.' -InformationAction 'Continue'
42+
.\build.ps1 -Tasks 'noop'
43+
Install-PSResource -Name 'Viscalyx.Common' -Repository 'PSGallery' -TrustRepository -Quiet -Confirm:$false
44+
Install-ModulePatch -Uri https://raw.githubusercontent.com/viscalyx/Viscalyx.Common/refs/heads/main/patches/ModuleBuilder_3.1.7_patch.json -Force
3245
- name: Build Module
3346
shell: powershell
3447
run: |
3548
Write-Information -MessageData 'Module is being built.' -InformationAction 'Continue'
36-
.\build.ps1 -ResolveDependency -Tasks 'build'
49+
.\build.ps1 -Tasks 'build'
3750
- name: Run PSScriptAnalyzer
3851
shell: powershell
3952
run: |
@@ -62,6 +75,6 @@ jobs:
6275
6376
Write-Information -MessageData 'Analyzing done.' -InformationAction 'Continue'
6477
- name: Upload SARIF results
65-
uses: github/codeql-action/upload-sarif@v2
78+
uses: github/codeql-action/upload-sarif@v3
6679
with:
6780
sarif_file: results.sarif

.github/workflows/code-analysis.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ main ]
88
workflow_dispatch:
99

10-
# cSpell: ignore potatoqualitee codeql SARIF
10+
# cSpell: ignore codeql SARIF
1111
jobs:
1212
pssa:
1313
name: PSScriptAnalyzer
@@ -24,16 +24,29 @@ jobs:
2424
- name: Install GitVersion
2525
shell: powershell
2626
run: |
27-
dotnet tool install --global GitVersion.Tool
27+
dotnet tool install --global GitVersion.Tool --version 5.*
2828
- name: Run GitVersion
2929
shell: powershell
3030
run: |
3131
dotnet-gitversion | ConvertFrom-Json
32+
- name: Resolve dependencies
33+
shell: powershell
34+
run: |
35+
Write-Information -MessageData 'Resolving dependencies.' -InformationAction 'Continue'
36+
.\build.ps1 -ResolveDependency -Tasks 'noop'
37+
# This is a workaround for the issue: https://github.com/PoshCode/ModuleBuilder/pull/136
38+
- name: Patch ModuleBuilder
39+
shell: powershell
40+
run: |
41+
Write-Information -MessageData 'Patching ModuleBuilder v3.1.7.' -InformationAction 'Continue'
42+
.\build.ps1 -Tasks 'noop'
43+
Install-PSResource -Name 'Viscalyx.Common' -Repository 'PSGallery' -TrustRepository -Quiet -Confirm:$false
44+
Install-ModulePatch -Uri https://raw.githubusercontent.com/viscalyx/Viscalyx.Common/refs/heads/main/patches/ModuleBuilder_3.1.7_patch.json -Force
3245
- name: Build Module
3346
shell: powershell
3447
run: |
35-
Write-Information -MessageData 'Module is being built so that examples can be scanned.' -InformationAction 'Continue'
36-
.\build.ps1 -ResolveDependency -Tasks 'build'
48+
Write-Information -MessageData 'Module is being built.' -InformationAction 'Continue'
49+
.\build.ps1 -Tasks 'build'
3750
- name: Run PSScriptAnalyzer
3851
shell: powershell
3952
run: |
@@ -72,6 +85,6 @@ jobs:
7285
7386
Write-Information -MessageData 'Analyzing done.' -InformationAction 'Continue'
7487
- name: Upload SARIF results
75-
uses: github/codeql-action/upload-sarif@v2
88+
uses: github/codeql-action/upload-sarif@v3
7689
with:
7790
sarif_file: results.sarif

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
stale:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/stale@v8
11+
- uses: actions/stale@v9
1212
with:
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}
1414
stale-issue-message: 'This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 40 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.'

CHANGELOG.md

Lines changed: 187 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,210 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [Unreleased]
77

8+
### Added
9+
10+
- Public commands:
11+
- `Install-SqlDscReportingService`
12+
- `Install-SqlDscBIReportServer`
13+
- `Repair-SqlDscReportingService`
14+
- `Repair-SqlDscBIReportServer`
15+
- `Uninstall-SqlDscReportingService`
16+
- `Uninstall-SqlDscBIReportServer`
17+
- Private function:
18+
- `Invoke-ReportServerSetupAction`
19+
20+
### Changed
21+
22+
- SqlServerDsc
23+
- The examples that was located in the README in the examples folder has
24+
now been moved to the WikiSource folder. The examples are published to
25+
the repository Wiki. The README has been updated to link to the new
26+
location ([issue #2051](https://github.com/dsccommunity/SqlServerDsc/issues/2051)).
27+
- Integration test stages has been modified to split the testing into
28+
several different areas. The tests are dependent on this order:
29+
- Quality_Test_and_Unit_Test
30+
- Integration_Test_Commands_SqlServer
31+
- Integration_Test_Commands_ReportingServices
32+
- Integration_Test_Commands_BIReportServer
33+
- Integration_Test_Resources_SqlServer
34+
- Integration_Test_Resources_SqlServer_dbatools
35+
- Integration_Test_Resources_ReportingServices
36+
- Integration_Test_Resources_ReportingServices_dbatools
37+
- SqlSetup
38+
- Fixed issue with AddNode where cluster IP information was not being passed to
39+
setup.exe ([issue #1171](https://github.com/dsccommunity/SqlServerDsc/issues/1171)).
40+
41+
### Fixed
42+
43+
- Fixed workaround for the GitHub Actions to support building module in Windows
44+
PowerShell.
45+
- SqlServerDsc
46+
- Fix localization tests.
47+
- `SqlAudit`
48+
- Fix localization strings in `Assert` method.
49+
- `Save-SqlDscSqlServerMediaFile`
50+
- Fix localizations strings that used wrong keys.
51+
- Fix unit tests so they work cross-platform.
52+
- `Install-SqlDscServer` and private function `Invoke-SetupAction`
53+
- Fix localization string keys naming.
54+
- Fix unit tests to use correct localization string names.
55+
- Remove redundant unit tests.
56+
- `SqlConfiguration`
57+
- Change the alias command to real command name, to pass HQRM tests.
58+
- `SqlDatabaseUser`
59+
- Change the alias command to real command name, to pass HQRM tests.
60+
- `SqlMaxDop`
61+
- Change the alias command to real command name, to pass HQRM tests.
62+
- `SqlMemory`
63+
- Change the alias command to real command name, to pass HQRM tests.
64+
- `SqlReplication`
65+
- Change the alias command to real command name, to pass HQRM tests.
66+
- `SqlRSSetup`
67+
- Change the alias command to real command name, to pass HQRM tests.
68+
- `SqlServiceAccount`
69+
- Change the alias command to real command name, to pass HQRM tests.
70+
71+
## [17.0.0] - 2024-09-30
72+
73+
### Added
74+
75+
- SqlSetup
76+
- Added new parameter ProductCoveredBySA which is introduced in SQL 2022.
77+
78+
### Added
79+
80+
- `Connect-SqlDscDatabaseEngine`
81+
- Added integration test for the command.
82+
- `Uninstall-SqlDscServer`
83+
- Added integration test for the command.
84+
85+
### Changed
86+
87+
- SqlScript
88+
- BREAKING CHANGE: The parameter `Id` is now required to allow
89+
reuse of a script with different variables. Set this to a unique value.
90+
The information entered is never used to actually run the script
91+
([issue #596](https://github.com/dsccommunity/SqlServerDsc/issues/596)).
92+
- Fix unit test to fully check Set-TargetResource using timeout.
93+
- SqlScriptQuery
94+
- BREAKING CHANGE: The parameter `Id` is now required to allow
95+
reuse of a script with different variables. Set this to a unique value.
96+
The information entered is never used to actually run the script
97+
([issue #596](https://github.com/dsccommunity/SqlServerDsc/issues/596)).
98+
- Fix unit test to fully check Set-TargetResource using timeout.
99+
- SqlServerDsc
100+
- Replaced inline task `Package_Wiki_Content` with the one now available
101+
in the module _DscResource.DocGenerator_.
102+
- `Connect-SqlDscDatabaseEngine`
103+
- Update comment-based help with more examples.
104+
- SqlSetup
105+
- The parameter `SecurityMode` now only (correctly) allows the value
106+
`SQL` ([issue #1185](https://github.com/dsccommunity/SqlServerDsc/issues/1185)).
107+
108+
### Fixed
109+
110+
- SqlServerDsc
111+
- Fix issue template.
112+
- `Connect-SqlDscDatabaseEngine`
113+
- Comment-based help for parameter `LoginType` was corrected.
114+
- An integration test now runs to test the command.
115+
- SqlAudit
116+
- Fixed unit tests.
117+
- SqlDatabaseMail
118+
- Fix unit test, removing `Assert-VerifiableMock` that was left over from
119+
Pester 5 conversion.
120+
121+
## [16.6.0] - 2024-05-17
122+
123+
### Added
124+
125+
- SqlServerDsc
126+
- Added build tasks to generate Wiki documentation for public commands.
127+
- Initial integration tests for commands.
128+
- SqlDatabaseMail
129+
- Added the parameter `UseDefaultCredentials` to control use of the DatabaseEngine
130+
service account for SMTP server authentication.
131+
- New public commands
132+
- `Save-SqlDscSqlServerMediaFile` - Downloads the content on the provided URL
133+
and if it is an executable it will use the executable to download the
134+
ISO image media.
135+
8136
### Fixed
9137

10138
- SqlServerDsc
11139
- `Get-SMOModuleCalculatedVersion`
12140
- Return SQLPS version as 12.0 instead of 120
13141
- `Get-SqlDscPreferredModule`
14142
- Fix sort to get the latest version
143+
- Public commands no handles when both `-Force` and `-Confirm $true`
144+
would be passed to command.
145+
- Enabled NUnit results for HQRM tests.
15146
- `Assert-Feature`
16147
- Fixed unit tests.
17148
- SqlAGReplica
18149
- Fix unit test FailedRemoveAvailabilityGroupReplica
150+
- SqlAgentOperator
151+
- Integration test for changing e-mail address on an existing operator.
152+
- `DatabasePermission`
153+
- New method ToString() for making verbose output better.
154+
- `ServerPermission`
155+
- New method ToString() for making verbose output better.
156+
- SqlAgDatabase
157+
- Remove unused help file ([issue #1745](https://github.com/dsccommunity/SqlServerDsc/issues/1745)).
158+
- SqlDatabaseObjectPermission
159+
- Added `foreach` loop in `Get-TargetResource` to fix issues with `INSERT`
160+
permissions when it's not the only permission on the table ([issue [#2006](https://github.com/dsccommunity/SqlServerDsc/issues/2006)]).
161+
- `Install-SqlDscServer`
162+
- No longer throws with duplicate parameter error if the parameter
163+
`ErrorAction` is passed to the command.
164+
- `Add-SqlDscNode`
165+
- No longer throws with duplicate parameter error if the parameter
166+
`ErrorAction` is passed to the command.
167+
- `Complete-SqlDscFailoverCluster`
168+
- No longer throws with duplicate parameter error if the parameter
169+
`ErrorAction` is passed to the command.
170+
- `Complete-SqlDscImage`
171+
- No longer throws with duplicate parameter error if the parameter
172+
`ErrorAction` is passed to the command.
173+
- `Initialize-SqlDscRebuildDatabase`
174+
- No longer throws with duplicate parameter error if the parameter
175+
`ErrorAction` is passed to the command.
176+
- `Remove-SqlDscNode`
177+
- No longer throws with duplicate parameter error if the parameter
178+
`ErrorAction` is passed to the command.
179+
- `Repair-SqlDscServer`
180+
- No longer throws with duplicate parameter error if the parameter
181+
`ErrorAction` is passed to the command.
182+
- `Uninstall-SqlDscServer`
183+
- No longer throws with duplicate parameter error if the parameter
184+
`ErrorAction` is passed to the command.
185+
- Private functions
186+
- `Invoke-SetupAction` no longer throws when secure strings is passed on
187+
Windows PowerShell.
19188

20189
### Changed
21190

22-
- SqlAG
23-
- Converted unit test to Pester 5
24-
- DtcSupportEnabled option in Set-TargetResource and TestTargetResource
25191
- SqlServerDsc
192+
- Updated pipeline files to support pre-releases with ModuleFast (when
193+
resolving dependencies).
26194
- Bump PSResourceGet to v1.0.0 (used when resolving dependencies).
27195
- Update markdown highlights with newly supported keywords.
196+
- Bump GitHub Action _Stale_ to v9.
197+
- Bump GitHub Action _CodeQL-Action_ to v3.
198+
- Documentation is now built using a separate meta task `docs`.
199+
It is run with the meta task `pack` which is run by the pipeline.
200+
To run the meta task `docs` the SMO assemblies must be loaded into the
201+
session, either by importing SqlServer module or loading SMO stubs.
202+
- QA test improved to speed up quality testing.
203+
- The pipeline test stages has been split into different stages.
204+
- SqlAG
205+
- Converted unit test to Pester 5
206+
- DtcSupportEnabled option in Set-TargetResource and TestTargetResource
207+
- SqlSetup
208+
- Updated integration tests to use PSResourceGet to download required modules.
209+
- SqlRS
210+
- Integration tests for SQL Server 2022 has been temporarily disabled due
211+
to a unknown problem. More information in [issue #2009](https://github.com/dsccommunity/SqlServerDsc/issues/2009).
28212

29213
## [16.5.0] - 2023-10-05
30214

RequiredModules.psd1

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515
If preview release of Pester prevents release we should temporary shift
1616
back to stable.
1717
#>
18-
# Pester = @{
19-
# Version = 'latest'
20-
# Parameters = @{
21-
# AllowPrerelease = $true
22-
# }
23-
# }
24-
25-
Pester = 'latest'
18+
Pester = @{
19+
Version = 'latest'
20+
Parameters = @{
21+
AllowPrerelease = $true
22+
}
23+
}
2624

2725
Plaster = 'latest'
2826
ModuleBuilder = 'latest'
@@ -32,14 +30,19 @@
3230
MarkdownLinkCheck = 'latest'
3331
'DscResource.Test' = 'latest'
3432
xDscResourceDesigner = 'latest'
35-
'DscResource.DocGenerator' = 'latest'
3633

3734
# Build dependencies needed for using the module
3835
'DscResource.Base' = 'latest'
3936
'DscResource.Common' = 'latest'
4037

4138
# Analyzer rules
42-
'DscResource.AnalyzerRules' = 'latest'
39+
'DscResource.AnalyzerRules' = @{
40+
Version = 'latest'
41+
Parameters = @{
42+
AllowPrerelease = $true
43+
}
44+
}
45+
4346
'Indented.ScriptAnalyzerRules' = 'latest'
4447

4548
# Dependency for integration tests
@@ -48,9 +51,19 @@
4851
# Need to pin this to 3.7.2 because 4.0.0 made the integration tests fail.
4952
PSPKI = '3.7.2'
5053

51-
# Prerequisites modules needed for examples or integration tests
54+
# Prerequisite modules needed for examples or integration tests
5255
xPSDesiredStateConfiguration = '9.1.0'
5356
StorageDsc = '5.1.0'
5457
NetworkingDsc = '9.0.0'
5558
WSManDsc = '3.1.1'
59+
60+
# Prerequisite modules for documentation.
61+
#'DscResource.DocGenerator' = 'latest'
62+
'DscResource.DocGenerator' = @{
63+
Version = 'latest'
64+
Parameters = @{
65+
AllowPrerelease = $true
66+
}
67+
}
68+
PlatyPS = 'latest'
5669
}

0 commit comments

Comments
 (0)