-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
85 lines (75 loc) · 1.85 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
# This is important to avoid stale artifacts in the build directory
variables:
GIT_STRATEGY: clone
# Another stage is needed for the deployment (so that files are already generated by the previous job)
stages:
- lint
- build
- deploy_and_test
- deploy
include:
- project: 'grid5000/grid5000-gitlab-templates'
ref: master
file: '/sonarqube.yml'
include:
- project: 'grid5000/grid5000-gitlab-templates'
ref: master
file: '/rubocop.yml'
.build: &build
stage: build
tags:
- grid5000-docker
script:
- apt-get update && apt-get -y --no-install-recommends install devscripts build-essential equivs
- mk-build-deps -ir -t 'apt-get -y --no-install-recommends'
- rm -f ../*deb
- dpkg-buildpackage
- mkdir $TARGETDIR
- cp ../*deb $TARGETDIR/ # needed to upload it as artifact
except:
- tags
.build-bullseye: &build-bullseye
<<: *build
variables:
TARGETDIR: "bullseye"
artifacts: # generate artifacts for files we want to publish
paths:
- bullseye
expire_in: '1 month'
build-bullseye:amd64:
<<: *build-bullseye
image: debian:bullseye
build-bullseye:arm64:
<<: *build-bullseye
image:
name: arm64v8/debian:bullseye
docker:
platform: aarch64
tags:
- grid5000-docker-arm64
build-bullseye:ppc64:
<<: *build-bullseye
image: ppc64le/debian:bullseye
tags:
- grid5000-docker-ppc64
test-bullseye:
stage: deploy_and_test
variables:
TARGETDIR: "bullseye"
tags:
- grid5000-shell
script:
- .gitlab-ci/test-g5k-checks $TARGETDIR
except:
- tags
push-package:
stage: deploy_and_test
# tags must be 'packages' so that we use the runner on packages.grid5000.fr
tags:
- grid5000-packages
only:
- master
when: manual
script:
- g5k-deploy-files --only-if-tag --files 'bullseye/*.deb' --directory deb/g5k-checks/bullseye
allow_failure: false