-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
52 lines (47 loc) · 1.2 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
variables:
VIRTER_VERSION: v0.27.0
VMSHED_VERSION: v0.22.1
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
stages:
- build
- test
prepare-bins:
image:
name: ${LINBIT_DOCKER_REGISTRY}/build-helpers:latest
stage: build
script:
- . /usr/local/bin/gitlab-utils.sh
- ci_prepare_tools
- ci_fetch_binary virter virter-$VIRTER_VERSION https://github.com/LINBIT/virter/releases/download/$VIRTER_VERSION/virter-linux-amd64
- ci_fetch_binary vmshed vmshed-$VMSHED_VERSION https://github.com/LINBIT/vmshed/releases/download/$VMSHED_VERSION/vmshed-linux-amd64
cache:
key: bin-$VIRTER_VERSION-$VMSHED_VERSION
paths:
- download
artifacts:
paths:
- download
- bin
test:
stage: test
tags:
- libvirt-xs
script:
- set -ex
- export PATH=$CI_PROJECT_DIR/bin:$PATH
- >
vmshed
--nvms ${LINBIT_CI_MAX_CPUS:-20}
--pull-template "${LINBIT_DOCKER_REGISTRY}/vm/{{ .Image }}:latest"
--vms virter/vms.toml
--tests virter/tests.toml
artifacts:
when: always
paths:
- tests-out/
reports:
junit:
# These reports are created by vmshed, reporting if the test command itself succeeded.
- tests-out/test-results/*.xml