天天看點

jenkins(5)——使用插件Publish over SSH

1.先下載下傳插件Publish over SSH

2.到系統設定編輯Publish over SSH

jenkins(5)——使用插件Publish over SSH

公共配置:

Passphrase:密碼(key的密碼,如果你設定了)

Path to key:key檔案(私鑰)的路徑,這個和下面的key可以不用輸入

Key:将私鑰複制到這個框中

Disable exec:禁止運作指令

私有配置:

SSH Server Name:辨別的名字(随便你取什麼)

Hostname:需要連接配接ssh的主機名或ip位址(建議ip)

Username:使用者名

Remote Directory:遠端目錄

Use password authentication, or use a different key:可以替換公共配置(選中展開的就是公共配置的東西,這樣做擴充性很好)

私有配置的進階:

Port:端口(預設22)

Timeout (ms):逾時時間(毫秒)預設即可

Disable exec:禁止運作指令

Test Configuration:測試連接配接 

點選Test Configuration檢視是否連接配接成功

3.項目配置

jenkins(5)——使用插件Publish over SSH

Source files:相當于jenkins中的workspace裡面你的項目路徑

Remove prefix:自己需要過濾的檔案

Remote directory:相當于在剛剛在系統配置中下面加個cbp檔案夾

Exec command:最後執行的指令

jenkins(5)——使用插件Publish over SSH
jenkins(5)——使用插件Publish over SSH
jenkins(5)——使用插件Publish over SSH