Skip to content

Commit

Permalink
fix: testing circle changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dara Hayes committed Feb 26, 2018
1 parent 58bd760 commit 69c384a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
50 changes: 30 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,54 @@
version: 2
jobs:
build:
working_directory: /go/src/github.com/aerogear/aerogear-app-metrics

docker:
- image: circleci/golang:1.9

- image: registry.access.redhat.com/rhscl/postgresql-96-rhel7:latest
ports:
- 5432:5432
environment:
POSTGRESQL_PASSWORD: postgres
POSTGRESQL_USER: postgresql
POSTGRESQL_DATABASE: aerogear_mobile_metrics
#### TEMPLATE_NOTE: go expects specific checkout path representing url
#### expecting it in the form of
#### /go/src/github.com/circleci/go-tool
#### /go/src/bitbucket.org/circleci/go-tool
working_directory: /go/src/github.com/aerogear/aerogear-app-metrics

steps:
- checkout
- run: go get github.com/mattn/goveralls
- run: go get -u github.com/golang/dep/cmd/dep
- checkout
- run: dep ensure
- run: make build
- run: make test-integration-cover
- run: /go/bin/goveralls -coverprofile=coverage-all.out -service=circle-ci -repotoken=$COVERALLS_TOKEN
release:
filters:
# execute only on semver-style tags (vX.X.X)
tags:
only: /^v\d\.\d\.\d/
branches:
# needs to explicitly ignore all branches else gets run every time
ignore: /.*/

docker_release:
working_directory: /go/src/github.com/aerogear/aerogear-app-metrics
docker:
- image: circleci/golang:1.9
working_directory: /go/src/github.com/aerogear/aerogear-app-metrics
steps:
- run: go get github.com/goreleaser/goreleaser
- checkout
- run: make release
- run: go get -u github.com/golang/dep/cmd/dep
- run: make setup
- run: curl -sL https://raw.githubusercontent.com/goreleaser/get/master/get | bash
- setup_remote_docker
- run: make docker_build_release
- run: make docker_push_release
- store_artifacts:
path: dist
path: dist

workflows:
version: 2
build_and_push:
jobs:
- build:
filters:
tags:
only: /.*/
- docker_release:
requires:
- build
filters:
tags:
only: /\d\.\d\.\d/
branches:
ignore: /.*/
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ release: setup

.PHONY: docker_push_release
docker_push_release:
docker login -u $(DOCKERHUB_USERNAME) -p $(DOCKERHUB_PASSWORD)
@docker login --username $(DOCKERHUB_USERNAME) --password $(DOCKERHUB_PASSWORD)
docker push $(DOCKER_LATEST_TAG)
docker push $(DOCKER_RELEASE_TAG)

Expand Down

0 comments on commit 69c384a

Please sign in to comment.