CommonTasks icon indicating copy to clipboard operation
CommonTasks copied to clipboard

Error in publish_module_to_gallery task with Get-ChangeLogData

Open NicolasBn opened this issue 3 years ago • 0 comments

Problem description

In AzurePipeline, there is an error when you use Get-ChangeLogData function on Windows with PowerShell 7. No problem with Windows PowerShell 5.1, or PowerShell 7 on Linux.

Get-ChangeLogData based the split to get date value with [environment]::NewLine. But, in Windows, it's not the same character in each version of PowerShell:

#Powershell 5.1
[char[]][environment]::NewLine | % {[int]$_}

13
10
#Powershell 7.1.2
[int][environment]::NewLine
0

And now, the module is packaged with 'ubuntu-latest' image. That might cause some encoding or carriage return troubles.

Verbose logs

ERROR: Cannot bind parameter 'Date'. Cannot convert value "2022-03-08

### Added

- `VirtualMemoryFiles` Composite for adjusting the system page file via the resource `VirtualMemory` from the `ComputerManagementDsc` Module.
- `SharePointSetup` Composite for installing the SharePoint Prerequisits, Setup and optionally Language Packs.
### Changed

- Changed the build pipeline to Sampler.
  - Debugging Sampler migration:
    - Added 'Sampler.GitHubTasks'.
    - Moved DSCResources for faster build.
    - Removed dependencies for faster build.
- Fixed badges.
- Added back configurations and dependencies.
- Fixing issue with Cluster when only NodeMajority is used.
  - Fixed the fix: Quorum is not required in some SQL Always-On scenarios which did not work after the fix.
- Add new resource LocalUsers.
- Make DscLcmController independent from the DscDiagnostics resource.
- Add optional attributes to DscTagging resource.
- Update documentation.
- Applied HQRM standards.
- Fixing issue with AddsOrgUnitsAndGroups when OUs contain other non-word characters.
- Added MmaAgent to configure Microsoft Monitoring Agent.
- Added AddsServicePrincipalNames to configure SPNs.
- Disabling RebootNodeIfNeeded when LCM is on Monitor mode.
- Made 'WaitForClusterRetryIntervalSec' and 'WaitForClusterRetryCount' configurable in Cluster config.
- Added new configuration 'WebConfigPropertyCollections'.
- Fixed an issue with duplicate resource identifiers in 'WebConfigProperties'.
- Changed parameter 'Name' to 'Names' in 'WindowsFeatures' and 'WindowsOptionalFeatures' resources according to coding convention.
- Made the Office Online Server resources actually work and redesigned them.
  - Added 'OfficeOnlineServerMachineConfig' configuration.
- WindowsFeatures configuration does not longer install all sub features. If needed, use prefix '*'.

How to reproduce

Using Windows and PowerShell 7.1.2

Get-ChangeLogData -Path ./output/CHANGELOG.md

Expected behavior

Pipeline works without issue.

Current behavior

An error when Get-ChangelogData search the date in release title.

Suggested solution

Use ubuntu-latest image in pipeline for deploy task.

Operating system the target node is running

Windows Server 2019

PowerShell version and build the target node is running

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module version used

Latest

NicolasBn avatar Mar 09 '22 11:03 NicolasBn