From 2c99088e64fd2aca74cfd6c2985a75345608e217 Mon Sep 17 00:00:00 2001 From: Daniel Cadden Date: Thu, 14 Jul 2022 13:10:15 +0100 Subject: [PATCH 1/9] Prevents an error thrown in some circumstances: 'The term 'Get-RDServer' is not recognized as the name of a cmdlet' --- .../MSFT_xRDCertificateConfiguration.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/DSCResources/MSFT_xRDCertificateConfiguration/MSFT_xRDCertificateConfiguration.psm1 b/source/DSCResources/MSFT_xRDCertificateConfiguration/MSFT_xRDCertificateConfiguration.psm1 index 0ccd1cc..a03581d 100644 --- a/source/DSCResources/MSFT_xRDCertificateConfiguration/MSFT_xRDCertificateConfiguration.psm1 +++ b/source/DSCResources/MSFT_xRDCertificateConfiguration/MSFT_xRDCertificateConfiguration.psm1 @@ -3,7 +3,7 @@ if (!(Test-xRemoteDesktopSessionHostOsRequirement)) { throw "The minimum OS requirement was not met." } -Import-Module RemoteDesktop +Import-Module RemoteDesktop -Global $script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xRDCertificateConfiguration' ####################################################################### From ae7cb77f77efebbd8f86f6ed93d9f43c0626137f Mon Sep 17 00:00:00 2001 From: Daniel Cadden Date: Thu, 14 Jul 2022 13:25:48 +0100 Subject: [PATCH 2/9] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a973f7e..cd94c77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Change to xRDCertificateConfiguration + - import of RemoteDesktop module is now global; resolves [issue #79](https://github.com/dsccommunity/xRemoteDesktopSessionHost/issues/79) + ## [2.0.0] - 2020-09-29 ### Changed From 13e7259c3dda787e8e18f540d7116369181b49fa Mon Sep 17 00:00:00 2001 From: Daniel Cadden Date: Thu, 14 Jul 2022 13:32:25 +0100 Subject: [PATCH 3/9] Try new Ubuntu image, given: `An image label with the label ubuntu 16.04 does not exist.` --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bee275e..cc5b82a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,7 +14,7 @@ stages: jobs: - job: BuildModuleJob pool: - vmImage: 'ubuntu 16.04' + vmImage: 'ubuntu 18.04' steps: - task: GitVersion@5 name: gitversion From 5fd314e19e84448e0c78cac82b5ff2b94f127b78 Mon Sep 17 00:00:00 2001 From: Daniel Cadden Date: Thu, 14 Jul 2022 14:12:21 +0100 Subject: [PATCH 4/9] try installing DotNetCore2.x This is an attempt to resolve `The framework 'Microsoft.NETCore.App', version '2.1.0' (x64) was not found.` in Azure pipeline (gitversion job) https://dev.azure.com/dsccommunity/xRemoteDesktopSessionHost/_build/results?buildId=6304&view=logs&j=106e58e8-a59e-5cbd-0716-376180231163&t=cc899c23-0acc-5cd0-5295-95cfdd0edd43 --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cc5b82a..c246153 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,6 +16,12 @@ stages: pool: vmImage: 'ubuntu 18.04' steps: + - task: UseDotNet@2 + name: dotNetCore + inputs: + packageType: runtime + version: 2.x + - task: GitVersion@5 name: gitversion inputs: From 152cfc61ef9879cd4c962098bf075da6cb78a58c Mon Sep 17 00:00:00 2001 From: Daniel Cadden Date: Thu, 14 Jul 2022 14:17:53 +0100 Subject: [PATCH 5/9] Should have been .netCore 2.1 --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c246153..506c24a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,7 +20,7 @@ stages: name: dotNetCore inputs: packageType: runtime - version: 2.x + version: 2.1.0 - task: GitVersion@5 name: gitversion From b360f043a2391be4175fdffa1beceedf64143e75 Mon Sep 17 00:00:00 2001 From: Daniel Cadden Date: Thu, 14 Jul 2022 14:27:57 +0100 Subject: [PATCH 6/9] aparently this is the way it's done now (at this point I'm willing to try anything) --- azure-pipelines.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 506c24a..c4e6365 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,15 +16,10 @@ stages: pool: vmImage: 'ubuntu 18.04' steps: - - task: UseDotNet@2 - name: dotNetCore - inputs: - packageType: runtime - version: 2.1.0 - - - task: GitVersion@5 - name: gitversion + - task: gitversion/setup@0 + displayName: Install GitVersion inputs: + versionSpec: '5.x' runtime: 'core' configFilePath: 'GitVersion.yml' From 2e6c29cb16b366c8d180552d40deecf27102ef9d Mon Sep 17 00:00:00 2001 From: Daniel Cadden Date: Thu, 14 Jul 2022 14:35:20 +0100 Subject: [PATCH 7/9] temporary add gitversion/execute task ... ... and display calculated vars for debugging purposes --- azure-pipelines.yml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c4e6365..b4c4fdf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,7 +22,41 @@ stages: versionSpec: '5.x' runtime: 'core' configFilePath: 'GitVersion.yml' - + - task: gitversion/execute@0 + displayName: Determine Version + - script: | + echo Major: $(GitVersion.Major) + echo Minor: $(GitVersion.Minor) + echo Patch: $(GitVersion.Patch) + echo PreReleaseTag: $(GitVersion.PreReleaseTag) + echo PreReleaseTagWithDash: $(GitVersion.PreReleaseTagWithDash) + echo PreReleaseLabel: $(GitVersion.PreReleaseLabel) + echo PreReleaseNumber: $(GitVersion.PreReleaseNumber) + echo WeightedPreReleaseNumber: $(GitVersion.WeightedPreReleaseNumber) + echo BuildMetaData: $(GitVersion.BuildMetaData) + echo BuildMetaDataPadded: $(GitVersion.BuildMetaDataPadded) + echo FullBuildMetaData: $(GitVersion.FullBuildMetaData) + echo MajorMinorPatch: $(GitVersion.MajorMinorPatch) + echo SemVer: $(GitVersion.SemVer) + echo LegacySemVer: $(GitVersion.LegacySemVer) + echo LegacySemVerPadded: $(GitVersion.LegacySemVerPadded) + echo AssemblySemVer: $(GitVersion.AssemblySemVer) + echo AssemblySemFileVer: $(GitVersion.AssemblySemFileVer) + echo FullSemVer: $(GitVersion.FullSemVer) + echo InformationalVersion: $(GitVersion.InformationalVersion) + echo BranchName: $(GitVersion.BranchName) + echo EscapedBranchName: $(GitVersion.EscapedBranchName) + echo Sha: $(GitVersion.Sha) + echo ShortSha: $(GitVersion.ShortSha) + echo NuGetVersionV2: $(GitVersion.NuGetVersionV2) + echo NuGetVersion: $(GitVersion.NuGetVersion) + echo NuGetPreReleaseTagV2: $(GitVersion.NuGetPreReleaseTagV2) + echo NuGetPreReleaseTag: $(GitVersion.NuGetPreReleaseTag) + echo VersionSourceSha: $(GitVersion.VersionSourceSha) + echo CommitsSinceVersionSource: $(GitVersion.CommitsSinceVersionSource) + echo CommitsSinceVersionSourcePadded: $(GitVersion.CommitsSinceVersionSourcePadded) + echo UncommittedChanges: $(GitVersion.UncommittedChanges) + echo CommitDate: $(GitVersion.CommitDate) - task: PowerShell@2 name: Build inputs: From c14ecb2d927ddf16d021bbcc5a446860fa38e565 Mon Sep 17 00:00:00 2001 From: Daniel Cadden Date: Thu, 14 Jul 2022 14:39:29 +0100 Subject: [PATCH 8/9] turns out execute is required --- azure-pipelines.yml | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b4c4fdf..2994237 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,41 +22,12 @@ stages: versionSpec: '5.x' runtime: 'core' configFilePath: 'GitVersion.yml' + - task: gitversion/execute@0 displayName: Determine Version - - script: | - echo Major: $(GitVersion.Major) - echo Minor: $(GitVersion.Minor) - echo Patch: $(GitVersion.Patch) - echo PreReleaseTag: $(GitVersion.PreReleaseTag) - echo PreReleaseTagWithDash: $(GitVersion.PreReleaseTagWithDash) - echo PreReleaseLabel: $(GitVersion.PreReleaseLabel) - echo PreReleaseNumber: $(GitVersion.PreReleaseNumber) - echo WeightedPreReleaseNumber: $(GitVersion.WeightedPreReleaseNumber) - echo BuildMetaData: $(GitVersion.BuildMetaData) - echo BuildMetaDataPadded: $(GitVersion.BuildMetaDataPadded) - echo FullBuildMetaData: $(GitVersion.FullBuildMetaData) - echo MajorMinorPatch: $(GitVersion.MajorMinorPatch) - echo SemVer: $(GitVersion.SemVer) - echo LegacySemVer: $(GitVersion.LegacySemVer) - echo LegacySemVerPadded: $(GitVersion.LegacySemVerPadded) - echo AssemblySemVer: $(GitVersion.AssemblySemVer) - echo AssemblySemFileVer: $(GitVersion.AssemblySemFileVer) - echo FullSemVer: $(GitVersion.FullSemVer) - echo InformationalVersion: $(GitVersion.InformationalVersion) - echo BranchName: $(GitVersion.BranchName) - echo EscapedBranchName: $(GitVersion.EscapedBranchName) - echo Sha: $(GitVersion.Sha) - echo ShortSha: $(GitVersion.ShortSha) - echo NuGetVersionV2: $(GitVersion.NuGetVersionV2) - echo NuGetVersion: $(GitVersion.NuGetVersion) - echo NuGetPreReleaseTagV2: $(GitVersion.NuGetPreReleaseTagV2) - echo NuGetPreReleaseTag: $(GitVersion.NuGetPreReleaseTag) - echo VersionSourceSha: $(GitVersion.VersionSourceSha) - echo CommitsSinceVersionSource: $(GitVersion.CommitsSinceVersionSource) - echo CommitsSinceVersionSourcePadded: $(GitVersion.CommitsSinceVersionSourcePadded) - echo UncommittedChanges: $(GitVersion.UncommittedChanges) - echo CommitDate: $(GitVersion.CommitDate) + inputs: + useConfigFile: true + - task: PowerShell@2 name: Build inputs: From 0adf5899e2d4b2bfa03ecd1d2335ce8156966b3d Mon Sep 17 00:00:00 2001 From: Daniel Cadden Date: Thu, 14 Jul 2022 14:42:52 +0100 Subject: [PATCH 9/9] specify config file to gitversion/execute action --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2994237..9bace9c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,12 +21,12 @@ stages: inputs: versionSpec: '5.x' runtime: 'core' - configFilePath: 'GitVersion.yml' - task: gitversion/execute@0 displayName: Determine Version inputs: useConfigFile: true + configFilePath: 'GitVersion.yml' - task: PowerShell@2 name: Build