Created
September 15, 2015 17:58
-
-
Save adampats/a1d0441f0abcf69d3477 to your computer and use it in GitHub Desktop.
Create new Jenkins job via API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jenkins_server='jenkins-dev.domain.net' | |
| job_name='my-new-branch-job' | |
| username='adam' | |
| curl -s -k -X POST "https://$jenkins_server/createItem?name=$job_name" \ | |
| --data-binary @config.xml \ | |
| -H "Content-Type:text/xml" \ | |
| -u $username | |
| # enter password when prompted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment