簡體   English   中英

Chef-jenkins插件無法識別jenkins參數

[英]Chef-jenkins plugin not recognising the jenkins parameter

我已經在Jenkins上安裝了Chef-client插件( https://github.com/melezhik/chef-plugin/ ),以便能夠觸發從Jenkins運行的Chef客戶端。 我已經在Jenkins作業中配置了String參數,並且需要將該參數用作在作業配置中運行的Chef客戶端的ssh主機

但是我無法在Chef插件的ssh主機字段中引用Jenkins參數。 我嘗試了將參數引用為$ PARAMETER的標准Jenkins方法,也將ruby方法引用為env [“ PARAMETER”],但ssh主機無法識別該參數。 我將如何對ssh主機字段進行參數化的任何幫助將不勝感激。

附上一些屏幕截圖,以提高清晰度。 在此處輸入圖片說明

在此處輸入圖片說明

編輯:添加控制台輸出:

[2015-03-18 15:58:41 +1100] INFO: rendering ERB template
[2015-03-18 15:58:41 +1100] INFO: parsing JSON string
[2015-03-18 15:58:41 +1100] INFO: saving JSON to file
[2015-03-18 15:58:41 +1100] INFO: chef json url => http://localhost:8080//job/Chef-Client/ws/chef.json
[2015-03-18 15:58:41 +1100] INFO: host => $HOST_TEST
$ bash -c "ssh jenkins@$HOST_TEST sudo chef-client -l info -j http://localhost:8080//job/Chef-Client/ws/chef.json  "
ssh: Could not resolve hostname : Name or service not known
ERROR:  (Java::Hudson::AbortException)
sun.reflect.GeneratedConstructorAccessor114.newInstance(Unknown Source)

看代碼

https://github.com/melezhik/chef-plugin

似乎此插件不支持參數(用作環境變量)(v.0.1.3)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM