jenkins-api

Schedule Jenkins job using Jenkins Rest API

只愿长相守 提交于 2021-02-18 12:06:04
问题 I have a Jenkins job which is scheduled for a specific time. I want to modify that timing programmatically. I tried to modify the build by installing Schedule Build plugin and modify it using http://jenkins_url/job/jobname/build?delay=3344sec . But this will put the job in quiet period which holds the java thread. I'm looking to modify the Schedule entry without putting it to quiet period. 回答1: You can use the Build Triggers -> Build periodically job configuration option. Use that to specify

Schedule Jenkins job using Jenkins Rest API

强颜欢笑 提交于 2021-02-18 12:02:46
问题 I have a Jenkins job which is scheduled for a specific time. I want to modify that timing programmatically. I tried to modify the build by installing Schedule Build plugin and modify it using http://jenkins_url/job/jobname/build?delay=3344sec . But this will put the job in quiet period which holds the java thread. I'm looking to modify the Schedule entry without putting it to quiet period. 回答1: You can use the Build Triggers -> Build periodically job configuration option. Use that to specify

Schedule Jenkins job using Jenkins Rest API

ⅰ亾dé卋堺 提交于 2021-02-18 12:02:05
问题 I have a Jenkins job which is scheduled for a specific time. I want to modify that timing programmatically. I tried to modify the build by installing Schedule Build plugin and modify it using http://jenkins_url/job/jobname/build?delay=3344sec . But this will put the job in quiet period which holds the java thread. I'm looking to modify the Schedule entry without putting it to quiet period. 回答1: You can use the Build Triggers -> Build periodically job configuration option. Use that to specify

how to get all the jenkins users through api

好久不见. 提交于 2021-01-01 06:44:22
问题 I'm trying to get all the user in jenkins by using api . For example I hit the following command in postman and it is showing me all the jobs in jenkins . Url = 192.168.195.150:8080/api/json?pretty=true Result: { "_class": "hudson.model.Hudson", "assignedLabels": [ { "name": "master" } ], "mode": "NORMAL", "nodeDescription": "the master Jenkins node", "nodeName": "", "numExecutors": 2, "description": null, "jobs": [ { "_class": "hudson.model.FreeStyleProject", "name": "Apache_kafka_Consumer

how to get all the jenkins users through api

回眸只為那壹抹淺笑 提交于 2021-01-01 06:44:13
问题 I'm trying to get all the user in jenkins by using api . For example I hit the following command in postman and it is showing me all the jobs in jenkins . Url = 192.168.195.150:8080/api/json?pretty=true Result: { "_class": "hudson.model.Hudson", "assignedLabels": [ { "name": "master" } ], "mode": "NORMAL", "nodeDescription": "the master Jenkins node", "nodeName": "", "numExecutors": 2, "description": null, "jobs": [ { "_class": "hudson.model.FreeStyleProject", "name": "Apache_kafka_Consumer

how to get all the jenkins users through api

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-01 06:43:54
问题 I'm trying to get all the user in jenkins by using api . For example I hit the following command in postman and it is showing me all the jobs in jenkins . Url = 192.168.195.150:8080/api/json?pretty=true Result: { "_class": "hudson.model.Hudson", "assignedLabels": [ { "name": "master" } ], "mode": "NORMAL", "nodeDescription": "the master Jenkins node", "nodeName": "", "numExecutors": 2, "description": null, "jobs": [ { "_class": "hudson.model.FreeStyleProject", "name": "Apache_kafka_Consumer

Create jobs and execute them in jenkins using REST

社会主义新天地 提交于 2019-12-29 17:51:47
问题 I am trying to create a WCF REST client that will communicate to Jenkins and create a job from an XML file and then build the job. My understanding is that you can do that with Jenkins. Can some one please provide some commands that you can type on a browser's address bar to create and build jobs? ie: http:localhost/jenkins/createItem?name=TESTJOB something along those lines. 回答1: See the Jenkins API Wiki page (including the comments at the end). You can fill in the gaps using the

API (curl)Command to Approve a promoted build Job in Jenkins

爷,独闯天下 提交于 2019-12-23 17:32:07
问题 Is there any way can an Approver approve a specific build using curl command? I am using Promoted Builds Plugin for manual approval for builds. when i am trying below curl command it is giving "Error 400 Nothing is submitted". I searched everywhere but couldn't get proper answer. Please help curl http://admin:XXXXXXXXXXXX@JENKINS_URL/job/JOB_NAME/129/promotion/promotionProcess/PromoteForTesting/promotionCondition/hudson.plugins.promoted_builds.conditions.ManualCondition/approve?token

As a Jenkins administrator, how do I get a user's API token without logging in as them?

可紊 提交于 2019-12-22 04:12:32
问题 As an administrator, how do I get an API token for a user other than myself, without logging in as them? When I visit the user configuration page, all I see is that "Token is hidden", and I cannot change it either. 回答1: There is a Jenkins System Property, jenkins.security.ApiTokenProperty.showTokenToAdmins . You need access to the master/OC process startup to change it. Documented at the bottom of https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties (We are