diff --git a/.travis.yml b/.travis.yml index 9c0d13a48..f8fc3063e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,12 +23,11 @@ before_install: install: - docker version - pip install --user -r requirements.txt + - make pull-images before_script: - make validate - make binary -script: - - travis_retry make test-unit - - travis_retry make test-integration +script: travis_retry make test-unit && travis_retry make test-integration after_failure: - docker ps before_deploy: diff --git a/Makefile b/Makefile index b9c3dcad8..759ab3e1f 100644 --- a/Makefile +++ b/Makefile @@ -82,5 +82,11 @@ lint: fmt: gofmt -s -l -w $(SRCS) + +pull-images: + for f in $(shell find ./integration/resources/compose/ -type f); do \ + docker-compose -f $$f pull; \ + done + help: ## this help @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) diff --git a/circle.yml b/circle.yml deleted file mode 100644 index f58cb4992..000000000 --- a/circle.yml +++ /dev/null @@ -1,36 +0,0 @@ -machine: - pre: - - sudo docker -d -e lxc -s btrfs -H tcp://0.0.0.0:2375: - background: true - - curl --retry 15 --retry-delay 3 -v http://172.17.42.1:2375/version - environment: - REPO: $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME - DOCKER_HOST: tcp://172.17.42.1:2375 - MAKE_DOCKER_HOST: $DOCKER_HOST - VERSION: v1.0.alpha.$CIRCLE_BUILD_NUM - -dependencies: - pre: - - docker version - - go get github.com/tcnksm/ghr - - make validate - override: - - make binary - -test: - override: - - make test-unit - - make test-integration - post: - - make crossbinary - - make image - -deployment: - hub: - branch: master - commands: - - ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --prerelease ${VERSION} dist/ - - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - - docker push ${REPO,,}:latest - - docker tag ${REPO,,}:latest ${REPO,,}:${VERSION} - - docker push ${REPO,,}:${VERSION}