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?
**** 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.
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot