简体   繁体   English

Hudson作业在队列中时启用和禁用

[英]Hudson job enable and disable while it is in queue

Can I disable the job while it is in que waiting for build. 我可以在等待构建时禁用该作业吗? and Can I delete my job from the que itself? 我可以从que本身删除我的工作吗?

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. 删除该特定作业的存储库目录(基于Maven的项目),并在其中下载依赖项jar。
  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. 它通过步骤2并禁用了该作业,但是该作业在构建队列中。
  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. 在执行步骤3时,构建从队列开始,由于找不到依赖项而失败,因此将它们从步骤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. 使用远程API,它将为您提供当前在构建视图中的所有项目。 But I didn't find a way to get all information to generate the cancel link. 但是我没有找到一种获取所有信息以生成取消链接的方法。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM