forked from portworx/torpedo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
32 lines (32 loc) · 1003 Bytes
/
.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
sudo: required
dist: focal
services:
- docker
language: go
go:
- 1.16.x
cache:
directories:
- $GOPATH/pkg/mod
before_install:
- sudo apt-get update -yq
- sudo apt-get install apt-transport-https ca-certificates -y
- sudo update-ca-certificates
script:
- make all
after_success:
- if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
echo "${DOCKER_PASS}" | docker login -u="${DOCKER_USER}" --password-stdin;
make container;
sudo docker tag "${DOCKER_HUB_REPO}/${DOCKER_HUB_TORPEDO_IMAGE}:${DOCKER_HUB_TAG}" "${DOCKER_HUB_REPO}/${DOCKER_HUB_TORPEDO_IMAGE}:${TRAVIS_BRANCH}";
sudo docker push "${DOCKER_HUB_REPO}/${DOCKER_HUB_TORPEDO_IMAGE}:${DOCKER_HUB_TAG}";
sudo docker push "${DOCKER_HUB_REPO}/${DOCKER_HUB_TORPEDO_IMAGE}:${TRAVIS_BRANCH}";
fi
notifications:
email:
recipients:
on_success: change
on_failure: always