1+ # # Jobs to build and publish deb, rpm and arch based packages
2+ include :
3+ - project : ' ProtonVPN/Linux/_gitlab-ci'
4+ ref : public-protonvpn-repo
5+ file : ' gitlab-ci-build-publish-debian.yml'
6+ - project : ' ProtonVPN/Linux/_gitlab-ci'
7+ ref : public-protonvpn-repo
8+ file : ' gitlab-ci-build-publish-rpm.yml'
9+ - project : ' ProtonVPN/Linux/_gitlab-ci'
10+ ref : public-protonvpn-repo
11+ file : ' gitlab-ci-build-publish-arch.yml'
12+ - project : ' agarroux/publish-github'
13+ ref : master
14+ file : ' /jobs/release.gitlab-ci.yml'
15+
116default :
217 image : $CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG
318
419stages :
520 - image
621 - test
22+ - build
23+ - publish
24+ - message
725 - image-latest
826 - release
927
28+ variables :
29+ CI_REGISTRY_IMAGE_PROTON : " $CI_REGISTRY/infra/kubernetes/images"
30+ PKGNAME_ARCH : " python-proton-client"
31+ PKGNAME_RPM : " python3-proton-client"
32+ ORIGINAL_PKGNAME : " proton-python-client"
33+
34+
1035# ######### Manage the Image ##########
1136.common-image :
1237 image : $CI_REGISTRY/infra/kubernetes/images/docker:stable
@@ -21,18 +46,30 @@ stages:
2146 - apk add make bash git gawk rsync
2247
2348
24- # Make image when we push to a branch -> run tests on top of this one
25- publish :
49+ # # Make image when we push to a branch -> run tests on top of this one
50+ make-image-deb :
2651 stage : image
2752 extends : .common-image
2853 except :
2954 - schedules
3055 - triggers
3156 script :
32- - make image branch=$CI_COMMIT_REF_SLUG
57+ - make image-deb branch=$CI_COMMIT_REF_SLUG src=ubuntu
58+
59+ make-image-rpm :
60+ stage : image
61+ extends : make-image-deb
62+ script :
63+ - make image-rpm branch=$CI_COMMIT_REF_SLUG src=fedora
64+
65+ make-image-arch :
66+ stage : image
67+ extends : make-image-deb
68+ script :
69+ - make image-arch branch=$CI_COMMIT_REF_SLUG src=archlinux
3370
34- # Once the CI is green, we retag the current branch-master to latest
35- publish-latest :
71+ # # Once the CI is green, we retag the current branch-master to latest
72+ publish-latest-deb :
3673 stage : image-latest
3774 extends : .common-image
3875 dependencies : [] # Prevent download + extract artifacts
@@ -42,24 +79,43 @@ publish-latest:
4279 - schedules
4380 - triggers
4481 script :
45- - make latest
46-
82+ - make latest src=ubuntu
4783
84+ publish-latest-rpm :
85+ extends : publish-latest-deb
86+ script :
87+ - make latest src=fedora
88+
89+ publish-latest-arch :
90+ extends : publish-latest-deb
91+ script :
92+ - make latest src=archlinux
4893
49- # ######### CI Jobs ##########
5094
51- test :
95+ # ######## CI Jobs ##########
96+ test-deb :
5297 stage : test
98+ image : $CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG-ubuntu
5399 interruptible : true
100+ needs :
101+ - job : make-image-deb
54102 script :
55103 - python3 -m pytest
56104
57- # # Jobs to publish commits + tags from master to github
58- include :
59- - project : ' agarroux/publish-github'
60- ref : master
61- file : ' /jobs/release.gitlab-ci.yml'
105+ test-rpm :
106+ extends : test-deb
107+ needs :
108+ - job : make-image-rpm
109+ image : $CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG-fedora
110+
111+ test-arch :
112+ extends : test-deb
113+ needs :
114+ - job : make-image-arch
115+ image : $CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG-archlinux
62116
117+
118+ # # Jobs to publish commits + tags from master to github
63119release-publish-github :
64120 stage : release
65121 variables :
0 commit comments