Create a new stage. Make sure it runs last. Create a job within this stage. Choose the Script job.
Paste in the shell script below for the script. You may need to change the path of ruby.
For the argument field, insert the following: ${bamboo.buildResultsUrl} ${bamboo.planKey}