-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (79 loc) · 3.07 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# docker-proxygen .travis.yml
#
# Builds docker-proxygen images on Travis CI
#
# https://travis-ci.org/neomantra/docker-proxygen
#
# Master will build with Docker tag:
# neomantra/proxygen:latest
# neomantra/proxygen:latest-oo<onload-version>
#
# Releases should be tagged in git as:
# neomantra/proxygen:<tag-version>
# neomantra/proxygen:<tag-version>-oo<onload-version>
#
# Travis Environment Variables:
# DOCKER_ORG
# DOCKER_USERNAME
# DOCKER_PASSWORD
#
language: bash
sudo: required
services:
- docker
matrix:
include:
- env:
- PROXYGEN_BUILD_FROM=neomantra/onload:7.0.0.176-cosmic-nozf
- IMAGE_TAG_SUFFIX=-oo7.0.0.176-cosmic
- env:
- PROXYGEN_BUILD_FROM=neomantra/onload:7.0.0.176-disco-nozf
- IMAGE_TAG_SUFFIX=-oo7.0.0.176-disco
- env:
- PROXYGEN_BUILD_FROM=neomantra/onloadzf:7.0.0.176-cosmic
- IMAGE_TAG_SUFFIX=-oozf7.0.0.176-cosmic
- env:
- PROXYGEN_BUILD_FROM=neomantra/onloadzf:7.0.0.176-disco
- IMAGE_TAG_SUFFIX=-oozf7.0.0.176-disco
- env:
- PROXYGEN_BUILD_FROM=neomantra/onload:201811-cosmic-nozf
- IMAGE_TAG_SUFFIX=-oo201811-cosmic
- env:
- PROXYGEN_BUILD_FROM=neomantra/onload:201811-u1-cosmic-nozf
- IMAGE_TAG_SUFFIX=-oo201811-u1-cosmic
- env:
- PROXYGEN_BUILD_FROM=neomantra/onload:201811-u1-disco-nozf
- IMAGE_TAG_SUFFIX=-oo201811-u1-disco
- env:
- PROXYGEN_BUILD_FROM=neomantra/onloadzf:201811-cosmic
- IMAGE_TAG_SUFFIX=-oozf201811-cosmic
- env:
- PROXYGEN_BUILD_FROM=neomantra/onloadzf:201811-u1-cosmic
- IMAGE_TAG_SUFFIX=-oozf201811-u1-cosmic
- env:
- PROXYGEN_BUILD_FROM=neomantra/onloadzf:201811-u1-disco
- IMAGE_TAG_SUFFIX=-oozf201811-u1-disco
- env:
- PROXYGEN_BUILD_FROM=ubuntu:cosmic
- IMAGE_TAG_SUFFIX=-cosmic
- env:
- PROXYGEN_BUILD_FROM=ubuntu:disco
- IMAGE_TAG_SUFFIX=-disco
script:
- MASTER_PUSH_DEST="$DOCKER_ORG/proxygen:latest$IMAGE_TAG_SUFFIX" ;
if [ "$TRAVIS_BRANCH" = "master" ] ; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
docker pull $MASTER_PUSH_DEST ;
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
docker build -t $MASTER_PUSH_DEST --cache-from $MASTER_PUSH_DEST --build-arg J_LEVEL=2 --build-arg PROXYGEN_BUILD_FROM=${PROXYGEN_BUILD_FROM} . ;
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
docker push $MASTER_PUSH_DEST ;
elif [ "$TRAVIS_BRANCH" = "$TRAVIS_TAG" ] ; then
TAG_PUSH_DEST="$DOCKER_ORG/proxygen:$TRAVIS_TAG$IMAGE_TAG_SUFFIX" ;
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
docker pull $MASTER_PUSH_DEST ;
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
docker build -t $TAG_PUSH_DEST --cache-from $MASTER_PUSH_DEST --build-arg J_LEVEL=2 --build-arg PROXYGEN_BUILD_FROM=${PROXYGEN_BUILD_FROM} --build-arg COMMON_VERSION=$TRAVIS_TAG . ;
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
docker push $TAG_PUSH_DEST ;
fi