File tree 2 files changed +24
-6
lines changed
2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ variables:
2
2
RELEASE_BRANCH : master
3
3
DRBD_VERSION_BASE : 9.2.0
4
4
DRBD9_TESTS_REF : master
5
- BUILD_HELPERS_VERSION : 2c873ab6e6e6bb6ec83f571eeada63d54ff805b5
5
+ BUILD_HELPERS_VERSION : 01525254f2e841c1c67d9a57cad859955340b1e7
6
6
# we have to change the way GitLab CI clones the repository.
7
7
# by default, it is shallow, which gives us a wrong commit count when
8
8
# we do `git rev-list --count origin/master` below.
9
9
GIT_DEPTH : 0
10
10
GIT_STRATEGY : clone
11
11
GIT_SUBMODULE_STRATEGY : normal
12
+ # comma separated list of base images to exclude when testing
13
+ EXCLUDE_BASE_IMAGES : ' '
12
14
13
15
stages :
14
16
- check
@@ -24,10 +26,7 @@ stages:
24
26
- git clone --branch ${DRBD9_TESTS_REF} https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/drbd/drbd9-tests.git
25
27
- |
26
28
kernels_from_vms() {
27
- rq -t < drbd9-tests/virter/vms.toml | \
28
- jq -r '.vms[].metadata
29
- | select(has("BuildDistribution"))
30
- | .BuildDistribution + " " + .BuildKernel'
29
+ python3 .gitlab/kernels-from-vms.py < drbd9-tests/virter/vms.toml
31
30
}
32
31
33
32
# parameters: [version]
@@ -229,7 +228,7 @@ build:all:
229
228
export DRBD_VERSION=$DRBD_VERSION
230
229
export DRBD_UTILS_VERSION=9.0.0.latest-*
231
230
cd drbd9-tests
232
- ./virter/run-test.sh --out-dir=../tests-out "$@"
231
+ ./virter/run-test.sh --out-dir=../tests-out "$@" --exclude-base-image "$EXCLUDE_BASE_IMAGES"
233
232
}
234
233
dependencies :
235
234
- build:for-tests
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+
3
+ import os
4
+ import sys
5
+
6
+ import toml
7
+
8
+ # kernels-from-vms.py
9
+ # Extract kernel versions to be built from a vmshed vms.toml file supplied on stdin
10
+ # Respects the EXCLUDE_BASE_IMAGES environment variable to exclude specific base images
11
+
12
+ exclude_base_images = os .getenv ("EXCLUDE_BASE_IMAGES" , "" ).split ("," )
13
+
14
+ vms = toml .load (sys .stdin )
15
+ for vm in vms ["vms" ]:
16
+ meta = vm ["metadata" ]
17
+ if vm ["base_image" ] in exclude_base_images or "BuildDistribution" not in meta :
18
+ continue
19
+ print (f"{ meta ['BuildDistribution' ]} { meta ['BuildKernel' ]} " )
You can’t perform that action at this time.
0 commit comments