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

Running Python Scripts inside Bamboo?

Trivikram Belagod December 3, 2013

Is there a way i can run a python script directly inside Bamboo, not as a file, but as an inline script, by remote connecting to a server? For example, to run a shell script I can use the "SSH Task" option in Bamboo to connect to the host server and type out the SSH commands and run them as I am running on a terminal. Can this be done with Python scripts by connecting to a host and loading python on that host?

1 answer

1 vote
Sebastian Pastor September 9, 2014

**** THIS DOESN'T WORK ****

For a script running in a Linux machine you can use the "hash-bang" to specify python as the interpreter. Typically, in Linux the "#!/bin/bash" is used, so changing it to "#!/bin/python" should do the trick for a python module. Take a look at this StackOverflow question.

However, it doesn't work in Bamboo because the hash-bang is ignored, the same reason we can't use BASH instead of SH. This JIRA issue tracks a change request for that.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events