Pull images before running CI
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
2118f6992a
commit
ade223cf2e
3 changed files with 8 additions and 39 deletions
|
@ -23,12 +23,11 @@ before_install:
|
||||||
install:
|
install:
|
||||||
- docker version
|
- docker version
|
||||||
- pip install --user -r requirements.txt
|
- pip install --user -r requirements.txt
|
||||||
|
- make pull-images
|
||||||
before_script:
|
before_script:
|
||||||
- make validate
|
- make validate
|
||||||
- make binary
|
- make binary
|
||||||
script:
|
script: travis_retry make test-unit && travis_retry make test-integration
|
||||||
- travis_retry make test-unit
|
|
||||||
- travis_retry make test-integration
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- docker ps
|
- docker ps
|
||||||
before_deploy:
|
before_deploy:
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -82,5 +82,11 @@ lint:
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
gofmt -s -l -w $(SRCS)
|
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
|
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)
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
||||||
|
|
36
circle.yml
36
circle.yml
|
@ -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}
|
|
Loading…
Reference in a new issue