update .travis.yml

This commit is contained in:
deepzz0
2017-01-09 23:28:21 +08:00
parent 9ec5d55871
commit c39844ca63

View File

@@ -10,9 +10,9 @@ go: # 只构建最新版本
services: # docker环境 services: # docker环境
- docker - docker
# branches: # 限定项目分支 branches: # 限定项目分支
# only: only:
# - master - /^v[0-9](\.[0-9]){2}(-rc[1-9])?$/
before_install: before_install:
- curl https://glide.sh/get | sh # 安装glide包管理 - curl https://glide.sh/get | sh # 安装glide包管理
@@ -23,10 +23,11 @@ script:
- docker build -t registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog . # 构建镜像 - docker build -t registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog . # 构建镜像
after_success: after_success:
- if [ "$TRAVIS_BRANCH" =~ ^v[0-9](\.[0-9])+.*$ ]; then # - if [ "$TRAVIS_BRANCH" =~ ^v[0-9](\.[0-9])+.*$ ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" registry.cn-hangzhou.aliyuncs.com; # docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" registry.cn-hangzhou.aliyuncs.com;
docker push registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog; # docker push registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog;
fi # fi
- docker push registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog
before_deploy: before_deploy:
- ./dist.sh - ./dist.sh