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环境 services: # docker环境
- docker - docker
branches: # 限定项目分支 # branches: # 限定项目分支
only: # only:
- master # - master
before_install: before_install:
- curl https://glide.sh/get | sh # 安装glide包管理 - curl https://glide.sh/get | sh # 安装glide包管理
@@ -22,6 +22,12 @@ script:
- GOOS=linux GOARCH=amd64 go build # 编译版本 - GOOS=linux GOARCH=amd64 go build # 编译版本
- docker build -t registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog . # 构建镜像 - 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: before_deploy:
- ./dist.sh - ./dist.sh
@@ -36,9 +42,3 @@ deploy:
tags: true tags: true
repo: eiblog/eiblog repo: eiblog/eiblog
all_branches: true 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