|
| 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 }}' |
0 commit comments