mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-04 13:52:26 +08:00
update .travis.yml
This commit is contained in:
16
.travis.yml
16
.travis.yml
@@ -1,36 +1,30 @@
|
|||||||
sudo: required # 超级权限
|
sudo: required # 超级权限
|
||||||
|
|
||||||
dist: trusty # 在ubuntu:trusty
|
dist: trusty # 在ubuntu:trusty
|
||||||
|
|
||||||
language: go # 声明构建语言环境
|
language: go # 声明构建语言环境
|
||||||
|
|
||||||
go: # 只构建最新版本
|
go: # 只构建最新版本
|
||||||
- tip
|
- tip
|
||||||
|
services: # docker环境
|
||||||
services: # docker环境
|
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
branches: # 限定项目分支
|
branches: # 限定项目分支
|
||||||
only:
|
only:
|
||||||
- /^v[0-9](\.[0-9]){2}(-rc[1-9])?$/
|
- /^v[0-9](\.[0-9]){2}(-rc[1-9])?$/
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- curl https://glide.sh/get | sh # 安装glide包管理
|
- curl https://glide.sh/get | sh # 安装glide包管理
|
||||||
script:
|
script:
|
||||||
- glide up
|
- glide up
|
||||||
- GOOS=linux GOARCH=amd64 go build # 编译版本
|
- GOOS=linux GOARCH=amd64 go build # 编译版本
|
||||||
- docker build -t registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog:$TRAVIS_TAG . # 构建镜像
|
- 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
|
||||||
|
- docker tag registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog \
|
||||||
|
registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog:$TRAVIS_TAG
|
||||||
- docker push registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog:$TRAVIS_TAG
|
- docker push registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog:$TRAVIS_TAG
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- ./dist.sh
|
- ./dist.sh
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key:
|
api_key:
|
||||||
|
|||||||
Reference in New Issue
Block a user