From 060f9d0f13519e5e180038ce2baa5f8ff7009c45 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Fri, 15 Apr 2022 10:25:57 +0200 Subject: Leverage non-root user in Xtesting containers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifefe173d563d4ec7098b47ec6df184d71f760fea Signed-off-by: Cédric Ollivier --- jjb/functest/functest-kubernetes-pi.yaml | 2 ++ jjb/functest/functest-kubernetes.yaml | 2 ++ jjb/functest/functest-pi.yaml | 2 ++ jjb/functest/functest.yaml | 2 ++ jjb/functest/xtesting-pi.yaml | 2 ++ jjb/functest/xtesting.yaml | 4 ++-- 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/jjb/functest/functest-kubernetes-pi.yaml b/jjb/functest/functest-kubernetes-pi.yaml index 9e1c8714f..40b37c1e7 100644 --- a/jjb/functest/functest-kubernetes-pi.yaml +++ b/jjb/functest/functest-kubernetes-pi.yaml @@ -125,6 +125,8 @@ else image={repo}:{port}/{container}:{tag} fi + mkdir -p $WORKSPACE/results + chown 1000:1000 $WORKSPACE/results docker run --rm \ --privileged={privileged} \ --network={network} \ diff --git a/jjb/functest/functest-kubernetes.yaml b/jjb/functest/functest-kubernetes.yaml index 515afe3ab..dabe84494 100644 --- a/jjb/functest/functest-kubernetes.yaml +++ b/jjb/functest/functest-kubernetes.yaml @@ -125,6 +125,8 @@ else image={repo}:{port}/{container}:{tag} fi + mkdir -p $WORKSPACE/results + chown 1000:1000 $WORKSPACE/results docker run --rm \ --privileged={privileged} \ --network={network} \ diff --git a/jjb/functest/functest-pi.yaml b/jjb/functest/functest-pi.yaml index 6a2c667a4..9afca8f4f 100644 --- a/jjb/functest/functest-pi.yaml +++ b/jjb/functest/functest-pi.yaml @@ -151,6 +151,8 @@ else image={repo}:{port}/{container}:{tag} fi + mkdir -p $WORKSPACE/results + chown 1000:1000 $WORKSPACE/results sudo docker run --rm \ --privileged={privileged} \ --network={network} \ diff --git a/jjb/functest/functest.yaml b/jjb/functest/functest.yaml index 9e91d8ed0..bb5de274f 100644 --- a/jjb/functest/functest.yaml +++ b/jjb/functest/functest.yaml @@ -139,6 +139,8 @@ else image={repo}:{port}/{container}:{tag} fi + mkdir -p $WORKSPACE/results + chown 1000:1000 $WORKSPACE/results sudo docker run --rm \ --privileged={privileged} \ --network={network} \ diff --git a/jjb/functest/xtesting-pi.yaml b/jjb/functest/xtesting-pi.yaml index 2c0fec615..7b16e848f 100644 --- a/jjb/functest/xtesting-pi.yaml +++ b/jjb/functest/xtesting-pi.yaml @@ -111,6 +111,8 @@ else image={repo}:{port}/{container}:{tag} fi + mkdir -p $WORKSPACE/results + chown 1000:1000 $WORKSPACE/results sudo docker run --rm \ --privileged={privileged} \ --network={network} \ diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml index e012b2a9c..0c75a839d 100644 --- a/jjb/functest/xtesting.yaml +++ b/jjb/functest/xtesting.yaml @@ -111,8 +111,8 @@ else image={repo}:{port}/{container}:{tag} fi - mkdir -p $WORKSPACE/../$JOB_NAME/results - chown opnfv: $WORKSPACE/../$JOB_NAME/results + mkdir -p $WORKSPACE/results + chown 1000:1000 $WORKSPACE/results sudo docker run --rm \ --privileged={privileged} \ --network={network} \ -- cgit 1.2.3-korg