Commit 40f4cd38 authored by jinkaiqiang's avatar jinkaiqiang

脚本修改,支持java maven缓存

parent 4a4bbe39
......@@ -54,6 +54,18 @@ if [ -z "$cmd" ]; then
elif [ "$cmd" == "build" ]; then
echo "build..."
build_docker_image
elif [ "$cmd" == "build_java" ]; then
echo "build java..."
# 利用maven镜像打包程序
echo "清理compile目录"
rm -rf /compile/* && rm -rf /compile/.*
echo "复制文件到打包目录/compile"
cp -rf . /compile
echo "开始打包"
docker run -i --rm --name maven_build -v /compile:/usr/src/app -v /huansi/maven/repository:/usr/share/maven/ref -w /usr/src/app 47.110.145.204:8084/huansi/maven:3-jdk-$JDK_VERSION mvn clean package || exit 1
echo "复制打包文件到当前目录下"
cp -rf /compile/target .
build_docker_image
elif [ "$cmd" == "push" ]; then
echo "push..."
foramt_image_version
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment