summaryrefslogtreecommitdiffstats
path: root/scripts/ci/docker/setup_kvm.sh
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2019-07-05 17:45:39 +0200
committerMykhaylo Sul <ext-mykhaylo.sul@here.com>2019-07-17 16:06:42 +0300
commitf7cfd440884fc76c8b898aa5bdf9f39ebdb8e8f5 (patch)
treead615659dd2317eaf2e0e97dab44e4181075cca1 /scripts/ci/docker/setup_kvm.sh
parent0f9c821ff0d55b29984b129f648ff7718aebc82f (diff)
downloadmeta-updater-f7cfd440884fc76c8b898aa5bdf9f39ebdb8e8f5.tar.gz
Reusable meta-updater pipeline suiteBackport/thud/secondaries
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 <laurent.bonnans@here.com>
Diffstat (limited to 'scripts/ci/docker/setup_kvm.sh')
-rwxr-xr-xscripts/ci/docker/setup_kvm.sh14
1 files changed, 14 insertions, 0 deletions
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 @@
1#!/usr/bin/env bash
2
3# This script makes the gid of the 'kvm' group to match the group
4# owner of '/dev/kvm'
5#
6# These two are not guaranteed to match when a docker image starts
7# with access to '/dev/kvm' that comes from the host
8
9set -euo pipefail
10
11kvm_gid=$(stat -c "%g" /dev/kvm)
12groupmod -g "$kvm_gid" kvm
13usermod -a -G kvm bitbake
14ln -s /bin/true /usr/bin/kvm-ok