forked from AllYarnsAreBeautiful/ayab-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
207 lines (192 loc) · 3.63 KB
/
.gitlab-ci.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
GIT_DEPTH: "300"
GIT_SSL_NO_VERIFY: "true"
S3_BUCKET_NAME: "ayab-debug"
stages:
- build
- test
- deploy
- test2
cache:
paths:
- /Library/Caches/Homebrew
- ~/.cache/pip
before_script:
- TAG=$(git describe --tags | sed 's/-/.post/' | cut -f1 -d'-')
- echo $TAG > package_version
- cat package_version
build:osx:
tags:
- osx
- virtualbox
stage: build
artifacts:
when: always
paths:
- dist/release/
script:
- mac-build/install.sh
after_script:
- TAG=$(cat package_version)
- cd dist/release
- ls
- mv AYAB.dmg AYAB-${TAG}-osx.dmg
- ls
- cd ../..
build:linux:
image: python:3.5
tags:
- linux
- docker
stage: build
artifacts:
when: always
paths:
- dist/release/
script:
- cp linux-build/README.rst .
- linux-build/install.sh
after_script:
- TAG=$(cat package_version)
- cd dist/release
- ls
- mv ayab*.tar.gz AYAB-${TAG}-linux.tar.gz
- mv ayab*.whl AYAB-${TAG}-py3-none-any.whl
- ls
- cd ../..
build:win7:
tags:
- win7
- virtualbox
stage: build
artifacts:
when: always
paths:
- dist/release/
script:
- windows-build/install.sh 7
after_script:
- cd dist/release
- ls
- cd ../..
build:win10:
tags:
- win10
- virtualbox
stage: build
artifacts:
when: always
paths:
- dist/release/
script:
- windows-build/install.sh 10
after_script:
- cd dist/release
- ls
- cd ../..
test:pypi_source:
tags:
- linux
- docker
stage: test
image: python:3.5
before_script:
- cd dist/release
- ls
script:
- pip3 install AYAB*.tar.gz
test:pypi_wheel:
tags:
- linux
- docker
stage: test
image: python:3.5
before_script:
- cd dist/release
- ls
script:
- pip3 install AYAB*.whl
test:pypi_git:
tags:
- linux
- docker
stage: test
image: python:3.5
script:
- pip3 install -e git+https://gitlab.derchris.eu:10443/AllYarnsAreBeautiful/ayab-desktop.git@$CI_COMMIT_REF_NAME#egg=ayab
deploy:s3:
tags:
- linux
- docker
stage: deploy
environment:
name: s3
url: http://ayab-debug.s3-website.eu-central-1.amazonaws.com
image: python:latest
before_script:
- cp deploy/*.tpl dist/
- cd dist/release
- for i in `ls`; do echo "<li class=\"file\"><a href=\"$i\">$i</a></li>"; done > ../main.tpl
- cd ../
- cat header.tpl main.tpl footer.tpl > release/index.html
- cd ../
script:
- pip install awscli
- aws s3 rm s3://$S3_BUCKET_NAME/ --recursive
- aws s3 cp --acl public-read ./dist/release/ s3://$S3_BUCKET_NAME/ --recursive
deploy:github:
tags:
- linux
- docker
stage: deploy
environment:
name: github
url: https://github.com/AllYarnsAreBeautiful/ayab-desktop/releases
image: python:latest
script:
- cd dist/release
- ls
- /tools/upload.sh $CI_COMMIT_TAG master
only:
- tags
deploy:pypi_test:
tags:
- linux
- docker
stage: deploy
environment:
name: pypi_test
url: https://testpypi.python.org/pypi/ayab
image: python:latest
script:
- pip install twine
- cd dist/release
- ls
- /tools/pypi.sh test
deploy:pypi:
tags:
- linux
- docker
stage: deploy
environment:
name: pypi
url: https://pypi.python.org/pypi/ayab
image: python:latest
script:
- pip install twine
- cd dist/release
- ls
- /tools/pypi.sh prod
only:
- tags
test2:pypi_test:
tags:
- linux
- docker
stage: test2
image: python:3.5
script:
- TAG=$(cat package_version)
- pip3 install --extra-index-url https://test.pypi.org/pypi ayab==${TAG}