![](/img/trans.png)
[英]Is it possible to run part of Job on master and the other part on slave?
[英]Is it possible to run a Jenkins job on a slave, use an excel file created as output from the first job and run the next job on Master?
我正在嘗試在奴隸上執行詹金斯的工作。 作為第一項工作的結果,將創建一個excel文件。 我想在第一個作業完成后根據excel的值在主服務器上運行第二個參數化的作業。
到目前為止,我已經嘗試了以下選項:
1. 使用Join插件 。 這不起作用,因為第二項工作已參數化,我必須從excel文件中獲取輸入。 沒有提供選項或從文件中讀取參數的選項。
2. 主服務器上的管道 -由於某些原因,當我在主服務器上創建管道並執行第一個從屬作業時,由於一個作業已在運行,而主作業正在等待主服務器上的作業,因此從屬作業將等待插槽運行。從屬運行。 因此會導致死鎖。
管道(腳本化的,不是聲明性的)聽起來很可行。
就像是:
node('MySlaveLabel') {
...do your stuff here...
stash includes: 'myExcelFile.xls', name: 'myExcelFile'
}
node('MyMasterLabel') {
unstash 'myExcelFile'
...examine your Excel file here..
...add conditional statements...
}
只要不嵌套節點塊,從屬節點上就只需要1個執行程序,而主節點上就需要1個執行程序。
如果由於某種原因您確實需要作業互相調用:
build 'anotherProject'
語法。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.