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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,736
Community Members
 
Community Events
176
Community Groups

SSH Multiple Command on pipeline ssh-run

Hi Guys,

 

I have a pipeline and need to run 4 .sh files on the mode script and my pipeline as follows : 

- step:
name: Deploy to ciamsworker01
script:
- pipe: atlassian/ssh-run:0.2.2
variables:
SSH_USER: $ciamsuser
SERVER: $server
PORT: $worker01port
MODE: 'script'
COMMAND: './deploy_worker_psr.sh'
I need to run another command than deploy_worker_psr.sh, is it possible? 
PS : i tried using && and ; and the file become unread(no such file or directory)

1 answer

0 votes
Ben Atlassian Team Apr 03, 2022

Hey Revan,

Based on the ticket description, it appears you wish to run commands one after the other - if this is the case, I believe that this past community post will answer your question:
https://community.atlassian.com/t5/Bitbucket-questions/how-to-use-multiple-command-in-ssh-run/qaq-p/1112696

Hope this helps.

- Ben (Bitbucket Cloud Support)

Hi Ben,

It's not working when I put more than one shell file to execute.

The scripts become No Such files or directory please find my screenshot.SSH1.png

Ben Atlassian Team Apr 05, 2022

Hey Revan,

Are you able to ensure the path is correct? I'm noticing that there is no "./" on the other bash script listing. Can you maybe try to create a bash script in the same folder as deploy_worker_cwi.sh which echos a message and attempt to run it?

Ie ./Worker-CWI/testscript.sh && ./Worker-CWI/deploy_worker_cwi.sh

By doing so, you can test if it's an issue with the path or with the command/syntax.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events