-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
38 lines (31 loc) · 1.28 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
sudo: required
language: bash
dist: bionic
services:
- docker
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- ./scripts/travisDockerSetup.sh
install:
- docker pull multiarch/qemu-user-static
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker run -d -p 5000:5000 --restart always --name localReg registry:2
- docker ps -a
script:
- make build BRANCH=$TRAVIS_BRANCH GIT_COMMIT=$(git rev-parse --short $TRAVIS_COMMIT) GITHUB_TOKEN=$GITHUB_TOKEN
- make test_all BRANCH=$TRAVIS_BRANCH
after_script: docker images
before_deploy:
- echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
deploy:
- provider: script
script: make build_push BRANCH=$TRAVIS_BRANCH GIT_COMMIT=$(git rev-parse --short $TRAVIS_COMMIT) GITHUB_TOKEN=$GITHUB_TOKEN
on:
branch: master
- provider: script
script: make build_push BRANCH=$TRAVIS_BRANCH TAG_LATEST=1 GIT_COMMIT=$(git rev-parse --short $TRAVIS_COMMIT) GITHUB_TOKEN=$GITHUB_TOKEN
on:
tags: true