#!/bin/bash cd /home/reghao/code/java/bnt commit_id=`git rev-parse HEAD | cut -c 1-8` #docker_prefix='docker.reghao.cn/tnb' docker_prefix='registry.cn-chengdu.aliyuncs.com/reghao/bntweb' mvn clean package -Dmaven.test.skip=true -am -pl web cd /home/reghao/code/java/bnt/web docker build -t ${docker_prefix}:${commit_id} . docker push ${docker_prefix}:${commit_id}