Merge pull request #100 from mumoshu/redo-release-automation

Redo release automation via CircleCI
This commit is contained in:
KUOKA Yusuke 2018-04-09 21:45:36 +09:00 committed by GitHub
commit 69c3e5513a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 11 deletions

View File

@ -73,13 +73,19 @@ jobs:
make integration
# GITHUB_TOKEN env var must be setup in circleci console
deployment:
release:
tag: /v.*/
commands:
- docker login -e="." -u="$DOCKER_USER" -p="$DOCKER_PASS" quay.io
- cd "$WORK" && make tools
- cd "$WORK" && BUILD_URL="$CIRCLE_BUILD_URL" make push release
docker:
- image: circleci/golang:1.7
working_directory: /go/src/github.com/roboll/helmfile
steps:
- checkout
- setup_remote_docker
- run:
command: |
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS" quay.io
make tools
BUILD_URL="$CIRCLE_BUILD_URL" make push release
workflows:
version: 2
@ -94,4 +100,10 @@ workflows:
branches:
only:
- master
- /pull.*/
- /pull.*/
- release:
filters:
branches:
ignore: /.*/
tags:
only: /v.*/

View File

@ -1,4 +1,4 @@
ORG := $(shell basename $(realpath ..))
ORG ?= $(shell basename $(realpath ..))
PKGS := $(shell go list ./... | grep -v /vendor/)
build:
@ -42,13 +42,13 @@ release: pristine cross
.PHONY: release
image: cross
docker build -t quay.io/roboll/helmfile:${TAG} .
docker build -t quay.io/${ORG}/helmfile:${TAG} .
run: image
docker run --rm -it -t quay.io/roboll/helmfile:${TAG} sh
docker run --rm -it -t quay.io/${ORG}/helmfile:${TAG} sh
push: image
docker push quay.io/roboll/helmfile:${TAG}
docker push quay.io/${ORG}/helmfile:${TAG}
tools:
go get -u github.com/tcnksm/ghr github.com/mitchellh/gox