forked from frappe/frappe_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
187 lines (180 loc) · 7.91 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
sudo: required
dist: bionic
language: python
python:
- '3.6'
services:
- docker
before_install:
- if [[ "$BUILD" != "development" ]]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
sudo apt-get update && sudo apt-get -y install git;
fi
- if [[ $BUILD == "development" ]];then
sudo apt-get update && sudo apt-get -y install docker-compose;
fi
- chmod u+x ./travis.py
after_success:
- docker --version
jobs:
include:
- stage: "Build Frappe bench development environment (latest)"
if: branch = develop AND type != pull_request
script:
- docker build -t frappe/bench:latest -f build/bench/Dockerfile .
- docker push frappe/bench:latest
- stage: "Frappe (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py frappe --worker --tag latest
- ./travis.py frappe --worker --tag edge --tag-only
- ./travis.py frappe --worker --tag develop --tag-only
- stage: "Frappe (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py frappe --nginx --tag latest
- ./travis.py frappe --nginx --tag edge --tag-only
- ./travis.py frappe --nginx --tag develop --tag-only
- stage: "Frappe (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py frappe --socketio --tag latest
- ./travis.py frappe --socketio --tag edge --tag-only
- ./travis.py frappe --socketio --tag develop --tag-only
- stage: "ERPNext (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py erpnext --worker --tag latest
- ./travis.py erpnext --worker --tag edge --tag-only
- ./travis.py erpnext --worker --tag develop --tag-only
- stage: "ERPNext (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py erpnext --nginx --tag latest
- ./travis.py erpnext --nginx --tag edge --tag-only
- ./travis.py erpnext --nginx --tag develop --tag-only
- stage: "Frappe (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --worker --git-version 13
- ./travis.py frappe --worker --tag v13 --tag-only
- ./travis.py frappe --worker --tag version-13 --tag-only
- stage: "Frappe (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --nginx --git-version 13
- ./travis.py frappe --nginx --tag v13 --tag-only
- ./travis.py frappe --nginx --tag version-13 --tag-only
- stage: "Frappe (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --socketio --git-version 13
- ./travis.py frappe --socketio --tag v13 --tag-only
- ./travis.py frappe --socketio --tag version-13 --tag-only
- stage: "ERPNext (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --worker --git-version 13
- ./travis.py erpnext --worker --tag v13 --tag-only
- ./travis.py erpnext --worker --tag version-13 --tag-only
- stage: "ERPNext (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --nginx --git-version 13
- ./travis.py erpnext --nginx --tag v13 --tag-only
- ./travis.py erpnext --nginx --tag version-13 --tag-only
- stage: "Frappe (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --worker --git-version 12
- ./travis.py frappe --worker --tag v12 --tag-only
- ./travis.py frappe --worker --tag version-12 --tag-only
- stage: "Frappe (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --nginx --git-version 12
- ./travis.py frappe --nginx --tag v12 --tag-only
- ./travis.py frappe --nginx --tag version-12 --tag-only
- stage: "Frappe (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --socketio --git-version 12
- ./travis.py frappe --socketio --tag v12 --tag-only
- ./travis.py frappe --socketio --tag version-12 --tag-only
- stage: "ERPNext (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --worker --git-version 12
- ./travis.py erpnext --worker --tag v12 --tag-only
- ./travis.py erpnext --worker --tag version-12 --tag-only
- stage: "ERPNext (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --nginx --git-version 12
- ./travis.py erpnext --nginx --tag v12 --tag-only
- ./travis.py erpnext --nginx --tag version-12 --tag-only
- stage: "Frappe (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --worker --git-version 11
- ./travis.py frappe --worker --tag v11 --tag-only
- ./travis.py frappe --worker --tag version-11 --tag-only
- stage: "Frappe (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --nginx --git-version 11
- ./travis.py frappe --nginx --tag v11 --tag-only
- ./travis.py frappe --nginx --tag version-11 --tag-only
- stage: "Frappe (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --socketio --git-version 11
- ./travis.py frappe --socketio --tag v11 --tag-only
- ./travis.py frappe --socketio --tag version-11 --tag-only
- stage: "ERPNext (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --worker --git-version 11
- ./travis.py erpnext --worker --tag v11 --tag-only
- ./travis.py erpnext --worker --tag version-11 --tag-only
- stage: "ERPNext (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --nginx --git-version 11
- ./travis.py erpnext --nginx --tag v11 --tag-only
- ./travis.py erpnext --nginx --tag version-11 --tag-only
- stage: "Build and test edge images"
if: type = pull_request
before_install:
- sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- sudo apt-get update && sudo apt-get -y install w3m shellcheck
script:
- ./tests/check-format.sh
- docker build -t frappe/frappe-socketio:edge -f build/frappe-socketio/Dockerfile .
- docker build -t frappe/frappe-worker:develop -f build/frappe-worker/Dockerfile .
- docker build -t frappe/erpnext-worker:edge -f build/erpnext-worker/Dockerfile .
- docker build -t frappe/frappe-nginx:develop -f build/frappe-nginx/Dockerfile .
- docker build -t frappe/erpnext-nginx:edge -f build/erpnext-nginx/Dockerfile .
- ./tests/docker-test.sh
- stage: "Pull and test edge images"
if: branch = develop AND type != pull_request
before_install:
- sudo apt-get update && sudo apt-get -y install docker-compose w3m
script:
- ./tests/docker-test.sh
- stage: "Helm Chart Release"
if: branch = master AND type != pull_request
env:
- GIT_SSH_COMMAND="ssh -i ${TRAVIS_BUILD_DIR}/deploy_key"
before_install:
- openssl aes-256-cbc -K $encrypted_189e52c2c347_key -iv $encrypted_189e52c2c347_iv -in deploy_key.enc -out deploy_key -d;
chmod 400 deploy_key;
- ssh-keyscan github.com >> $HOME/.ssh/known_hosts 2>/dev/null;
install:
- pip install --upgrade pip
script:
- git clone git@github.com:frappe/helm.git && cd helm
- pip install -r release_wizard/requirements.txt
- ./release_wizard/wizard 13 patch --remote origin --ci