Created
August 24, 2020 02:57
-
-
Save koy1619/294d1658665a538a94b4c21d2a11898d to your computer and use it in GitHub Desktop.
jenkins deploy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export JAVA_HOME=/usr/local/jdk1.8.0_111 | |
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar | |
export PATH=$JAVA_HOME/bin:$PATH | |
JENKINS_ROOT=/app/jenkins | |
export JENKINS_HOME=$JENKINS_ROOT/jenkins_home | |
cd $JENKINS_ROOT | |
PIDS=`ps -ef|grep -w "jenkins.war"|grep -v grep|awk '{print $2}'` | |
echo "stop jenkins....." | |
kill -9 $PIDS && sleep 5 | |
echo "start jenkins....." | |
nohup java \ | |
-Dhudson.util.ProcessTree.disable=true \ | |
-Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION=true \ | |
-Xms2048m -Xmx2048m \ | |
-XX:PermSize=1024M \ | |
-XX:PermSize=1024M \ | |
-jar $JENKINS_ROOT/jenkins.war \ | |
--httpPort=8000 \ | |
> jenkins.log 2>&1 & | |
####Plugins#### | |
#Role-based Authorization Strategy | |
#Git plugin | |
#Subversion Plug-in | |
#Multiple SCMs plugin | |
#Publish Over SSH | |
#SonarQube Scanner for Jenkins | |
#ThinBackup | |
#Pipeline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment