0
点赞
收藏
分享

微信扫一扫

Jenkins 自动化部署 持续集成

冬冬_79d4 2022-06-10 阅读 52

Jenkins 自动化部署 持续集成_java

螢幕快照 2017-11-18 22.56.06.png

Source files

build/libs/cms-0.0.1-SNAPSHOT.jar

Help for feature: Source files
Files to upload to a server.

The string is a comma separated list of includes for an Ant fileset eg. '*/.jar' (see Patterns in the Ant manual).
The base directory for this fileset is the workspace.

Remote directory

/usr/local/cms

Help for feature: Remote directory
Optional destination folder.

This folder will be below the one in the global configuration, if present.
The folder will be created if does not exist.

Exec command

set pid = $(ps -ef|grep java|grep kotlin|awk '{print $2}')
if (test $pid)
then
kill -9 $pid
fi
cd /usr/local/cms
nohup java -jar cms-0.0.1-SNAPSHOT.jar &

A command to execute on the remote server

This command will be executed on the remote server after any files are transferred.
The SSH Transfer Set must include either a Source Files pattern, an Exec command, or both. If both are present, the files are transferred before the command is executed. If you want to Exec before the files are transferred, use 2 Transfer Sets and move the Exec command before the Transfer set that includes a Source files pattern.

Jenkins 自动化部署 持续集成_java_02

image.png Jenkins 自动化部署 持续集成_jar_03

image.png

fuser -k 8010/tcp
cd /usr/local/cms
nohup java -jar cms-0.0.1-SNAPSHOT.jar &


Jenkins 自动化部署 持续集成_jar_04

image.png

举报

相关推荐

0 条评论