Example to Create a Job in Jenkins
Go through the Function Header for its usage