Install octopus CLI action fails on a self-hosted windows runner
stambunan opened this issue · comments
Describe the bug
Related to #139.
I'm using the latest Octopus step (1.1.8) and I'm still getting the error:
Expand-Archive : is not a supported archive file format. .zip is the only supported archive file format.
To Reproduce
Use the following:
- name: Install Octopus CLI
uses: OctopusDeploy/install-octopus-cli-action@v1.1.8
with:
version: latest
Expected behavior
Installation of Octopus CLI should be successful
Screenshots
Powershell Version:
5.1.17763.2268
@stambunan I noticed the fix for this is not in v1.1.8, we will be releasing a new version very shortly but in the meantime, can you try uses: OctopusDeploy/install-octopus-cli-action@main
?
@johnsimons Looks like it's still showing the same error
We have just published v1.1.9
That is really weird @stambunan, I am not sure what is going on.
Are you using a self hosted runner?
I have just noticed the title of the issue 🤦
We are testing this action using the latest windows, and it seems it uses PowerShell Core.
See https://github.com/OctopusDeploy/install-octopus-cli-action/runs/5000096958?check_suite_focus=true
That seems to be the only difference.
What Windows version are you running?
Ah that might be why. We're using server 2019. I've managed to work around this by installing octo.exe manually and adding that to the system path. I've then removed this step and was able to use the create release action just fine.
Originally, I added this step so I can install octo and then use the create release action step. However, perhaps the better thing to do on a self-hosted runner is to install octo.exe manually
I thought this would have worked on non PS Core, when I look at the code in Powershell, which is part of the github action lib, it attempts to call .net code, do you have .NetFramework installed in this machine?
Hey @stambunan if you add the Install CLI action as below (using the version which has the fix in it) does it work for you on your self-hosted Windows runner?
- name: Install Octopus CLI
uses: OctopusDeploy/install-octopus-cli-action@v1.1.9
with:
version: latest
I'm not sure why when you tried with OctopusDeploy/install-octopus-cli-action@main
didn't work as it should use what the latest code on main
branch is but looking at the log output it didn't seem to be as it was still missing the .zip
extension on the path.
Hey @hnrkndrssn , we've just installed octopus CLI on the server and that seems to work. So we didn't need to add a step that installs the cli. We might use this step in the future but for now, I think we're happy to keep it as is.
@johnsimons , yep we have .NetFramework and Core installed in the build machine. We use it to build our Framework and Core projects.
Happy to close this for now unless there are any other concerns as I think the new version of CLI action should resolve this? If not, as a workaround, the octo.exe can be installed to the build server.
@stambunan Thanks for confirming the fix.
Both options should work either install cli directly on the agent or use the step.
Any other issues let us know.
Hi @justin-newman,
Sorry to hear that you also have issues with this.
Can you please enable debug logging and send us the logs?
I want to see what this line looks like.
@stambunan and @justin-newman,
I finally got to the bottom of this issue, so in the end, my fix in this PR was supposed to have gone out in v1.1.9 but it never did!
So I have just released v1.1.10 which now contains the fix to this issue, so please update your workflow to use this new version.
Sorry for the confusion.
Thank you very much. I'm sorry I didn't get back to you in time, I went on vacation basically right after commenting and then ofc I just forgot all about it.