-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
63 lines (54 loc) · 1.5 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
sudo: required
language: bash
services: docker
env:
- NAME=debian VERSION=
- NAME=ocaml VERSION=4.07
- NAME=ocaml VERSION=4.06
- NAME=opam VERSION=2.0
- NAME=coq VERSION=8.8
- NAME=coq VERSION=8.7
- NAME=coq VERSION=8.6
- NAME=coqide VERSION=8.8
- NAME=coqide VERSION=8.7
- NAME=coqide VERSION=8.6
- NAME=eliom VERSION=6.3
cache:
bundler: true
directories:
- $HOME/docker
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
# Load cached docker images
- if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
- docker images
before_script:
- dockerfile_path="$NAME/$VERSION"
- image_name="tyabu/${NAME}:${VERSION:-latest}"
script:
- |
(
set -Eeuo pipefail
set -x
docker build -t "$image_name" "$dockerfile_path"
)
before_cache:
- docker image prune -f
# Save tagged docker images
- >
mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}'
| xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz'
after_success:
- docker images
jobs:
include:
- stage: trigger docker hub
cache: {}
before_install: skip
before_script: skip
script: skip
before_cache: skip
after_success:
- ./trigger.sh debian $DEBIAN_TRIGGER_TOKEN
- ./trigger.sh ocaml $OCAML_TRIGGER_TOKEN