Merge pull request #100 from mumoshu/redo-release-automation
Redo release automation via CircleCI
This commit is contained in:
		
						commit
						69c3e5513a
					
				|  | @ -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 | ||||
|  | @ -95,3 +101,9 @@ workflows: | |||
|               only: | ||||
|                 - master | ||||
|                 - /pull.*/ | ||||
|       - release: | ||||
|           filters: | ||||
|             branches: | ||||
|               ignore: /.*/ | ||||
|             tags: | ||||
|               only: /v.*/ | ||||
|  |  | |||
							
								
								
									
										8
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										8
									
								
								Makefile
								
								
								
								
							|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue