-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (48 loc) · 1.33 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
language: generic
cache: false
services:
- docker
branches:
only:
- master
env:
matrix:
- DOCKER_IMAGE=ysie/helm DIR=helm/2.14 TAG=2.14 SQUASH=true ALIASES="latest"
install:
- |
if [ ! -z ${SQUASH+x} ]; then
sudo -H pip install docker-squash
fi
- curl -sL https://github.com/gdraheim/docker-copyedit/archive/v1.2.2036.tar.gz | tar xzf - --wildcards --strip-components=1 */docker-copyedit.py
before_script:
- export TAG="${TAG:-latest}"
- docker --version
- docker info
script:
- set -e
- cd "${DIR}"
- travis_retry docker build --pull -t "${DOCKER_IMAGE}:${TAG}" .
- |
if [ ! -z ${SQUASH+x} ]; then
docker-squash -t "${DOCKER_IMAGE}:squashed" "${DOCKER_IMAGE}:${TAG}"
docker tag "${DOCKER_IMAGE}:squashed" "${DOCKER_IMAGE}:${TAG}"
fi
before_deploy:
- echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USER}" --password-stdin
after_script:
- docker images
- docker history "${DOCKER_IMAGE}:${TAG}"
deploy:
provider: script
script: "$TRAVIS_BUILD_DIR/travis-deploy.sh"
skip_cleanup: true
on:
repo: yannicksiewe/ci-images
all_branches: true
condition: $TRAVIS_BRANCH == master || $TRAVIS_TAG =~ ^[0-9]+.[0-9]+.+$
notifications:
email:
recipients:
on_success: never
on_failure: always