Create new Jenkins Job - Jimmy-Xu/jenkins-hypercli-image GitHub Wiki

Create New Item in Jenkins

assets/jenkins-job/1.new-job.png

Set Item Name and Type

assets/jenkins-job/2.set-job-name-and-type.png

Set Source Code Management

Set https://github.com/hyperhq/jenkins-hyper-example-app as Repository URL

assets/jenkins-job/3.set-source-management.png

Add Credentials for github

It's used for clone project to jenkins workspace.
It's optional for public github repo

assets/jenkins-job/4.add-github-token-in-jenkins.png

Set Build Trigger

Jenkins build job will start automatically when receive the github push event

assets/jenkins-job/5.build-when-github-push.PNG

A GitHub webhook will be created by Jenkins

assets/jenkins-job/6.auto-create-github-webhook.PNG

Add "Execute Shell" as a Build Step (The most important part)

//The following three variable can be customized
AWS_ACCESS_KEY=AKIxxxxxxxxxxxxxxxxxxxxx
AWS_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AWS_S3_BUCKET=jenkins-hyper-example-app

assets/jenkins-job/7.build-execute-shell.png