diff --git a/CHANGELOG.md b/CHANGELOG.md index 9df7cc1fe..5c2d0fb15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2807,3 +2807,8 @@ in a future release. - xSQLServerSetup - xSQLServerFirewall - xSQLServerRSSecureConnectionLevel + + +### Changed +- Update VImage from 'windows-2019' to 'windows-2022' +- Remove Jobs Test_Integration_SQL2016, Test_Integration_SQL2017, Test_Integration_SQL2019 with a single job Test_Integration diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 91c366681..5e5e22ec6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -54,7 +54,7 @@ stages: - job: Test_HQRM displayName: 'HQRM' pool: - vmImage: 'windows-2019' + vmImage: 'windows-2022' timeoutInMinutes: 0 steps: - task: DownloadPipelineArtifact@2 @@ -87,7 +87,7 @@ stages: - job: Test_Unit displayName: 'Unit' pool: - vmImage: 'windows-2019' + vmImage: 'windows-2022' timeoutInMinutes: 0 steps: - task: DownloadPipelineArtifact@2 @@ -116,17 +116,37 @@ stages: targetPath: '$(buildFolderName)/$(testResultFolderName)/' artifactName: $(testArtifactName) parallel: true - - - job: Test_Integration_SQL2016 - displayName: 'Integration (SQL2016)' + + - job: Test_Integration + displayName: 'Integration' + strategy: + matrix: + SQL2016_WIN2019: + JOB_VMIMAGE: 'windows-2019' + TEST_CONFIGURATION: 'Integration_SQL2016' + SQL2016_WIN2022: + JOB_VMIMAGE: 'windows-2022' + TEST_CONFIGURATION: 'Integration_SQL2016' + SQL2017_WIN2019: + JOB_VMIMAGE: 'windows-2019' + TEST_CONFIGURATION: 'Integration_SQL2017' + SQL2017_WIN2022: + JOB_VMIMAGE: 'windows-2022' + TEST_CONFIGURATION: 'Integration_SQL2017' + SQL2019_WIN2019: + JOB_VMIMAGE: 'windows-2019' + TEST_CONFIGURATION: 'Integration_SQL2019' + SQL2019_WIN2022: + JOB_VMIMAGE: 'windows-2022' + TEST_CONFIGURATION: 'Integration_SQL2019' pool: - vmImage: 'windows-2019' + vmImage: $(JOB_VMIMAGE) timeoutInMinutes: 0 variables: # This sets environment variable $env:CI. CI: true # This sets environment variable $env:CONFIGURATION. - configuration: Integration_SQL2016 + configuration: $(TEST_CONFIGURATION) steps: - task: DownloadPipelineArtifact@2 displayName: 'Download Build Artifact' @@ -183,141 +203,7 @@ stages: inputs: testResultsFormat: 'NUnit' testResultsFiles: '$(buildFolderName)/$(testResultFolderName)/NUnit*.xml' - testRunTitle: 'Integration (SQL Server 2016 / Windows Server 2019)' - - - job: Test_Integration_SQL2017 - displayName: 'Integration (SQL2017)' - pool: - vmImage: 'windows-2019' - timeoutInMinutes: 0 - variables: - # This sets environment variable $env:CI. - CI: true - # This sets environment variable $env:CONFIGURATION. - configuration: Integration_SQL2017 - steps: - - task: DownloadPipelineArtifact@2 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - artifactName: $(buildArtifactName) - targetPath: '$(Build.SourcesDirectory)/$(buildFolderName)' - - task: PowerShell@2 - name: configureWinRM - displayName: 'Configure WinRM' - inputs: - targetType: 'inline' - script: 'winrm quickconfig -quiet' - pwsh: false - - powershell: | - ./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterScript @( - # Run the integration tests in a specific group order. - # Group 1 - 'tests/Integration/DSC_SqlSetup.Integration.Tests.ps1' - # Group 2 - 'tests/Integration/DSC_SqlAgentAlert.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlLogin.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlEndpoint.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabaseMail.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlRSSetup.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabaseDefaultLocation.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabase.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlAlwaysOnService.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlAgentOperator.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlServiceAccount.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlAgentFailsafe.Integration.Tests.ps1' - # Group 3 - 'tests/Integration/DSC_SqlRole.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlRS.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabaseUser.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlReplication.Integration.Tests.ps1' - # Group 4 - 'tests/Integration/DSC_SqlScript.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabasePermission.Integration.Tests.ps1' - # Group 5 - 'tests/Integration/DSC_SqlSecureConnection.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlScriptQuery.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlProtocol.Integration.Tests.ps1' - # Group 6 (tests makes changes that could make SQL Server to loose connectivity) - 'tests/Integration/DSC_SqlProtocolTcpIp.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabaseObjectPermission.Integration.Tests.ps1' - ) - name: test - displayName: 'Run Integration Test' - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - condition: succeededOrFailed() - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '$(buildFolderName)/$(testResultFolderName)/NUnit*.xml' - testRunTitle: 'Integration (SQL Server 2017 / Windows Server 2019)' - - - job: Test_Integration_SQL2019 - displayName: 'Integration (SQL2019)' - pool: - vmImage: 'windows-2019' - timeoutInMinutes: 0 - variables: - # This sets environment variable $env:CI. - CI: true - # This sets environment variable $env:CONFIGURATION. - configuration: Integration_SQL2019 - steps: - - task: DownloadPipelineArtifact@2 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - artifactName: $(buildArtifactName) - targetPath: '$(Build.SourcesDirectory)/$(buildFolderName)' - - task: PowerShell@2 - name: configureWinRM - displayName: 'Configure WinRM' - inputs: - targetType: 'inline' - script: 'winrm quickconfig -quiet' - pwsh: false - - powershell: | - ./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterScript @( - # Run the integration tests in a specific group order. - # Group 1 - 'tests/Integration/DSC_SqlSetup.Integration.Tests.ps1' - # Group 2 - 'tests/Integration/DSC_SqlAgentAlert.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlLogin.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlEndpoint.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabaseMail.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlRSSetup.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabaseDefaultLocation.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabase.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlAlwaysOnService.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlAgentOperator.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlServiceAccount.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlAgentFailsafe.Integration.Tests.ps1' - # Group 3 - 'tests/Integration/DSC_SqlRole.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlRS.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabaseUser.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlReplication.Integration.Tests.ps1' - # Group 4 - 'tests/Integration/DSC_SqlScript.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabasePermission.Integration.Tests.ps1' - # Group 5 - 'tests/Integration/DSC_SqlSecureConnection.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlScriptQuery.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlProtocol.Integration.Tests.ps1' - # Group 6 (tests makes changes that could make SQL Server to loose connectivity) - 'tests/Integration/DSC_SqlProtocolTcpIp.Integration.Tests.ps1' - 'tests/Integration/DSC_SqlDatabaseObjectPermission.Integration.Tests.ps1' - ) - name: test - displayName: 'Run Integration Test' - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - condition: succeededOrFailed() - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '$(buildFolderName)/$(testResultFolderName)/NUnit*.xml' - testRunTitle: 'Integration (SQL Server 2019 / Windows Server 2019)' + testRunTitle: 'Integration ($(TEST_CONFIGURATION) / $(JOB_VMIMAGE))' - job: Code_Coverage displayName: 'Publish Code Coverage'