jimtse
网站页面
mkdir ~/develop/env/jenkins_home
sudo chown -R tse:staff ~/develop/env/jenkins_home
docker run -d --name jenkins -p 8080:8080 -p 50000:50000 -v /Users/tse/develop/env/jenkins_home:/var/jenkins_home jenkins/jenkins
cat ~/develop/env/jenkins_home/secrets/initialAdminPassword
Jenkins 启动成功之后,接下来我们安装三个必要的插件:
docker cp /Users/tse/develop/env/maven-3.9.1 jenkins:/opt/
sh /目录/deploy.sh
export JAVA_HOME=/opt/java
export PATH=$JAVA_HOME/bin:$PATH
JAR_PATH=/root/data
JARFILE=*-0.0.1-SNAPSHOT.jar
ps -ef | grep $JARFILE | grep -v grep | awk '{print $2}' | xargs kill -9
java -jar $JAR_PATH/$JARFILE > out.log &
if [ $? = 0 ];then
sleep 30
tail -n 50 out.log
fi
Enjoy IT!