This repository has been archived by the owner on Apr 27, 2021. It is now read-only.
forked from Monogramm/docker-erpnext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
120 lines (112 loc) · 4.04 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
os: linux
dist: trusty
services: docker
language: shell
branches:
only:
- develop
- master
before_script:
- env | sort
- dir="images/${VERSION}/${VARIANT}"
- export DOCKER_TAG="${VERSION}-${VARIANT}-travis"
- export IMAGE_NAME="docker-erpnext-travis:${DOCKER_TAG}"
script:
- cd "$dir"
# Test container build
- travis_retry travis_wait 60 docker-compose build
- docker images
# Test container run
- travis_retry docker-compose up -d && sleep 60
- docker-compose ps
- docker-compose logs "erpnext_db"
- docker-compose ps "erpnext_db" | grep "Up" || exit 1
- docker-compose logs "erpnext_app"
- docker-compose ps "erpnext_app" | grep "Up" || exit 1
- docker-compose logs "erpnext_web"
- docker-compose ps "erpnext_web" | grep "Up" || exit 1
- echo 'Wait until sites and apps database installed (11-12 minutes)' && travis_wait 15 sleep 720
- docker-compose ps
- docker-compose logs "erpnext_db"
- docker-compose ps "erpnext_db" | grep "Up"
- docker-compose logs "erpnext_app"
- docker-compose ps "erpnext_app" | grep "Up"
- docker-compose logs "erpnext_web"
- docker-compose ps "erpnext_web" | grep "Up"
- docker-compose logs "sut"
- docker-compose ps "sut" | grep "Exit 0"
# Test container restart
- docker-compose down
- travis_retry docker-compose up -d && sleep 60
- docker-compose ps
- docker-compose logs "erpnext_db"
- docker-compose ps "erpnext_db" | grep "Up" || exit 1
- docker-compose logs "erpnext_app"
- docker-compose ps "erpnext_app" | grep "Up" || exit 1
- docker-compose logs "erpnext_web"
- docker-compose ps "erpnext_web" | grep "Up" || exit 1
- echo 'Wait until test finished (1-2 minutes)' && sleep 90
- docker-compose logs "sut"
- docker-compose ps "sut" | grep "Exit 0"
# Test container migrate, backup and restore
- docker-compose run --rm "erpnext_app" bench migrate --help
- docker-compose run --rm "erpnext_app" migrate
- docker-compose run --rm "erpnext_app" bench backup --help
- docker-compose run --rm "erpnext_app" backup && sleep 5
- docker-compose run --rm "erpnext_app" backup && sleep 5
- docker-compose run --rm "erpnext_app" backup && sleep 5
- docker-compose run --rm "erpnext_app" bench restore --help
- docker-compose run --rm "erpnext_app" restore 1
notifications:
email: false
matrix:
allow_failures:
- env: VERSION=develop VARIANT=alpine
- env: VERSION=develop VARIANT=debian-slim
- env: VERSION=develop VARIANT=debian
- env: VERSION=12.3 VARIANT=alpine
- env: VERSION=12.3 VARIANT=debian-slim
- env: VERSION=12.3 VARIANT=debian
- env: VERSION=12.2 VARIANT=alpine
- env: VERSION=12.2 VARIANT=debian-slim
- env: VERSION=12.2 VARIANT=debian
- env: VERSION=12.1 VARIANT=alpine
- env: VERSION=12.1 VARIANT=debian-slim
- env: VERSION=12.1 VARIANT=debian
- env: VERSION=12.0 VARIANT=alpine
- env: VERSION=12.0 VARIANT=debian-slim
- env: VERSION=12.0 VARIANT=debian
- env: VERSION=10.x VARIANT=alpine
- env: VERSION=10.x VARIANT=debian-slim
- env: VERSION=10.x VARIANT=debian
env: # Environments
- VERSION=develop VARIANT=alpine
- VERSION=develop VARIANT=debian-slim
- VERSION=develop VARIANT=debian
- VERSION=10.x VARIANT=alpine
- VERSION=10.x VARIANT=debian-slim
- VERSION=10.x VARIANT=debian
- VERSION=11.1 VARIANT=alpine
- VERSION=11.1 VARIANT=debian-slim
- VERSION=11.1 VARIANT=debian
- VERSION=12.0 VARIANT=alpine
- VERSION=12.0 VARIANT=debian-slim
- VERSION=12.0 VARIANT=debian
- VERSION=12.1 VARIANT=alpine
- VERSION=12.1 VARIANT=debian-slim
- VERSION=12.1 VARIANT=debian
- VERSION=12.2 VARIANT=alpine
- VERSION=12.2 VARIANT=debian-slim
- VERSION=12.2 VARIANT=debian
- VERSION=12.3 VARIANT=alpine
- VERSION=12.3 VARIANT=debian-slim
- VERSION=12.3 VARIANT=debian
- VERSION=12.4 VARIANT=alpine
- VERSION=12.4 VARIANT=debian-slim
- VERSION=12.4 VARIANT=debian
- VERSION=12.5 VARIANT=alpine
- VERSION=12.5 VARIANT=debian-slim
- VERSION=12.5 VARIANT=debian
- VERSION=12.6 VARIANT=alpine
- VERSION=12.6 VARIANT=debian-slim
- VERSION=12.6 VARIANT=debian