If you are using Jenkins with the EC2 API tools (sparking up injectors and tearing them down etc.), you will need to set up the Jenkins user profile. By default this user doesn't seem to have a .profile or .bashrc but you should be able to copy over the ubuntu .profile. Switch to user jenkins with 'sudo su jenkins', go to the home directory (cd ~), in my case '/var/lib/jenkins' and edit (or make) the .profile there.
You should have something like the following in the jenkins user's .profile:
Restart Jenkins to pick up the changes with:
sudo /etc/init.d/jenkins restart
Here is the latest Jenkins script, including a check on environment variables, a test to make sure the jmeter script ran before we do the analysis and a call to the latest rate-check.sh script: