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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Edited

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

@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

Are there no plans to support windows servers?

Or at least support SH instead of BASH?

@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
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

113 views 1 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you