RO scripts added. Also possible now to create privileged containers
- SETTINGS files in template and riftware were modified to allow option for privileged container
- New function in common/container to create privileged containers
- RO SETTINGS and start_build skeleton were created
Change-Id: I80143214708e65c62c899efecd30d4b84fb715ce
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/jenkins/common/container b/jenkins/common/container
index 89db8ba..3c09d7f 100644
--- a/jenkins/common/container
+++ b/jenkins/common/container
@@ -37,13 +37,22 @@
fi
INFO "creating container $2 using image $1"
DEBUG "lxc launch $1 $2"
- sudo lxc launch "$1" "$2"
+ lxc launch "$1" "$2"
+}
+
+create_privileged_container() {
+ if [ $# -ne 2 ]; then
+ FATAL "args are image container"
+ fi
+ INFO "creating container $2 using image $1"
+ DEBUG "lxc launch $1 $2"
+ lxc launch "$1" "$2" -c security.privileged=true
}
container_exec() {
container="$1"
shift
- DEBUG "exec in $1 \"$*\""
+ DEBUG "exec in $container \"$*\""
lxc exec "$container" -- $*
}