Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ssh-run pipe cannot run a batch file on windows server 2016

Naeim Fard April 11, 2020

Hi everyone. I'm trying to run a batch file (.bat) on a windows server from the bitbucket pipeline by using ssh-run pipe. 

...
- pipe: atlassian/ssh-run:0.2.5

    variables:

      SSH_USER: $VPS_USERNAME

      SERVER: $VPS_IP

      COMMAND: 'C:\path\server.bat'


Pipeline status is successful at the end but the server.bat is not executed on windows server. (if I run server.bat manually on windows it will work) 

 

//Edit: just understand this question is asked in the wrong place but don't know how to move or delete it. 

1 answer

0 votes
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 28, 2020

@Naeim Fard do you still have the problem with the pipe? You can add tag pipes , if it is related to Bitbucket Pipeline Pipes

As for your question, I think, for ssh-run we support bash and do not support windows servers. Though, this is a good idea for custom pipe , you can look at the Guide how to create it .

 

Regards, Galyna

Diogo Borges February 3, 2021

Are there no plans to support windows servers?

Or at least support SH instead of BASH?

Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2021

@Diogo Borgeswe support things that are available in the image you use.

If you use atlassian default-image 2, there will be bash and sh.

You can use also mcr.microsoft.com/powershell image - there is pwsh , bash, sh.

 

Look at the screenshot attached, I've just tried that pwsh shell is also available, just like sh.

You can also use them as /bin/sh , /bin/pwsh, etc.

Screenshot from 2021-02-05 17-53-03.png

 

Regards, Galyna

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events