-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
42 lines (31 loc) · 2.48 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
on:
tags: true
sudo: required
services:
- docker
before_install:
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
script:
- ALPINE_IMGID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}" -f Dockerfile . | tee /dev/stderr | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Alpine
- ALPINE_CNTID=$(docker run -d --entrypoint /bin/sh "$ALPINE_IMGID" true) # Flattening of Alpine image
- docker export $ALPINE_CNTID | docker import - "carbonsrv/carbon:${TRAVIS_TAG:-latest}-flat"
- docker export $ALPINE_CNTID | docker import - "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine-flat"
- docker rm $ALPINE_CNTID
- ALPINE_EDGE_IMGID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine_edge" -f Dockerfile.alpine-edge . | tee /dev/stderr | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Alpine Edge
- ALPINE_EDGE_CNTID=$(docker run -d --entrypoint /bin/sh "$ALPINE_EDGE_IMGID" true) # Flattening of Alpine Edge image
- docker export $ALPINE_EDGE_CNTID | docker import - "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine_edge-flat"
- docker rm $ALPINE_EDGE_CNTID
- ALPINE_TORCH_IMGID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-torch" -f Dockerfile.alpine-torch . | tee /dev/stderr | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Alpine using Torch
- ALPINE_TORCH_CNTID=$(docker run -d --entrypoint /bin/sh "$ALPINE_TORCH_IMGID" true) # Flattening of Alpine image
- docker export $ALPINE_TORCH_CNTID | docker import - "carbonsrv/carbon:${TRAVIS_TAG:-latest}-torch-flat"
- docker rm $ALPINE_TORCH_CNTID
- ARCH_IMGID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-arch" -f Dockerfile.arch . | tee /dev/stderr | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Arch
- ARCH_CNTID=$(docker run -d --entrypoint /bin/sh "$ARCH_IMGID" true) # Flattening of Arch image
- docker export $ARCH_CNTID | docker import - "carbonsrv/carbon:${TRAVIS_TAG:-latest}-arch-flat"
- docker rm $ARCH_CNTID
- GOLANG_IMGID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-golang" -f Dockerfile.golang . | tee /dev/stderr | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Golang
- GOLANG_CNTID=$(docker run -d --entrypoint /bin/sh "$GOLANG_IMGID" true) # Flattening of Arch image
- docker export $GOLANG_CNTID | docker import - "carbonsrv/carbon:${TRAVIS_TAG:-latest}-golang-flat"
- docker rm $GOLANG_CNTID
after_success:
- docker push carbonsrv/carbon