2018-11-19 10:39:56 +00:00
|
|
|
language: go
|
|
|
|
go:
|
2020-08-28 01:12:14 +00:00
|
|
|
- "1.14.7"
|
2016-07-14 21:17:27 +00:00
|
|
|
|
2018-08-30 12:43:15 +00:00
|
|
|
env:
|
2019-06-24 08:02:49 +00:00
|
|
|
global:
|
|
|
|
# Sanitize git branch name into a valid docker tag name
|
|
|
|
- IMAGE_TAG_NAME=$(echo -n $TRAVIS_BRANCH | tr -c "[a-zA-Z0-9._'" "_")
|
2018-11-19 10:39:56 +00:00
|
|
|
- GO111MODULE=on
|
2018-08-30 12:43:15 +00:00
|
|
|
|
2016-07-14 21:17:27 +00:00
|
|
|
services:
|
2019-06-24 08:02:49 +00:00
|
|
|
- docker
|
2016-07-14 21:17:27 +00:00
|
|
|
|
|
|
|
script:
|
2020-08-10 17:44:11 +00:00
|
|
|
- scripts/test-infra/verify.sh
|
|
|
|
- scripts/test-infra/build-image.sh
|
2018-11-19 10:39:56 +00:00
|
|
|
- if [ "$TRAVIS_BRANCH" == master -a -n "$IMAGE_REPO_USER" ]; then
|
|
|
|
set -e;
|
|
|
|
echo "$IMAGE_REPO_PASSWORD" | docker login -u "$IMAGE_REPO_USER" --password-stdin quay.io;
|
|
|
|
make push -e;
|
2020-08-20 16:03:26 +00:00
|
|
|
scripts/test-infra/test-e2e.sh;
|
2018-11-19 10:39:56 +00:00
|
|
|
fi
|
2018-08-30 12:43:15 +00:00
|
|
|
|
|
|
|
deploy:
|
2019-06-24 03:49:08 +00:00
|
|
|
- on:
|
2019-06-24 08:02:49 +00:00
|
|
|
branch: master
|
|
|
|
condition: -n "$IMAGE_REPO_USER"
|
2018-08-30 12:43:15 +00:00
|
|
|
provider: script
|
|
|
|
script: echo "$IMAGE_REPO_PASSWORD" | docker login -u "$IMAGE_REPO_USER" --password-stdin quay.io && make push -e
|
2019-06-24 03:49:08 +00:00
|
|
|
- on:
|
|
|
|
tags: true
|
|
|
|
condition: -n "$IMAGE_REPO_USER"
|
|
|
|
provider: script
|
|
|
|
script: echo "$IMAGE_REPO_PASSWORD" | docker login -u "$IMAGE_REPO_USER" --password-stdin quay.io && make push -e
|