This commit is contained in:
deepzz0
2016-12-25 02:15:53 +08:00
parent b5e65051e4
commit af65e3c192

View File

@@ -10,9 +10,9 @@ go: # 只构建最新版本
services: # docker环境
- docker
branches: # 限定项目分支
only:
- master
# branches: # 限定项目分支
# only:
# - master
before_install:
- curl https://glide.sh/get | sh # 安装glide包管理
@@ -22,6 +22,12 @@ script:
- GOOS=linux GOARCH=amd64 go build # 编译版本
- docker build -t registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog . # 构建镜像
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" registry.cn-hangzhou.aliyuncs.com;
docker push registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog;
fi
before_deploy:
- ./dist.sh
@@ -36,9 +42,3 @@ deploy:
tags: true
repo: eiblog/eiblog
all_branches: true
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" registry.cn-hangzhou.aliyuncs.com;
docker push registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog;
fi