Running Python Scripts inside Bamboo?

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

**** 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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Uncategorized

Friday fun: how many celebrates Midsummer holiday or is this a Swedish tradition only?

Any other country that celebrates Midsummer holiday (this friday 22 June)?  

44 views 3 1
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you