-
Notifications
You must be signed in to change notification settings - Fork 116
/
.gitlab-ci.yml
153 lines (140 loc) · 4 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
default:
before_script:
- git remote add upstream https://github.com/ClusterLabs/pcs.git
- git fetch upstream
.parallel:
parallel:
matrix:
- BASE_IMAGE_NAME: ["PcsRhel10Next"]
OS_TAG: "centos10"
- BASE_IMAGE_NAME: ["PcsFedoraCurrentRelease"]
OS_TAG: "generic"
tags:
- ${OS_TAG}
stages:
- stage1
- stage2
rpm_build:
extends: .parallel
stage: stage1
script:
- ./autogen.sh
- ./configure --enable-local-build --enable-individual-bundling --enable-webui
- make CI_BRANCH=${BASE_IMAGE_NAME} rpm/pcs.spec
- dnf builddep -y rpm/pcs.spec
- make CI_BRANCH=${BASE_IMAGE_NAME} rpm
- mkdir -p rpms && cp -v $(find rpm -type f -name '*.rpm' -not -name '*.src.rpm') rpms
artifacts:
expire_in: 1 week
paths:
- rpms
distcheck:
extends: .parallel
stage: stage1
script:
- "pip3 install
dacite
tornado
pyagentx
"
- ./autogen.sh
- ./configure --enable-local-build --enable-individual-bundling --enable-webui
- make distcheck DISTCHECK_CONFIGURE_FLAGS='--enable-local-build --enable-individual-bundling --enable-webui'
- rename --verbose .tar. ".${BASE_IMAGE_NAME}.tar." pcs*.tar.*
- mkdir -p dist && cp -v pcs*.tar.* dist/
artifacts:
expire_in: 1 week
paths:
- dist
typos:
extends: .parallel
stage: stage1
script:
- ./autogen.sh
- ./configure --enable-local-build --enable-typos-check --enable-individual-bundling
- make
- make typos_check
black:
extends: .parallel
stage: stage1
script:
- python3 -m pip install --upgrade -r dev_requirements.txt
- ./autogen.sh
- ./configure --enable-local-build --enable-dev-tests --enable-tests-only --enable-individual-bundling
- make black_check
isort:
extends: .parallel
stage: stage1
script:
- python3 -m pip install --upgrade -r dev_requirements.txt
- ./autogen.sh
- ./configure --enable-local-build --enable-dev-tests --enable-tests-only --enable-individual-bundling
- make isort_check
pylint:
extends: .parallel
stage: stage1
script:
- python3 -m pip install --upgrade -r dev_requirements.txt
- ./autogen.sh
- ./configure --enable-local-build --enable-dev-tests --enable-parallel-pylint --enable-individual-bundling
- make
- make pylint
mypy:
extends: .parallel
stage: stage1
script:
- python3 -m pip install --upgrade -r dev_requirements.txt
- ./autogen.sh
- ./configure --enable-local-build --enable-dev-tests --enable-individual-bundling
- make
- make mypy
ruby_tests:
extends: .parallel
stage: stage1
script:
- ./autogen.sh
- ./configure --enable-local-build --enable-individual-bundling
- make
- make pcsd-tests
python_tier0_tests:
extends: .parallel
stage: stage1
script:
# make sure that tier0 tests run without cluster packages installed
- dnf remove -y corosync* pacemaker* fence-agents* resource-agents* booth* sbd
- python3 -m pip install concurrencytest
- ./autogen.sh
- ./configure --enable-local-build --enable-individual-bundling
- make
- make tests_tier0
python_tier1_tests:
extends: .parallel
stage: stage2
needs:
- rpm_build
script:
- "dnf install -y rpms/pcs-*${BASE_IMAGE_NAME}*$(rpm -E %{dist}).*.rpm"
- python3 -m pip install concurrencytest
- ./autogen.sh
- ./configure --enable-local-build --enable-destructive-tests --enable-tests-only --enable-individual-bundling --enable-webui
- rm -rf pcs pcsd pcs_bundled # make sure we are testing installed package
- pcs_test/suite -v --installed --tier1
python_smoke_tests:
extends: .parallel
stage: stage2
needs:
- rpm_build
script:
- "dnf install -y rpms/pcs-*${BASE_IMAGE_NAME}*$(rpm -E %{dist}).*.rpm"
- systemctl start pcsd
- sleep 2
- ./autogen.sh
- ./configure --enable-local-build --enable-individual-bundling --enable-webui
- make
- rm -rf pcs
- pcs_test/smoke.sh
artifacts:
paths:
- /var/log/pcsd/
when: on_failure
expire_in: 1 week