The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ssh error on deploy

Peter Surrena
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 17, 2019

Hello,

I'm new to BB Pipelines and I'm and as a first step, I'd like to deploy to my staging server on a push. I get the following error when I push:

bash: ssh: command not found

Is SSH not working or is this referring to the bash script?

My config file is:

image: php:7.1.29

pipelines:
default:
- step:
name: Install ssh
script:
- apt-get update -y
- apt-get install -y ssh
- step:
name: Deploy to Staging
script:
- sh deploy.sh | ssh username@12.34.567.890
- echo "Deploy step finished"

 

Am I approaching this incorrectly?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Antoine Büsch
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 25, 2019

Hi Peter,

Each step is independent and executes in a fresh docker environment, so even though you're installing ssh in the first step, it won't be available in the second step.

My suggestion is to either install ssh and run your deploy script in the same step, or use a base docker image that already has ssh installed.

Hope this helps!

Antoine

TAGS
AUG Leaders

Atlassian Community Events