Skip to content

Commit 9cf44ee

Browse files
authored
Merge pull request #5406 from dims/separate-jobs-for-build-and-test-for-openlab
New Openlab based job to run ARM64 tests
2 parents 3dad67e + 78e5297 commit 9cf44ee

4 files changed

Lines changed: 136 additions & 1 deletion

File tree

.zuul.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
check:
55
jobs:
66
- containerd-build-arm64
7+
- containerd-test-arm64
8+
- containerd-integration-test-arm64
79

810
- job:
911
name: containerd-build-arm64
@@ -13,3 +15,21 @@
1315
run: .zuul/playbooks/containerd-build/run.yaml
1416
nodeset: ubuntu-xenial-arm64-openlab
1517
voting: false
18+
19+
- job:
20+
name: containerd-test-arm64
21+
parent: init-test
22+
description: |
23+
Containerd unit tests in openlab cluster.
24+
run: .zuul/playbooks/containerd-build/unit-test.yaml
25+
nodeset: ubuntu-xenial-arm64-openlab
26+
voting: false
27+
28+
- job:
29+
name: containerd-integration-test-arm64
30+
parent: init-test
31+
description: |
32+
Containerd unit tests in openlab cluster.
33+
run: .zuul/playbooks/containerd-build/integration-test.yaml
34+
nodeset: ubuntu-xenial-arm64-openlab
35+
voting: false
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
- hosts: all
2+
become: yes
3+
roles:
4+
- role: config-golang
5+
go_version: '1.16.3'
6+
arch: arm64
7+
tasks:
8+
- name: Install pre-requisites
9+
shell:
10+
cmd: |
11+
set -xe
12+
set -o pipefail
13+
apt-get update
14+
apt-get install -y btrfs-tools libseccomp-dev git pkg-config
15+
16+
go version
17+
chdir: '{{ zuul.project.src_dir }}'
18+
executable: /bin/bash
19+
environment: '{{ global_env }}'
20+
- name: Install containerd and cri dependencies
21+
shell:
22+
cmd: |
23+
set -xe
24+
make install-deps
25+
chdir: '{{ zuul.project.src_dir }}'
26+
executable: /bin/bash
27+
environment: '{{ global_env }}'
28+
- name: Install criu
29+
shell:
30+
cmd: |
31+
set -xe
32+
apt-get install -y \
33+
libprotobuf-dev \
34+
libprotobuf-c-dev \
35+
protobuf-c-compiler \
36+
protobuf-compiler \
37+
python-protobuf \
38+
libnl-3-dev \
39+
libnet-dev \
40+
libcap-dev \
41+
python-future
42+
wget https://github.com/checkpoint-restore/criu/archive/v3.13.tar.gz -O criu.tar.gz
43+
tar -zxf criu.tar.gz
44+
cd criu-3.13
45+
make install-criu
46+
chdir: '{{ zuul.project.src_dir }}'
47+
executable: /bin/bash
48+
environment: '{{ global_env }}'
49+
- name: Install containerd
50+
shell:
51+
cmd: |
52+
set -xe
53+
make binaries
54+
make install | tee $LOGS_PATH/make_install.log
55+
chdir: '{{ zuul.project.src_dir }}'
56+
executable: /bin/bash
57+
environment: '{{ global_env }}'
58+
- name: Tests
59+
shell:
60+
cmd: |
61+
make test | tee $LOGS_PATH/make_test.log
62+
make root-test | tee $LOGS_PATH/make_root-test.log
63+
chdir: '{{ zuul.project.src_dir }}'
64+
executable: /bin/bash
65+
environment: '{{ global_env }}'
66+
- name: Integration 1
67+
shell:
68+
cmd: |
69+
make integration EXTRA_TESTFLAGS=-no-criu TESTFLAGS_RACE=-race | tee $LOGS_PATH/make_integration-test.log
70+
chdir: '{{ zuul.project.src_dir }}'
71+
executable: /bin/bash
72+
environment: '{{ global_env }}'
73+
- name: Integration 2
74+
shell:
75+
cmd: |
76+
TESTFLAGS_PARALLEL=1 make integration EXTRA_TESTFLAGS=-no-criu | tee $LOGS_PATH/make_integration-test.log
77+
chdir: '{{ zuul.project.src_dir }}'
78+
executable: /bin/bash
79+
environment: '{{ global_env }}'
80+
- name: CRI Integration Test
81+
shell:
82+
cmd: |
83+
CONTAINERD_RUNTIME="io.containerd.runc.v2" make cri-integration | tee $LOGS_PATH/make_cri-integration-test.log
84+
chdir: '{{ zuul.project.src_dir }}'
85+
executable: /bin/bash
86+
environment: '{{ global_env }}'
87+
- name: CRI Integration Test
88+
shell:
89+
cmd: |
90+
if grep -q "FAIL:" $LOGS_PATH/*.log; then
91+
echo "FAILURE"
92+
exit 1
93+
fi
94+
chdir: '{{ zuul.project.src_dir }}'
95+
executable: /bin/bash
96+
environment: '{{ global_env }}'

.zuul/playbooks/containerd-build/run.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
1616
go version
1717
make | tee $LOGS_PATH/make.txt
18-
make test | tee $LOGS_PATH/make_test.txt
1918
2019
cp -r ./bin $RESULTS_PATH
2120
chdir: '{{ zuul.project.src_dir }}'
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
- hosts: all
2+
become: yes
3+
roles:
4+
- role: config-golang
5+
go_version: '1.16.3'
6+
arch: arm64
7+
tasks:
8+
- name: Build and test containerd
9+
shell:
10+
cmd: |
11+
set -xe
12+
set -o pipefail
13+
apt-get update
14+
apt-get install -y btrfs-tools libseccomp-dev git pkg-config
15+
16+
go version
17+
make build test | tee $LOGS_PATH/make_test.txt
18+
chdir: '{{ zuul.project.src_dir }}'
19+
executable: /bin/bash
20+
environment: '{{ global_env }}'

0 commit comments

Comments
 (0)