Last active
September 4, 2025 08:12
-
-
Save stuart-warren/7786892 to your computer and use it in GitHub Desktop.
Revisions
-
stuart-warren revised this gist
Dec 4, 2013 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,14 @@ # check if job exists curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken # with folder plugin curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken # without folder plugin curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken # create folder curl -XPOST 'http://jenkins/createItem?name=FolderName&mode=com.cloudbees.hudson.plugins.folder.Folder&from=&json=%7B%22name%22%3A%22FolderName%22%2C%22mode%22%3A%22com.cloudbees.hudson.plugins.folder.Folder%22%2C%22from%22%3A%22%22%2C%22Submit%22%3A%22OK%22%7D&Submit=OK' --user user.name:YourAPIToken -H "Content-Type:application/x-www-form-urlencoded" # see http://jenkins/api/ -
stuart-warren revised this gist
Dec 4, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,6 @@ curl -s -XPOST 'http://jenkins/job/FOLDERHERE/createItem?name=yourJobName' --dat user user.name:YourAPIToken # without folder plugin curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken # see http://jenkins/api/ -
stuart-warren revised this gist
Dec 4, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # with folder plugin curl -s -XPOST 'http://jenkins/job/FOLDERHERE/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" -- user user.name:YourAPIToken # without folder plugin curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:0h3gefYourRandomToken03he -
stuart-warren revised this gist
Dec 4, 2013 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,8 @@ # with folder plugin curl -s -XPOST 'http://jenkins/job/FOLDERHERE/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" -- user user.name:0h3gefYourRandomToken03he # without folder plugin curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:0h3gefYourRandomToken03he # see http://jenkins/api/ -
stuart-warren created this gist
Dec 4, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ curl -s -XPOST 'http://jenkins/jenkins/job/FOLDERHERE/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:0h3gefYourRandomToken03he