Forums

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

deployment Variable cannot handle ssh command

cabbiepete
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!
December 10, 2018

if I put a command like

 

ssh root@XXX.XXX.XXX.XXX 'ls'

 

Which will ssh to the server and run the command "ls" on it directly into the pipelines.yml file it works fine. 

 

But if I save the exact same string in a deployment variable e.g. CMD and then use the $CMD value in the .yml file it fails. It seems as though the quoted portion is attempted to run on the build machine rather than running ssh and sending the string to the remote server.

I'd like to use variables mainly so that developers that have write access to the repo do not have SSH access to run any commands but it would also be nice to be able to vary the between environments.

Any ideas?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events