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
Community showcase
Posted yesterday in United States

Topic Tuesday, now on Thursday! :-P

Happy Thursday everyone! This is usually a Tuesday thing but I've been crazy busy.  I finally had a moment to breath and so here we are. Atlassian has several tools and features to help users ...

10 views 0 0
View post

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