Home > Back-end >  Jenkins job api json and Rundeck remote url
Jenkins job api json and Rundeck remote url

Time:10-04

I tried to bind the remote url of Rundeck job with the job api of jenkins as options provider.

So i use the api that give jenkins to call my job with this url http://localhost:8080/job/my_job/api/json?tree=jobs[name] who give this

{"_class":"org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject","jobs":[{"_class":"org.jenkinsci.plugins.workflow.job.WorkflowJob","name":"lenormandSeb-patch-2"},{"_class":"org.jenkinsci.plugins.workflow.job.WorkflowJob","name":"master"},{"_class":"org.jenkinsci.plugins.workflow.job.WorkflowJob","name":"update/codesniffer"}]}

But when i use this url on rundeck as remote url, only "_class" and "jobs" are showing on select.

Did i miss something on the Rundeck job configuration ?

enter image description here

thank

CodePudding user response:

That's because Rundeck only admits this kind of format as a remote option. To "understand" other "formats" the quickest way is to develop a custom option plugin that gives options using jq similar to this one, you can take a look at this.

  • Related