forked from stefanprodan/podinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis.lite.yml
33 lines (25 loc) · 823 Bytes
/
travis.lite.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
sudo: required
language: go
go:
- 1.11.x
services:
- docker
addons:
apt:
packages:
- docker-ce
script:
- make test
after_success:
- if [ -z "$QUAY_USER" ]; then
echo "PR build, skipping Quay push";
else
echo $QUAY_PASS | docker login -u $QUAY_USER --password-stdin quay.io;
DOCKER_TAG=${TRAVIS_BRANCH}-$(echo ${TRAVIS_COMMIT} | head -c7);
docker build -t quay.io/${QUAY_REPOSITORY}:${DOCKER_TAG} -f Dockerfile.ci . ;
echo "Pushing to quay.io/${QUAY_REPOSITORY}:${DOCKER_TAG}";
docker push quay.io/${QUAY_REPOSITORY}:${DOCKER_TAG};
echo "Pushing to quay.io/${QUAY_REPOSITORY}:${TRAVIS_BRANCH}";
docker tag quay.io/${QUAY_REPOSITORY}:${DOCKER_TAG} quay.io/${QUAY_REPOSITORY}:${TRAVIS_BRANCH};
docker push quay.io/${QUAY_REPOSITORY}:${TRAVIS_BRANCH};
fi