Create a Jenkins job that runs a scripted deployment.
Create a scripted deployment job in Jenkins
From the Jenkins dashboard, select the New Job link.
Enter MyDeployment in the Job name field. Click on the Build a free-style software project radio button and click the OK button.
Under the Source Code Management section, select the Git radio button. In the Repository URL field, enter your forked repository URL. Mine is email@example.com:stelligent/devopsinthecloud.git. Yours will be something like:
In the Branches to build | Branch Specifier field, enter master.
Within the Build section, enter the following command in the Execute shell text field.
instance_ip=`ruby /usr/share/tomcat6/sqs_receive_message.rb Deployment $AWS_ACCESS_KEY $AWS_SECRET_ACCESS_KEY`
Click the Save button.
Go back to the Jenkins dashboard and click the Build button next to the MyDeployment job.