The installation

Download the WAR package from the official website and throw it into Tomcat webApp. Start Tomcat

Configuration Gradle

Push | merge automatically build

Configuring triggers

Add WebHook Gitlab

Automatically kills the last process and starts the new JAR

Kill the last process

#! /bin/sh

tomcat_id=`ps -ef | grep sso | grep -v "grep" | awk '{print $2}'`
echo $tomcat_id

for id in $tomcat_id
do
    kill9 -$id  
    echo "killed $id"  
done
Copy the code

Start a new process

BUILD_ID=dontKillMe nohup java -jar / root /. Jenkins/workspace/if pension platform/default/pension - sso/build/libs/pension - sso - 0.0.1 - the SNAPSHOT. The jarCopy the code
BUILD_ID=dontKillMe
nohup java -agentpath:/root/jrebel/lib/libjrebel64.so  -Drebel.remoting_port=18303  -Drebel.remoting_plugin=true  -Xms256m -Xmx256m  -Xdebug -Xrunjdwp:transport=dt_socket,address=18302,server=y,suspend= n - jar/root /. Jenkins/workspace/if pension platform/default/pension - sso/build/libs/pension - sso - 0.0.1 - the SNAPSHOT. Jar > /opt/logs/sso/dev.log 2>&1 &Copy the code

Idea Configuration Visualization

Jenkins add Token

/ Jenkins/user/user/configure

The Token generated by the copy is the access password

Enabling proxy compatibility

Get Crumb

crumbIssuer/api/xml? tree=crumb#

The configuration idea

By yong-sheng zhu