Use jenkins + Shell achieve continuous deployment services

Achieve continuous deployment services, what needs to be done a few things,
first is to generate SSH keys:
https://blog.csdn.net/weixin_43404791/article/details/105348439
Secondly, download the plug

ssh.hpi
publish-over-ssh.hpi
ssh-credentials.hpi

宁愿安装过多,也别少安装
我按照链接的内容往后接
打开jenkins,单击系统管理-》系统设置,在Jenkins里面配置Public-over-ssh如图
首先将私钥id_rsa粘贴到PublishOverSSH中的key 处,注意这里的Passphrase指的是你在生成密钥的时候输入的密钥密码,按照你的密码输入,我没有设置,所以不输入

Here Insert Picture Description
After configuring the following SSH Servers
Here Insert Picture Description
where remote directory is that you need to pull to save directory
back, jenkisn project.
The first step portion provided Maven command Build
Here Insert Picture Description
a second step, after the construct was constructed by increasing click configuration procedure items, after selecting "Send build artifacts over SSH", the configuration in FIG
Here Insert Picture Description
construct, to create a log:

Finished: UNSTABLE

Unstable, but I have completely succeeded! ! !

Published 137 original articles · won praise 79 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_43404791/article/details/105350838