1 Star 0 Fork 4

zzq / helloworld

forked from 梅孝亮 / helloworld 
Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

helloworld

jenkins 脚本

# 保留进程,这个配置参考:https://www.jianshu.com/p/f67d8e0f8092
BUILD_ID=dontKillMe

# 端口、项目构建后目录、项目构建后名称
PORT=10001
SERVICE_DIR=/root/.jenkins/workspace
SERVICE_NAME=helloworld-0.0.1-SNAPSHOT.jar

# 每次进程启动前,查询该进程是否已启动。若启动,则干掉
TEMP_PID=`ps -ef | grep -w "$SERVICE_NAME" | grep  "java" | awk '{print $2}'`
if [ "$TEMP_PID" != "" ]; then
   kill -9 $TEMP_PID
fi

# 跳转到构建后目录,指定端口启动 jar 包
cd $SERVICE_DIR
nohup java -jar $SERVICE_NAME --server.port=$PORT &

Comments ( 0 )

Sign in for post a comment

About

springboot helloworld spread retract
Java
MIT
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
Java
1
https://git.oschina.net/aaa7864548/helloworld.git
git@git.oschina.net:aaa7864548/helloworld.git
aaa7864548
helloworld
helloworld
master

Search