X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fcommon%2Fcontainer;h=5c0ef959036aae7054606315b1029c6b1ca12917;hb=5cf3216e0e02cb159f906b76e682c038c006aaa9;hp=3c09d7f23d039d06dfb11b3773193b2e7f55c36e;hpb=f937a8bd0c2244b1011ea06865092539c45c9679;p=osm%2Fdevops.git diff --git a/jenkins/common/container b/jenkins/common/container index 3c09d7f2..5c0ef959 100644 --- a/jenkins/common/container +++ b/jenkins/common/container @@ -73,3 +73,14 @@ wait_container_up() { done FATAL "container $1 did not start" } +container_push_tree() { + # create a tarball locally, pipe it into the container and unpack it there + [ $# -eq 3 ] || FATAL "args are container dir_from dir_to (dir_to MUST exist)" + tar -C "$2" -c . -f - | container_exec $1 tar -C "$3" -x -f - +} + +container_push_devops() { + [ $# -eq 1 ] || FATAL "arg is container name got $# args - $*" + container_exec "$1" mkdir -p /root/devops + container_push_tree "$1" "$(dirname $OSM_JENKINS)" "/root/devops" +}