-
Notifications
You must be signed in to change notification settings - Fork 55
/
.gitlab-ci.yml
202 lines (187 loc) · 5.79 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
include: 'https://raw.githubusercontent.com/Nitrokey/common-ci-jobs/master/common_jobs.yml'
stages:
- pull-github
- fetch
- build
- deploy
variables:
#Repo for shared scripts (pull.sh release.sh, nightly_upload.sh):
GIT_STRATEGY: clone #This seems to have no effect also set in webinterface
GIT_DEPTH: 0 #This seems to have no effect also set in webinterface
GIT_SUBMODULE_STRATEGY: recursive
REPO_NAME: nitrokey-app
MAIN_BRANCH: master
COMMON_PULL: "true"
COMMON_UPLOAD_NIGHTLY: "true"
COMMON_GITHUB_RELEASE: "true"
COMMON_UPLOAD_FILES: "false"
fetch-and-package:
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-packaging-agent:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- docker
stage: fetch
before_script:
- apt-get update
- apt-get -y install git wget
script:
- chmod +x ci-scripts/package.sh
- ci-scripts/package.sh
after_script:
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
artifacts:
paths:
- artifacts
- nitrokey-app-source-metadata
expire_in: 2 weeks
.build:
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- docker
stage: build
before_script:
- apt-get update
- apt-get -y install wget curl qttools5-dev
script:
- chmod +x ci-scripts/build.sh
- ci-scripts/build.sh
after_script:
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
build-bionic-gcc8:
extends: .build
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-bionic-gcc8-agent:latest
build-bionic-gcc7:
extends: .build
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-bionic-gcc7-agent:latest
build-bionic-gcc6:
extends: .build
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-bionic-gcc6-agent:latest
build-bionic-gcc5:
extends: .build
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-bionic-gcc5-agent:latest
build-bionic-llvm7:
extends: .build
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-bionic-llvm7-agent:latest
snapcraft:
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-packaging-agent:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- docker
stage: build
before_script:
- apt-get update
- apt-get -y install wget curl qttools5-dev
script:
- chmod +x ci-scripts/snapcraft.sh
- ci-scripts/snapcraft.sh
after_script:
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
artifacts:
paths:
- artifacts
expire_in: 2 week
deb:
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-packaging-agent:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- docker
stage: build
before_script:
- add-apt-repository ppa:nitrokey/nitrokey
- apt-get update
- apt-get -y install git debhelper dh-virtualenv libgtk2.0-dev libnotify-dev qttools5-dev libnitrokey-dev
script:
- chmod +x ci-scripts/deb.sh
- ci-scripts/deb.sh
after_script:
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
artifacts:
paths:
- artifacts
expire_in: 2 week
appimage:
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-appimages-agent:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- docker
stage: build
script:
- chmod +x ci-scripts/appimage.sh
- ci-scripts/appimage.sh
after_script:
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
artifacts:
paths:
- artifacts
expire_in: 2 week
mxe:
image: registry.git.nitrokey.com/nitrokey/nitrokey-app/nitrokey-app-mxe-agent:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- docker
stage: build
before_script:
# - apt-get update
# - apt-get -y install wget curl qttools5-dev git
script:
- chmod +x ci-scripts/mxe.sh
- ci-scripts/mxe.sh
after_script:
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
artifacts:
paths:
- artifacts
expire_in: 2 week
flatpak:
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- lxc
stage: build
script:
- chmod +x ci-scripts/flatpak.sh
- ci-scripts/flatpak.sh
after_script:
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
artifacts:
paths:
- artifacts
expire_in: 2 week
macos-dmg:
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- macos
stage: build
script:
- echo Hello Mac
- ci-scripts/OSX/build.sh /Users/nitrokey/Qt/5.9.9/clang_64/bin/ "enable_log"
after_script:
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
artifacts:
paths:
- artifacts
expire_in: 2 week
allow_failure: true