-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
28 lines (25 loc) · 913 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
sudo: required
language: bash
services: docker
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
env:
global:
- VERSION=alpine IMAGE=vmaf BASEOS_VER=alpine:3.7 APP_VER=0.6.2 BUILD_ARG=vmaf:0.6.2-alpine:3.7
jobs:
include:
- stage: build, test and deploy image
script:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- ./build-arg.sh $DOCKER_USERNAME $BUILD_ARG
- docker images
- docker run $DOCKER_USERNAME/$IMAGE
- docker tag $DOCKER_USERNAME/$IMAGE:latest $DOCKER_USERNAME/$IMAGE:$APP_VER
- ./unit-test-media.sh
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push $DOCKER_USERNAME/$IMAGE:latest;
docker push $DOCKER_USERNAME/$IMAGE:$APP_VER;
fi