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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.