我有一个要求,我需要在jenkins从属计算机上运行postbuild任务。我无法使用属性“ 限制可以在哪里运行该项目 ”,因为无需在从属系统中运行整个项目。
Two possibilites:
Use jenkins pipeline
node("master") { stage("do main build thing") { // do something } } node("slave") { stage("do postbuild") { // do post build task } }
More information about the jenkins pipeline https://jenkins.io/doc/book/pipeline/jenkinsfile/
Use a second job
You can configure a job which only executes the post build task and restrict it to the slave with "Restrict where this project can be run". On the main job you add a post build action: https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.