Skip to content

Commit 603095d

Browse files
authored
SqlRSSetup: Refactor resource into class-based resource (#2083)
- SqlRSSetup - The DSC resource has been refactored into a class-based resource. - The parameter `SourcePath` was replaced with `MediaPath`. - The parameter `IAcceptLicensTerms` was replaced with a boolean parameter `AcceptLicensingTerms`. - The parameter `SourceCredential` was removed. Because of this, the functionality that allowed copying the media from a UNC path using those credentials was also removed. If this was something you used, please open an issue. - The version validation no longer gets the current version from the installed package (using `Get-Package`), but instead from the registry. - Prior when install was successful, the resource checked whether there were any pending rename operations. Since the install returns 3010 if a restart is needed it is now assumed that the setup process takes care of this. If that is not the case, and this check is needed, then open an issue to discuss in what cases this is needed. - The `Edition` option 'Development` was replaced by the value `Developer`. - The read-only properties `CurrentVersion`, `ServiceName` and `ErrorDumpDirectory` were removed.
1 parent 403439c commit 603095d

21 files changed

+2641
-2108
lines changed

.vscode/analyzersettings.psd1

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
<#
7575
The following types are not rules but parse errors reported by PSScriptAnalyzer
76-
so they cannot be ecluded. They need to be filtered out from the result of
76+
so they cannot be excluded. They need to be filtered out from the result of
7777
Invoke-ScriptAnalyzer.
7878
7979
TypeNotFound - Because classes in the project cannot be found unless built.

.vscode/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@
7575
"fastbuild",
7676
"CODEOWNERS",
7777
"analyzersettings",
78-
"sqlcmd"
78+
"sqlcmd",
79+
"PBIRS",
80+
"SSRS"
7981
],
8082
"cSpell.ignorePaths": [
8183
".git"

CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
- Removed the function `Get-RegistryPropertyValue`, `Format-Path` and
1515
`Test-PendingRestart` in favor of the commands with the same names in
1616
the module _DscResource.Common_.
17+
- SqlRSSetup
18+
- The DSC resource has been refactored into a class-based resource.
19+
- The parameter `SourcePath` was replaced with `MediaPath`.
20+
- The parameter `IAcceptLicensTerms` was replaced with a boolean parameter
21+
`AcceptLicensingTerms`.
22+
- The parameter `SourceCredential` was removed. Because of this, the
23+
functionality that allowed copying the media from a UNC path using
24+
those credentials was also removed. If this was something you used,
25+
please open an issue.
26+
- The version validation no longer gets the current version from the
27+
installed package (using `Get-Package`), but instead from the registry.
28+
- Prior when install was successful, the resource checked whether there
29+
were any pending rename operations. Since the install returns 3010
30+
if a restart is needed it is now assumed that the setup process takes
31+
care of this. If that is not the case, and this check is needed, then
32+
open an issue to discuss in what cases this is needed.
33+
- The `Edition` option 'Development` was replaced by the value
34+
`Developer`.
35+
- The read-only properties `CurrentVersion`, `ServiceName` and `ErrorDumpDirectory`
36+
were removed.
1737

1838
### Added
1939

@@ -42,6 +62,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4262
- `Uninstall-SqlDscBIReportServer` to uninstall SQL Server BI Report Server
4363
([issue #2065](https://github.com/dsccommunity/SqlServerDsc/issues/2065)).
4464
- Add `PassThru` parameter to return exit code.
65+
- `ConvertTo-SqlDscEditionName` to return the edition name of the specified
66+
edition ID.
4567
- Private function:
4668
- `Invoke-ReportServerSetupAction` to run setup actions for Reporting
4769
Services and Power BI Report Server.
@@ -78,6 +100,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
78100
- SqlSetup
79101
- Fixed issue with AddNode where cluster IP information was not being passed to
80102
setup.exe ([issue #1171](https://github.com/dsccommunity/SqlServerDsc/issues/1171)).
103+
- SqlRSSetup
104+
- The DSC resource has been refactored into a class-based resource.
81105

82106
### Fixed
83107

azure-pipelines.yml

+65
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,71 @@ stages:
700700
testResultsFiles: '$(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
701701
testRunTitle: 'Integration RS ($(TEST_CONFIGURATION) / $(JOB_VMIMAGE))'
702702

703+
- stage: Integration_Test_Resources_PowerBIReportServer
704+
displayName: 'Integration Test Resources - Power BI Report Server'
705+
dependsOn: Quality_Test_and_Unit_Test
706+
jobs:
707+
- job: Test_Integration
708+
displayName: 'Integration'
709+
strategy:
710+
matrix:
711+
PowerBI_WIN2019:
712+
JOB_VMIMAGE: 'windows-2019'
713+
TEST_CONFIGURATION: 'Integration_PowerBI'
714+
PowerBI_WIN2022:
715+
JOB_VMIMAGE: 'windows-2022'
716+
TEST_CONFIGURATION: 'Integration_PowerBI'
717+
PowerBI_WIN2025:
718+
JOB_VMIMAGE: 'windows-2025'
719+
TEST_CONFIGURATION: 'Integration_PowerBI'
720+
variables:
721+
SKIP_DATABASE_ENGINE_DEFAULT_INSTANCE: true
722+
SKIP_ANALYSIS_MULTI_INSTANCE: true
723+
SKIP_ANALYSIS_TABULAR_INSTANCE: true
724+
SMODefaultModuleName: 'SqlServer'
725+
pool:
726+
vmImage: $(JOB_VMIMAGE)
727+
timeoutInMinutes: 0
728+
steps:
729+
- task: DownloadPipelineArtifact@2
730+
displayName: 'Download Build Artifact'
731+
inputs:
732+
buildType: 'current'
733+
artifactName: $(buildArtifactName)
734+
targetPath: '$(Build.SourcesDirectory)/$(buildFolderName)'
735+
- task: PowerShell@2
736+
name: configureWinRM
737+
displayName: 'Configure WinRM'
738+
inputs:
739+
targetType: 'inline'
740+
script: 'winrm quickconfig -quiet'
741+
pwsh: false
742+
- powershell: |
743+
Import-Module -Name ./tests/TestHelpers/CommonTestHelper.psm1
744+
Remove-PowerShellModuleFromCI -Name @('SqlServer', 'SQLPS')
745+
Remove-Module -Name CommonTestHelper
746+
name: cleanCIWorker
747+
displayName: 'Clean CI worker'
748+
- powershell: |
749+
./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterTag $(TEST_CONFIGURATION) -PesterPath @(
750+
# Run the integration tests in a specific group order.
751+
# Group 1
752+
'tests/Integration/Resources/DSC_SqlSetup.Integration.Tests.ps1'
753+
# Group 2
754+
'tests/Integration/Resources/DSC_SqlRSSetup.Integration.Tests.ps1'
755+
# Group 3
756+
'tests/Integration/Resources/DSC_SqlRS.Integration.Tests.ps1'
757+
)
758+
name: test
759+
displayName: 'Run Reporting Services Integration Test'
760+
- task: PublishTestResults@2
761+
displayName: 'Publish Test Results'
762+
condition: succeededOrFailed()
763+
inputs:
764+
testResultsFormat: 'NUnit'
765+
testResultsFiles: '$(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
766+
testRunTitle: 'Integration RS ($(TEST_CONFIGURATION) / $(JOB_VMIMAGE))'
767+
703768
- stage: Integration_Test_Resources_ReportingServices_dbatools
704769
displayName: 'Integration Test Resources - Reporting Services (dbatools)'
705770
dependsOn: Integration_Test_Resources_SqlServer

0 commit comments

Comments
 (0)