diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2d65eb3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,34 @@ +sudo: required + +language: go +go: + - 1.9 + +services: + - docker + +stages: + - test + - publish + +before_install: + - go get -u github.com/golang/dep/cmd/dep + +jobs: + include: + - stage: test + script: + - dep ensure + - go test ./... + - stage: publish + script: + - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" + - dep ensure + - > + env GOOS=linux + go build + -o release/chrly + -ldflags "-X github.com/elyby/chrly/bootstrap.version=latest" + main.go + - docker build -t elyby/chrly . + - docker push elyby/chrly