jenkinsjenkins-clijenkins-api

How to check disabled jobs with Jenkins server?


I am using Jenkins to run tests on my servers.

So I created a job for each server and I run the test on the job, and I would like to know with simple bash script if my specific job is disabled/enabled?

I can ssh to Jenkins server and I want to run that script from there how I can do that?


Solution

  • See http://<Your Jenkins>/api and http://<Your Jenkins>/api/xml:

    <hudson>
      ...
      <job>
        <name>...your job name...</name>
        ...
        <color>disabled</color>
      </job>
      ...
    

    For a job's description see http://<Your Jenkins>/job/<Your job's name>/api and http://<Your Jenkins>/job/<Your job's name>/api/xml.