How does jenkins deploy the same jar package to multiple servers

If you have not deployed before, you can follow the steps below to deploy it first. This article mainly talks about jenkins同一jar包部署到多台服务器
[Jenkins] deploying the Springboot project https://blog.csdn.net/qq_39017153/article/details/131901613

Install plugin

Publish Over SSH has been installed here

系统管理
插件管理
可选插件
搜索:Publish Over SSH

Insert image description here
Insert image description here

Configure ssh service

Setup process

系统管理
系统配置
找到:Publish over SSH
点击新增按钮

Insert image description here
Insert image description here
Insert image description here
Insert image description here

Execute after the build is complete

Added Send files or execute commands over SSH, if you feel confused when you suddenly come here, you can go back to the first step and take a look. I won’t repeat it here.
Insert image description here

Insert image description here
Insert image description here

Just fill in and save.
Warm reminder: 如果是需要执行脚本一定要在脚本里面加上刷新环境变量的代码,不然识别不了
source /etc/profile
If you encounter any problems during use, you can comment and discuss.

Guess you like

Origin blog.csdn.net/qq_39017153/article/details/132360439