theohbrothers / PSModulePublisher

A project containing the necessary tools to ease publishing of PowerShell modules.
Apache License 2.0
1 stars 1 forks source link

Add Powershell 2, 3 and 4 vmImage for azure-pipelines #1

Closed leojonathanoh closed 4 years ago

leojonathanoh commented 4 years ago

To be able to test modules that should run on older machines, we need Powershell 2, 3, 4 build / test jobs for azure-pipelines.

joeltimothyoh commented 4 years ago

Great idea, except that those PS versions aren’t found on any of the provided images for Microsoft-Hosted agents on Azure Pipelines. Besides, the impending removal of thevs2015-win2012r2 image sometime in March will further remove the ability to test scripts/modules on PowerShell 5.0.

Should we wish to test code on earlier versions of PS, we’d have to host our own agents running earlier versions of Windows. I think we could try our very best to write backward compatible code, just not in an over-prioritizing manner. Also, 5.1 being a full-fledged version of PS means code that runs well on it should continue to work well on current and near future versions of Windows.

@leojonathanoh

leojonathanoh commented 4 years ago

Great idea, except that those PS versions aren’t found on any of the provided images for Microsoft-Hosted agents on Azure Pipelines. Besides, the impending removal of thevs2015-win2012r2 image sometime in March will further remove the ability to test scripts/modules on PowerShell 5.0.

Should we wish to test code on earlier versions of PS, we’d have to host our own agents running earlier versions of Windows. I think we could try our very best to write backward compatible code, just not in an over-prioritizing manner. Also, 5.1 being a full-fledged version of PS means code that runs well on it should continue to work well on current and near future versions of Windows.

@leojonathanoh

things are beginning to appear like PSv2-5 is soon going to be forgotten. Generally most of the syntax in PSv3 is what we have been using. There’s very little reason to write PSv2-compatible code because it doesn’t even support advanced functions.

I’d say to support PSv6, and generally PSv3 and up is already covered. The only time to support PSv2 is to support Windows 7 and Windows Server 2008 which is probably going to be only for very simple tools.

joeltimothyoh commented 4 years ago

It looks like we should continue moving forward with later technologies. @leojonathanoh

Closing the issue.