1 Star 0 Fork 3

梅孝亮 / helloworld

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
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=/var/jenkins_home/workspace/helloworld/target
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 &

About

springboot helloworld expand collapse
Java
Cancel

Releases

No release

Contributors

All

Activities

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

Search