构建后删除詹金斯项目
Delete jenkins project after build
用户能够从应用程序创建 jenkins 作业以安排操作。
我想知道是否可以在执行构建后删除 jenkins 项目。
有 Post-build 操作 "delete workspace when build is done" 但它只删除工作区,而不是项目。
HTTP 应该是可能的POST
http:///jenkinsServer/job/yourJob/doDelete
看看http://jenkinsServer/job/YourJob/api/?
Delete a job
To programmatically delete this job, do HTTP POST to this URL.
使用 Groovy Postbuild Plugin, you can execute code after the build. Now it is only up to you to figure out, how to delete a Jenkins job using Groovy. This question 可能是一个起点。
用户能够从应用程序创建 jenkins 作业以安排操作。
我想知道是否可以在执行构建后删除 jenkins 项目。 有 Post-build 操作 "delete workspace when build is done" 但它只删除工作区,而不是项目。
HTTP 应该是可能的POST
http:///jenkinsServer/job/yourJob/doDelete
看看http://jenkinsServer/job/YourJob/api/?
Delete a job
To programmatically delete this job, do HTTP POST to this URL.
使用 Groovy Postbuild Plugin, you can execute code after the build. Now it is only up to you to figure out, how to delete a Jenkins job using Groovy. This question 可能是一个起点。