-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for defining the PowerShell version to be used #15
Adds support for defining the PowerShell version to be used #15
Conversation
Thank you for your work. I was waiting for this. But i found out that it is not posssible to output UTF-8 sign with Powershell Core and this PR. Powershell-Plugin with your PR and pwsh 7.0: Bash-Buildstep with pswh 7.0: I only have a Windows Jenkins environment and can't test if it's because of your changes. |
And the Plugin crashes on Jobs that were created with a old version of this Plugin because "powerShellVersionPreference" was never set :
If the job is saved after updating the plugin it works again |
Ah good catch on the UTF-8 @Herr-Sepp I'll dig into that one. The old jobs failing is one of the biggest blockers at the moment for the WIP flag. I'll dig back into this this evening |
So, I've confirmed that the UTF-8 Icon issue is present with the current PowerShell Plugin version on windows builds. MacOS PR Version: Works |
Fixes issues with builds that have not been edited since updating the plugin
@Herr-Sepp Issue with existing pre-existing jobs failing should be resolved. Will be running on my instance for a bit prior to removing WIP but I believe it's usable now Also in regard to UTF-8, I'm not too positive what the root cause of that is. I may dig into it one of these nights when I get some time. I'll most likely review how the shell integration is pulling the values. I'm seeing issues with the UTF-8 when using a Bash build step so it may be a deeper issue as I see quite a few results when googling UTF-8 Jenkins Windows |
Thanks! To get UTF-8 support on Windows you must start jenkins with Jenkins.xml Line 41
after a restart other plugins like bash output UTF-8 correctly |
Any updates on this? I would love to be able to use PS Core on my Windows Jenkins host, but this plugin defaults to PowerShell.exe and not pwsh.exe. |
Removed WIP flag. I've been running this on my instance for a bit now, and have not run into any issues. Open to suggestions or changes as needed. @chrisalbrecht Anything you would like to see changed prior to considering to merge? |
Adding the other two maintainers as I'm unsure who manages Pull Requests for this repository. |
This seems to be the wrong approach for me. I think that using ToolInstallation is the proper way to define where to get the tool path for a given slave in Jenkins. Here is a list of examples of ToolInstallation: https://www.jenkins.io/doc/developer/extensions/jenkins-core/#toolinstallation A simple plugin that uses this is vstestrunner-plugin, where we can get some inspiration. |
This adds the ability to force the plugin to use Windows PowerShell or PowerShell core. The default value is the current method of determining which version to use.
Reference: https://issues.jenkins-ci.org/browse/JENKINS-52421