forked from spark-jobserver/spark-jobserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (33 loc) · 958 Bytes
/
.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
sudo: required
env:
global:
- DOCKER_IMAGE="spark-jobserver:ci"
- DOCKER_API_VERSION="1.24"
language: go
go:
- 1.7
services:
- docker
cache:
apt: true
directories:
- docker
- $HOME/.m2
- $HOME/.ivy2/cache
- $HOME/.sbt/boot/scala-$TRAVIS_SCALA_VERSION
before_install:
- go get github.com/tonistiigi/buildcache/cmd/buildcache
install:
- if [ -e docker/latest_image.tar.gz ]; then
docker load -i docker/latest_image.tar.gz;
fi
- if [ -e docker/latest_cache.tar.gz ]; then
docker load -i docker/latest_cache.tar.gz;
fi
- echo "docker/" >> .dockerignore
- docker build -f Dockerfile.test -t $DOCKER_IMAGE .
- docker save $DOCKER_IMAGE | gzip > docker/latest_image.tar.gz
- sudo `which buildcache` save -o docker/latest_cache.tar.gz $DOCKER_IMAGE
- sudo chown $USER docker/latest_cache.tar.gz
script:
- docker run `/bin/bash <(curl -s https://codecov.io/env)` --rm -t -i $DOCKER_IMAGE