forked from ggriffiths/stork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (37 loc) · 1.38 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
sudo: required
dist: trusty
language: go
go:
- 1.11.2
before_install:
- sudo apt-get update -yq
- sudo apt-get install go-md2man -y
- sudo apt-get install -y awscli
script:
- |
if [ "${TRAVIS_BRANCH}" == "master" ]; then
export DOCKER_HUB_STORK_TAG=master
export DOCKER_HUB_STORK_TEST_TAG=latest
export DOCKER_HUB_CMD_EXECUTOR_TAG=master
else
export DOCKER_HUB_STORK_TAG=`git rev-parse --short HEAD`
export DOCKER_HUB_STORK_TEST_TAG=`git rev-parse --short HEAD`
export DOCKER_HUB_CMD_EXECUTOR_TAG=`git rev-parse --short HEAD`
fi
make && make pretest && make test && make container && make integration-test && make integration-test-container &&
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
docker login -u "${DOCKER_USER}" -p "${DOCKER_PASSWORD}";
make deploy;
make integration-test-deploy;
fi &&
if [ "${TRAVIS_PULL_REQUEST}" == "false" ] && [ "${TRAVIS_BRANCH}" == "master" ]; then
aws s3 cp --acl public-read bin/linux/storkctl s3://${BUCKET_NAME}/storkctl/latest/linux/;
aws s3 cp --acl public-read bin/windows/storkctl.exe s3://${BUCKET_NAME}/storkctl/latest/windows/;
aws s3 cp --acl public-read bin/darwin/storkctl s3://${BUCKET_NAME}/storkctl/latest/darwin/;
fi
notifications:
email:
on_success: always
on_failure: always
after_success:
- bash <(curl -s https://codecov.io/bash)