generated from Monogramm/docker-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
61 lines (54 loc) · 2.11 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
os: linux
dist: trusty
services: docker
language: shell
branches:
only:
- master
- develop
before_script:
- env | sort
- dir="images/${VERSION}/${VARIANT}"
- export TAG=travis
- export VCS_REF=`git rev-parse --short HEAD`
- export BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
- export IMAGE_NAME=docker-penpot-exporter
script:
- cd "$dir"
# Test containers build
- docker-compose -f docker-compose.test.yml build
- docker images
# Test containers run
- travis_retry docker-compose -f docker-compose.test.yml up -d
- docker-compose -f docker-compose.test.yml logs -f "sut"
- docker-compose -f docker-compose.test.yml ps
- docker-compose -f docker-compose.test.yml logs "penpot-exporter-db"
- docker-compose -f docker-compose.test.yml ps "penpot-exporter-db" | grep "Up"
- docker-compose -f docker-compose.test.yml logs "penpot-exporter"
- docker-compose -f docker-compose.test.yml ps "penpot-exporter" | grep "Up"
- docker-compose -f docker-compose.test.yml ps "sut" | grep "Exit 0"
# Test containers can be dropped and restarted
- docker-compose -f docker-compose.test.yml down
- travis_retry docker-compose -f docker-compose.test.yml up -d
- docker-compose -f docker-compose.test.yml logs "sut"
- docker-compose -f docker-compose.test.yml ps
- docker-compose -f docker-compose.test.yml logs "penpot-exporter-db"
- docker-compose -f docker-compose.test.yml ps "penpot-exporter-db" | grep "Up"
- docker-compose -f docker-compose.test.yml logs "penpot-exporter"
- docker-compose -f docker-compose.test.yml ps "penpot-exporter" | grep "Up"
- docker-compose -f docker-compose.test.yml ps "sut" | grep "Exit 0"
notifications:
email: false
env: # Environments
- VERSION=1.6 VARIANT=alpine
- VERSION=1.6 VARIANT=buster-slim
- VERSION=1.6 VARIANT=buster
- VERSION=1.7 VARIANT=alpine
- VERSION=1.7 VARIANT=buster-slim
- VERSION=1.7 VARIANT=buster
- VERSION=develop VARIANT=alpine
- VERSION=develop VARIANT=buster-slim
- VERSION=develop VARIANT=buster
- VERSION=main VARIANT=alpine
- VERSION=main VARIANT=buster-slim
- VERSION=main VARIANT=buster