-
Notifications
You must be signed in to change notification settings - Fork 12
/
.cirrus.yml
93 lines (79 loc) · 3.03 KB
/
.cirrus.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
low_scale_task:
compute_engine_instance:
matrix:
- image_project: fedora-cloud
image: family/fedora-cloud-38
- image_project: ubuntu-os-cloud
image: family/ubuntu-2404-lts-amd64
platform: linux
memory: 8G
disk: 40
env:
DEPENDENCIES: git ansible podman
FEDORA_DEP: ansible-collection-ansible-posix
ansible-collection-ansible-utils
CIRRUS_WORKING_DIR: /root/ovn-heater
PHYS_DEPLOYMENT: ${CIRRUS_WORKING_DIR}/physical-deployments/ci.yml
runtime_cache:
folder: runtime-cache
# Make sure we use all the disk available to us. Similar to the steps
# described at:
# https://cloud.google.com/compute/docs/disks/resize-persistent-disk
#
# Use "findmnt -n -o SOURCE /" and parse outputs of the form:
# /dev/<device><partition-number>
# OR
# /dev/<device><partition-number>[text]
resize_disk_script:
- d=$(findmnt -n -o SOURCE / | cut -f 1 -d '[' | cut -f 3 -d '/' | grep -oE '[a-zA-Z]+')
- p=$(findmnt -n -o SOURCE / | cut -f 1 -d '[' | cut -f 3 -d '/' | grep -oE '[0-9]+')
- t=$(df --output=fstype /root | grep -v Type)
- growpart /dev/$d $p || true
- '[ "$t" = "ext4" ] && resize2fs /dev/$d$p || true'
- '[ "$t" = "xfs" ] && xfs_growfs -d /root || true'
- '[ "$t" = "btrfs" ] && btrfs filesystem resize max /root || true'
configure_ssh_script:
- mkdir -p /root/.ssh/
- ssh-keygen -t rsa -N '' -q -f /root/.ssh/id_rsa
- ssh-keyscan $(hostname) >> /root/.ssh/known_hosts
- cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
- chmod og-wx /root/.ssh/authorized_keys
- ssh root@$(hostname) -v echo Hello
install_dependencies_script:
- 'if [ $(which dnf) ]; then
dnf install -y ${DEPENDENCIES} ${FEDORA_DEP};
fi'
- 'if [ $(which apt) ]; then
apt update && apt install -y ${DEPENDENCIES};
fi'
unpack_caches_script:
- mkdir -p runtime runtime-cache
- tar -xzf runtime-cache/runtime.tar.gz || true
- podman load -i runtime/ovn-fake-multinode/ovn-multi-node-image.tar || true
install_script:
- 'sed -i "s/<host>/$(hostname)/g" ${PHYS_DEPLOYMENT}'
# test with ubuntu-based ovn-fake-multinode if test runs on Ubuntu image
- 'if [ $(which apt) ]; then
export OS_BASE=ubuntu;
export OS_IMAGE_OVERRIDE=ubuntu:rolling;
fi;
./do.sh install'
pack_caches_script:
- rm -rf runtime-cache/*
- tar -czf runtime-cache/runtime.tar.gz runtime
upload_caches:
- runtime
test_ovn_kubernetes_script:
- 'sed -i "s/^ log_cmds\: False/ log_cmds\: True/"
test-scenarios/ovn-low-scale*.yml'
- ./do.sh run test-scenarios/ovn-low-scale.yml low-scale
- ./do.sh run test-scenarios/ovn-low-scale-ic.yml low-scale-ic
test_openstack_script:
- 'sed -i "s/^ log_cmds\: false/ log_cmds\: true/"
test-scenarios/openstack-low-scale.yml'
- ./do.sh run test-scenarios/openstack-low-scale.yml openstack-low-scale
check_logs_script:
- ./utils/logs-checker.sh
always:
test_logs_artifacts:
path: test_results/**