开发者

Hudson job enable and disable while it is in queue

开发者 https://www.devze.com 2023-01-30 02:00 出处:网络
Can I disable the job while it is in que waiting开发者_运维知识库 for build. and Can I delete my job from the que itself?

Can I disable the job while it is in que waiting开发者_运维知识库 for build. and Can I delete my job from the que itself?

My Automation program is like this :

  1. Check for the job if currently executing .
  2. If not executing disable to job
  3. Delete the repository directory(maven based project) for that particular job , where it downloaded dependency jars.
  4. update the job (source) contents from version controller.
  5. Enable the job.

Example Scenario:

  1. Currently the job is not executing ,
  2. It is passed through Step 2 and disabled the job, but that job is in build queue.
  3. Started executing deleting the dependency files.

    While executing step 3 , Build started from the queue and failed due to dependency not found and they are deleted from Step 3.


My Question is:

If the job is disabled and in build queue, will that job will be disabled or not ?

Will it be disabled from the next run?

In my scenario it is executing the job even it is disabled.


I haven't found a way to actually disable a job. However, I found a way to check whether a job is in the build queue. Use the remote API, which gives you all the items currently in the build view. But I didn't find a way to get all information to generate the cancel link.

http://server:port/queue/api/xml
0

精彩评论

暂无评论...
验证码 换一张
取 消