1、新建maven項目
2、配置git倉庫
3、在遠程機器上執(zhí)行腳本,這一步需要先配置能ssh遠程機器
a、安裝publish over ssh 插件
b、jenkins----配置----config system,配置遠程連接主機賬號密碼
高級那邊配置密碼
c、配置Send files or execute commands over SSH after the build runs
4、構(gòu)建jar包
5、前面Send files or execute commands over SSH after the build runs也可以在Pre Steps或者Post Steps這兩個步驟配置
6、全部配置完保存,就可以構(gòu)建了
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習有所幫助,也希望大家多多支持服務(wù)器之家。
原文鏈接:https://blog.51cto.com/riverxyz/2507225