-
-
Notifications
You must be signed in to change notification settings - Fork 62
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot execute pwsh as shell commands #660
Comments
interesting, did you try running updatecli with the flag The goal is to not delete the git repository from |
I think maybe my issue was related to the fact that I cannot develop new scripts and test those locally with updatecli which is rather confusing. |
That definitively looks like a bug to me. I was never able to test updatecli on a Windows machine so can't be sure. Given how I found hard to execute shell command with Go on Linux, I really do not trust my code on that area :D |
You aren't the only one to find this confusing. |
@olblak I really think that it's unrelated to "diff" / "pullrequest" / "actions", but with how Windows is handled when running a "shell" command with the updatcli binary on Windows |
but in this case, @jetersen mentioned that he was on Ubuntu |
Again my confusion is that updatecli for the shell command uses the tmp folder as a working directory. Maybe we need an option to run on the current git clone that assumes dry run. |
You are not the first one to find this behavior confusing. Up to now, relying on a temporary directory make things safer. The biggest challenge comes from the fact that a manifest can have multiple scm configuration that may have nothing to do with the local repository. |
That's part of @dduportal refactoring with #465
You may send him a beer or two to motivate him ;) |
@dduportal has not setup his GitHub sponsor 馃槄 |
I'm the Internet Explorer of the open source: Just realizing what GitHub Sponsor exists and what is it :D |
I think we can close this issue and link to #465 I have verified I am able to perform powershell scripts over here: jenkinsci/bom#1279 FYI updatecli and the powershell script is really useful for managing pinned version. |
I think that could be a great story to publish on www.updatecli.io :) |
My solution ended up being simple: https://github.com/jenkinsci/bom/blob/72a2154456b19142082e63d7195b4e82a3848dcf/updatecli/generate-manifests.ps1#L118 targets:
jenkins:
kind: shell
spec:
command: pwsh -NoProfile -File {{ requiredEnv "GITHUB_WORKSPACE" }}/updatecli/update-jenkins.ps1 This allows me to always use the correct shell script even when updating it. The powershell scripting ended up being useful to fully generate everything inside the bom's multiple pom.xml into updatecli manifests. Now we just need an updatecli with auto discovery and no manifests. But ya teaching updatecli about pom.xml and use cases like https://github.com/jenkinsci/bom might be hard. |
Is there an existing issue for this?
Current Behavior
Expected Behavior
Runs the powershell script 馃槄
Steps To Reproduce
Environment
Anything else?
I would like to use powershell as it has a decent way of interacting with XML while #336 #371 is still WIP
The text was updated successfully, but these errors were encountered: