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 make integration
# GITHUB_TOKEN env var must be setup in circleci console # GITHUB_TOKEN env var must be setup in circleci console
deployment:
release: release:
tag: /v.*/ docker:
commands: - image: circleci/golang:1.7
- docker login -e="." -u="$DOCKER_USER" -p="$DOCKER_PASS" quay.io working_directory: /go/src/github.com/roboll/helmfile
- cd "$WORK" && make tools steps:
- cd "$WORK" && BUILD_URL="$CIRCLE_BUILD_URL" make push release - 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: workflows:
version: 2 version: 2
@ -95,3 +101,9 @@ workflows:
only: only:
- master - 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/) PKGS := $(shell go list ./... | grep -v /vendor/)
build: build:
@ -42,13 +42,13 @@ release: pristine cross
.PHONY: release .PHONY: release
image: cross image: cross
docker build -t quay.io/roboll/helmfile:${TAG} . docker build -t quay.io/${ORG}/helmfile:${TAG} .
run: image 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 push: image
docker push quay.io/roboll/helmfile:${TAG} docker push quay.io/${ORG}/helmfile:${TAG}
tools: tools:
go get -u github.com/tcnksm/ghr github.com/mitchellh/gox go get -u github.com/tcnksm/ghr github.com/mitchellh/gox