github.com/canonical/ubuntu-image@v0.0.0-20240430122802-2202fe98b290/spread.yaml (about) 1 project: ubuntu-image 2 3 environment: 4 # On some distros the default GOPROXY setting is 'direct' (eg. Fedora). 5 # Some of the external go packages may get removed or could be temporary 6 # offline (as happened with maze.io/x/crypt), and then the sources are 7 # only available through the proxy cache. Play it safe and enable the 8 # proxy to allow for least CI interruptions. 9 GOPROXY: https://proxy.golang.org,direct 10 LANG: "C.UTF-8" 11 LANGUAGE: "en" 12 # build the snap with lxd 13 SNAPCRAFT_BUILD_ENVIRONMENT: lxd 14 15 16 backends: 17 google: 18 key: '$(HOST: echo "$SPREAD_GOOGLE_KEY")' 19 location: snapd-spread/us-east1-b 20 plan: n2-standard-2 21 halt-timeout: 2h 22 systems: 23 # - ubuntu-16.04-64: 24 # workers: 1 25 # storage: 45G 26 - ubuntu-18.04-64: 27 storage: 45G 28 workers: 1 29 - ubuntu-20.04-64: 30 storage: 45G 31 workers: 1 32 - ubuntu-22.04-64: 33 storage: 45G 34 workers: 1 35 - ubuntu-23.04-64: 36 storage: 45G 37 workers: 1 38 - ubuntu-23.10-64: 39 storage: 45G 40 workers: 1 41 google-arm: 42 type: google 43 key: '$(HOST: echo "$SPREAD_GOOGLE_KEY")' 44 location: snapd-spread/us-central1-a 45 plan: t2a-standard-1 46 halt-timeout: 2h 47 systems: 48 - ubuntu-20.04-arm-64: 49 image: ubuntu-os-cloud/ubuntu-2004-lts-arm64 50 workers: 1 51 storage: 45G 52 - ubuntu-22.04-arm-64: 53 image: ubuntu-os-cloud/ubuntu-2204-lts-arm64 54 workers: 1 55 storage: 45G 56 qemu: 57 memory: 4G 58 systems: 59 # - ubuntu-16.04-64: 60 # username: ubuntu 61 # password: ubuntu 62 - ubuntu-18.04-64: 63 username: ubuntu 64 password: ubuntu 65 - ubuntu-20.04-64: 66 username: ubuntu 67 password: ubuntu 68 - ubuntu-22.04-64: 69 username: ubuntu 70 password: ubuntu 71 - ubuntu-23.04-64: 72 username: ubuntu 73 password: ubuntu 74 - ubuntu-23.10-64: 75 username: ubuntu 76 password: ubuntu 77 78 path: /home/ubuntu-image 79 80 prepare: | 81 # NOTE: This part of the code needs to be in spread.yaml as it runs before 82 # the rest of the source code (including the tests/lib directory) is 83 # around. The purpose of this code is to fix some connectivity issues and 84 # then apply the delta of the git repository. 85 86 # apt update is hanging on security.ubuntu.com with IPv6, prefer IPv4 over IPv6 87 cat <<EOF > gai.conf 88 precedence ::1/128 50 89 precedence ::/0 40 90 precedence 2002::/16 30 91 precedence ::/96 20 92 precedence ::ffff:0:0/96 100 93 EOF 94 if ! mv gai.conf /etc/gai.conf; then 95 echo "/etc/gai.conf is not writable, ubuntu-core system? apt update won't be affected in that case" 96 rm -f gai.conf 97 fi 98 if command -v restorecon ; then 99 # restore proper context otherwise SELinux may complain 100 restorecon -v /etc/gai.conf 101 fi 102 103 if systemctl is-enabled unattended-upgrades.service; then 104 systemctl stop unattended-upgrades.service 105 systemctl mask unattended-upgrades.service 106 fi 107 108 # Make sure ssh service is restarted after it is killed by spread (pkill -o -HUP sshd) 109 # during the machine setup in google systems. For more details see lp:2011458 110 if [ "$SPREAD_BACKEND" = "google" ] && [[ "$SPREAD_SYSTEM" == ubuntu-2* ]] && ! systemctl is-active ssh; then 111 systemctl restart ssh 112 fi 113 114 apt update 115 apt install -y snapd libc6-dev git 116 if [[ ! "$SPREAD_BACKEND" == *-arm ]]; then 117 apt install -y gcc-multilib binfmt-support qemu-user-static 118 fi 119 120 snap install core22 --channel=latest/edge 121 snap install yq 122 snap install snapcraft --classic 123 124 # Setup lxd 125 # Make sure we use the snap version 126 apt remove -y lxd 127 snap install lxd 128 lxd init --auto 129 130 # Build and install the snap 131 snapcraft 132 snap install --classic --dangerous ubuntu-image_*.snap 133 134 unset SHELL 135 git clone -b noble https://git.launchpad.net/ubuntu-images 136 git clone https://github.com/snapcore/models 137 138 debug: | 139 cat /root/.local/state/snapcraft/log/snapcraft-*.log 140 141 suites: 142 tests/commons/: 143 summary: Common integration tests for ubuntu-image 144 tests/amd64/: 145 summary: Integration tests for ubuntu-image on amd64 146 backends: [google] 147 environment: 148 IMG/ubuntu_server_pc_amd64: ubuntu-server-pc-amd64 149 IMG/ubuntu_server_pi_arm64: ubuntu-server-pi-arm64 150 151 tests/arm64/: 152 summary: Integration tests for ubuntu-image on arm64 153 backends: [google-arm] 154 environment: 155 IMG/ubuntu_server_pi_arm64: ubuntu-server-pi-arm64 156 IMG/ubuntu_server_pc_arm64: ubuntu-server-pc-arm64 157 IMG/ubuntu_pi_arm64: ubuntu-pi-arm64 158 159 kill-timeout: 30m