提交 d75fce59 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 部署微服务接口

上级 fd116006
......@@ -38,12 +38,10 @@
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/
mvn clean package -Papi
echo 'echo "$para1"' > apppasswd.sh
chmod -R 777 *
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' ssh 172.16.180.237@172.16.180.237 "mkdir -p /6FA57A4B-AA77-4DA7-A2C6-E283F7285664"
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' scp -r ibzou-provider-api.jar 172.16.180.237@172.16.180.237:/6FA57A4B-AA77-4DA7-A2C6-E283F7285664
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' ssh 172.16.180.237@172.16.180.237 "ps -ef | grep '/6FA57A4B-AA77-4DA7-A2C6-E283F7285664'| tr -s ' '|cut -d' ' -f2,8,9 | grep -v grep | grep 'jar' | cut -d' ' -f1|xargs --no-run-if-empty kill -9"
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' ssh 172.16.180.237@172.16.180.237 "source /etc/profile;source ~/.bash_profile; nohup java -jar -Xms512m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=128m /6FA57A4B-AA77-4DA7-A2C6-E283F7285664/ibzou-provider-api.jar >>/6FA57A4B-AA77-4DA7-A2C6-E283F7285664/ibzou_apiibzou-`date --date='0 days ago' +%Y-%m-%d`.log 2>&1 &"
cd ibzou-provider/ibzou-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -21,6 +21,9 @@
</dependency>
</dependencies>
<properties>
<docker.image.prefix>registry.cn-shanghai.aliyuncs.com/ibizsys</docker.image.prefix>
</properties>
<profiles>
......@@ -95,6 +98,23 @@
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<serverId>ibiz-dev</serverId>
<imageName>${docker.image.prefix}/${project.artifactId}:latest</imageName>
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>../../</directory>
<include>${project.artifactId}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
......
......@@ -21,6 +21,9 @@
</dependency>
</dependencies>
<properties>
<docker.image.prefix>registry.cn-shanghai.aliyuncs.com/ibizsys</docker.image.prefix>
</properties>
<profiles>
<profile>
......@@ -54,6 +57,23 @@
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<serverId>ibiz-dev</serverId>
<imageName>${docker.image.prefix}/${project.artifactId}:latest</imageName>
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>../../</directory>
<include>${project.artifactId}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册