forked from libopenstorage/stork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (40 loc) · 1.42 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
38
39
40
sudo: required
dist: xenial
language: go
go:
- 1.15.x
before_install:
- sudo apt-get update -yq
- sudo apt-get install go-md2man -y
- sudo apt-get install -y awscli
cache:
directories:
- $HOME/.cache/go-build
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 -j 2 && 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/master/linux/;
aws s3 cp --acl public-read bin/windows/storkctl.exe s3://${BUCKET_NAME}/storkctl/master/windows/;
aws s3 cp --acl public-read bin/darwin/storkctl s3://${BUCKET_NAME}/storkctl/master/darwin/;
fi
notifications:
email:
on_success: always
on_failure: always
after_success:
- bash <(curl -s https://codecov.io/bash)