forked from portworx/torpedo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (40 loc) · 1.5 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: focal
services:
- docker
language: go
go:
- 1.19.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}/torpedo:${DOCKER_HUB_TAG}" "${DOCKER_HUB_REPO}/torpedo:${TRAVIS_BRANCH}";
sudo docker push "${DOCKER_HUB_REPO}/torpedo:${DOCKER_HUB_TAG}";
sudo docker push "${DOCKER_HUB_REPO}/torpedo:${TRAVIS_BRANCH}";
make container-pds;
sudo docker tag "${DOCKER_HUB_REPO}/torpedo-pds:${DOCKER_HUB_TAG}" "${DOCKER_HUB_REPO}/torpedo-pds:${TRAVIS_BRANCH}";
sudo docker push "${DOCKER_HUB_REPO}/torpedo-pds:${DOCKER_HUB_TAG}";
sudo docker push "${DOCKER_HUB_REPO}/torpedo-pds:${TRAVIS_BRANCH}";
make container-backup;
sudo docker tag "${DOCKER_HUB_REPO}/torpedo-backup:${DOCKER_HUB_TAG}" "${DOCKER_HUB_REPO}/torpedo-backup:${TRAVIS_BRANCH}";
sudo docker push "${DOCKER_HUB_REPO}/torpedo-backup:${DOCKER_HUB_TAG}";
sudo docker push "${DOCKER_HUB_REPO}/torpedo-backup:${TRAVIS_BRANCH}";
fi
notifications:
email:
recipients:
on_success: change
on_failure: always