-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
53 lines (46 loc) · 1.36 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
language: minimal
dist: xenial
addons:
apt:
sources:
- docker-xenial
env:
global:
- ADD_TAG=""
- TAG=latest
before_install:
# Pull Kaniko Image
- docker pull gcr.io/kaniko-project/executor:latest
# Login to hub.docker.com
- echo "$DOCKER_PASSWORD" | docker login -u $DOCKER_USERNAME --password-stdin
install:
# Add docker-retag executable
- wget -q https://github.com/joshdk/docker-retag/releases/download/0.0.2/docker-retag && chmod +x docker-retag
# Add env variables for docker-retag
- export DOCKER_USER=$DOCKER_USERNAME
- export DOCKER_PASS=$DOCKER_PASSWORD
script:
# Build Image via kaniko
- docker run
-v "$TRAVIS_BUILD_DIR":/workspace
-v $HOME/.docker:/kaniko/.docker
gcr.io/kaniko-project/executor:latest
--context=/workspace
--build-arg VCS_REF=$TRAVIS_COMMIT
--build-arg GIT_REPO=https://github.com/$TRAVIS_REPO_SLUG
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%d")
--verbosity=info
--destination=$DOCKER_SLUG/quagga:$TAG
# - docker build -t $DOCKER_SLUG/quagga:$TAG \
# --build-arg VCS_REF=$TRAVIS_COMMIT \
# --build-arg GIT_REPO=https://github.com/$TRAVIS_REPO_SLUG \
# --build-arg BUILD_DATE=$(date -u +"%Y-%m-%d") \
# .
# Retag images for other tags
- for i in $ADD_TAG;
do
./docker-retag $DOCKER_SLUG/quagga:$TAG $i;
done
# # don't notify me when things fail
# notifications:
# email: false