9 jenkins - nhorizons application

Posted bloodthirsty

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了9 jenkins - nhorizons application相关的知识,希望对你有一定的参考价值。

1 General

技术图片

2 源码管理(Gitee)

技术图片

Refspec:

  +refs/heads/*:refs/remotes/origin/* +refs/pull/*/MERGE:refs/pull/*/MERGE

3 Build

技术图片

4 执行shell

技术图片
#!/bin/bash
echo "start execute shell"

cd $WORKSPACE/nhorizons-application
mvn clean install

cd $WORKSPACE/nhorizons-application/nhorizons-webapp-base
mvn clean install

cd $WORKSPACE/nhorizons-application/$appName
mvn clean package -Ptest
cp /nhorizons/application/bin/restartpts.sh $WORKSPACE/nhorizons-application/$appName/
chmod u+x restartpts.sh
./restartpts.sh
View Code

贴出里面的./restartpts.sh

技术图片
#!/bin/sh
pid=`ps aux | grep protostar | grep -v grep | awk print $2`
if [ "$pid" != "" ]
then
   echo "will kill pts ,pid is $pid"
  `kill -9 $pid`
fi
echo "start run pts..."
nohup mvn clean tomcat7:run  >> /nhorizons/application/logs/pts.log &
echo "logFile:/nhorizons/application/logs/pts.log"
View Code

 

以上是关于9 jenkins - nhorizons application的主要内容,如果未能解决你的问题,请参考以下文章

Jenkins + nodejs编译打包nodejs应用

docker安装Jenkins

docker安装Jenkins

任务 ':app:mergeDebugResources' 的 Jenkins 执行失败,找不到文件

jenkins + gradle ,卡在 app:processReleaseAGCPlugin

为多应用程序 android 项目设置 Jenkins