forked from monocursive/linux-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
160 lines (141 loc) · 3.69 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
## Jobs to build and publish deb, rpm and arch based packages
include:
- project: 'ProtonVPN/Linux/_gitlab-ci'
ref: public-protonvpn-repo
file: 'message-deploy.yml'
- project: 'ProtonVPN/Linux/_gitlab-ci'
ref: public-protonvpn-repo
file: 'gitlab-ci-build-publish-debian.yml'
- project: 'ProtonVPN/Linux/_gitlab-ci'
ref: public-protonvpn-repo
file: 'gitlab-ci-build-publish-rpm.yml'
- project: 'ProtonVPN/Linux/_gitlab-ci'
ref: public-protonvpn-repo
file: 'gitlab-ci-build-publish-arch.yml'
- project: 'agarroux/publish-github'
ref: master
file: '/jobs/release.gitlab-ci.yml'
default:
image: $CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG
stages:
- image
- test
- build
- publish
- message
- image-latest
- release
variables:
CI_REGISTRY_IMAGE_PROTON: "$CI_REGISTRY/infra/kubernetes/images"
PKGNAME_ARCH: "protonvpn-gui"
PKGNAME_RPM: "protonvpn-gui"
ORIGINAL_PKGNAME: "linux-app"
######## Manage the Image ##########
.common-image:
image: $CI_REGISTRY/infra/kubernetes/images/docker:stable
interruptible: true
variables:
DOCKER_HOST: tcp://docker:2375
services:
- name: $CI_REGISTRY/infra/kubernetes/images/docker:dind
alias: docker
before_script:
- apk update
- apk add make bash git gawk rsync
## Make image when we push to a branch -> run tests on top of this one
make-image-deb:
stage: image
extends: .common-image
except:
- schedules
- triggers
script:
- make image-deb branch=$CI_COMMIT_REF_SLUG src=ubuntu
make-image-arch:
stage: image
extends: make-image-deb
script:
- make image-arch branch=$CI_COMMIT_REF_SLUG src=archlinux
make-image-fed31:
stage: image
extends: make-image-deb
script:
- make image-fed31 branch=$CI_COMMIT_REF_SLUG src=fedora31
make-image-fed32:
stage: image
extends: make-image-deb
script:
- make image-fed32 branch=$CI_COMMIT_REF_SLUG src=fedora32
make-image-fed33:
stage: image
extends: make-image-deb
script:
- make image-fed33 branch=$CI_COMMIT_REF_SLUG src=fedora33
make-image-fed34:
stage: image
extends: make-image-deb
script:
- make image-fed34 branch=$CI_COMMIT_REF_SLUG src=fedora34
######## CI Jobs ##########
test-deb:
stage: test
image: $CI_REGISTRY_IMAGE/ubuntu:branch-$CI_COMMIT_REF_SLUG
interruptible: true
needs:
- job: make-image-deb
script:
- python3 -m pytest
test-arch:
extends: test-deb
needs:
- job: make-image-arch
image: $CI_REGISTRY_IMAGE/archlinux:branch-$CI_COMMIT_REF_SLUG
test-fed31:
extends: test-deb
needs:
- job: make-image-fed31
image: $CI_REGISTRY_IMAGE/fedora31:branch-$CI_COMMIT_REF_SLUG
test-fed32:
extends: test-deb
needs:
- job: make-image-fed32
image: $CI_REGISTRY_IMAGE/fedora32:branch-$CI_COMMIT_REF_SLUG
test-fed33:
extends: test-deb
needs:
- job: make-image-fed33
image: $CI_REGISTRY_IMAGE/fedora33:branch-$CI_COMMIT_REF_SLUG
test-fed34:
extends: test-deb
needs:
- job: make-image-fed34
image: $CI_REGISTRY_IMAGE/fedora34:branch-$CI_COMMIT_REF_SLUG
## Jobs to publish commits + tags from master to github
release-publish-github:
stage: release
needs:
- job: build-deb
- job: build-fed31
- job: build-fed32
- job: build-fed33
- job: build-fed34
when: manual
variables:
RELEASE_SYNC_PUBLIC_URL: [email protected]:ProtonVPN/linux-app.git
RELEASE_SYNC_TO_BRANCH: 'master'
RELEASE_SYNC_FROM_BRANCH: 'master'
extends: .release-sync-commit-shared
release-publish-github-tags:
stage: release
needs:
- job: build-deb
- job: build-fed31
- job: build-fed32
- job: build-fed33
- job: build-fed34
when: manual
variables:
RELEASE_SYNC_PUBLIC_URL: [email protected]:ProtonVPN/linux-app.git
RELEASE_SYNC_TO_BRANCH: 'master'
RELEASE_SYNC_FROM_BRANCH: 'master'
extends: .release-sync-tags-shared