@@ -98,19 +98,12 @@ Plan merges to `master` so that both fit the two-week window; short extensions s
meta:
meta-isar:
EOF
- kas/kas-container shell kas.yml
+ kas/kas-container --entrypoint /work/scripts/ci_setup.sh shell kas.yml
```
In kas shell:
```
- wget -q http://deb.isar-build.org/debian-isar.key -O- |gpg --dearmor \
- |sudo dd of=/etc/apt/trusted.gpg.d/debian-isar.gpg
- echo "deb [signed-by=/etc/apt/trusted.gpg.d/debian-isar.gpg] \
- http://deb.isar-build.org/debian-isar bookworm-isar main" \
- |sudo tee /etc/apt/sources.list.d/10-isar_build.list
- sudo apt-get update
- sudo apt-get install -y avocado qemu-system-arm qemu-system-x86
cd /work/isar/testsuite
avocado run citest.py -t dev --max-parallel-tasks=1
```
new file mode 100755
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Script to setup a container for CI builds
+#
+# Cedric Hombourger <cedric.hombourger@siemens.com>
+# Copyright (c) Siemens AG, 2025
+# SPDX-License-Identifier: MIT
+
+gpg_key=/etc/apt/trusted.gpg.d/debian-isar.gpg
+[ -f "${gpg_key}" ] || {
+ wget -q http://deb.isar-build.org/debian-isar.key -O- \
+ | gpg --dearmor \
+ | sudo dd of="${gpg_key}"
+}
+
+list=/etc/apt/sources.list.d/10-isar_build.list
+[ -f "${list}" ] || {
+ echo "deb [signed-by=/etc/apt/trusted.gpg.d/debian-isar.gpg] \
+ http://deb.isar-build.org/debian-isar bookworm-isar main" \
+ | sudo tee /etc/apt/sources.list.d/10-isar_build.list
+}
+
+tools="avocado qemu-system-aarch64 qemu-system-arm qemu-system-i386 qemu-system-x86_64"
+need_install=0
+for tool in ${tools}; do
+ which "${tool}" || need_install=1
+done
+[ "${need_install}" = "0" ] || {
+ sudo apt-get update
+ sudo apt-get install -y avocado qemu-system-arm qemu-system-x86
+}
+
+exec /container-entrypoint ${*}
Our CONTRIBUTING guide lists several manual steps to be done prior to running avocado: introduce a ci_setup script that we will use as entry-point to the kas container. This will help developers reproduce the CI environment they should use to validate their changes prior to submitting them. Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com> --- CONTRIBUTING.md | 9 +-------- scripts/ci_setup.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 8 deletions(-) create mode 100755 scripts/ci_setup.sh