From 5463396b1d47a122f5aef9a619244fd1777c0b56 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Fri, 5 Jul 2019 17:45:39 +0200 Subject: Reusable meta-updater pipeline suite Squashed: * Oe-selftest GitLab pipeline stage * Use credentials for CI's oe-selftest * Setup kvm trick for docker on CI The gid of the kvm group needs to match the one from the host * Run ci scripts from Docker images * Template out jobs and split .gitlab-ci.yml To be easily reused in other branches and projects Rely on this gitlab feature: https://docs.gitlab.com/ee/ci/yaml/#extends * More flexible checkout script for CI - can work without $CURRENT_PROJECT (checks out everything) - can take a list of pinned versions * Add optional CI jobs ptest and other oe-selftests * Publish bitbaked images as artifacts Signed-off-by: Laurent Bonnans --- scripts/ci/docker/setup_kvm.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/ci/docker/setup_kvm.sh (limited to 'scripts/ci/docker') diff --git a/scripts/ci/docker/setup_kvm.sh b/scripts/ci/docker/setup_kvm.sh new file mode 100755 index 0000000..1ffbbf5 --- /dev/null +++ b/scripts/ci/docker/setup_kvm.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# This script makes the gid of the 'kvm' group to match the group +# owner of '/dev/kvm' +# +# These two are not guaranteed to match when a docker image starts +# with access to '/dev/kvm' that comes from the host + +set -euo pipefail + +kvm_gid=$(stat -c "%g" /dev/kvm) +groupmod -g "$kvm_gid" kvm +usermod -a -G kvm bitbake +ln -s /bin/true /usr/bin/kvm-ok -- cgit v1.2.3-54-g00ecf