Is it possible with inline scripts to be able to use python? I know it does bash scripting just fine, didn't know if there was a plugin that could do inline python or not.
Just use:
/usr/bin/python <<EOFprint "Hello, World!"EOF
as the inline script body.
python -c "print 'Hello, World!'"
Maybe not the best solution for a large amount of python code. Then again, anything non trivial should probably go into a file anyway.
Once again... you are amazing. Thanks again
Then again, anything non trivial should probably go into a file anyway.
Definitely. You can backup your database. But any build scripts should always be part of your source repository, whenever possible. You don't want to do a lot of 'hidden magic' that exists only in Bamboo Tasks (or any other CI tool for that matter)
If you want to execute a longer script and use the "Command" task with a Python executable in order to have the Python capability automatically added you can do the following:
cat <<EOF >script.pyprint "Hello, World!"EOF
when I tried it, I get this error
<< was unexpected at this time.
@Przemek Bruski thank you for your replyI am still getting error when attempting an python script "inline". I know your response is straight forward but can you elaborate more on how to achieve a python script inline?
It looks like you're new here. Sign in or register to get started.