summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2021-07-02 18:29:28 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2021-07-02 18:29:28 +0200
commit76d3a4640f0ed4317367b9fbc8f2228558cc752e (patch)
tree9b19579596f0d85574e115e8c52fd13acf69173a /jjb
parente035eda547388df057a6f62255111acf1653c9e1 (diff)
Ask for sudo (from docker to shell)
Change-Id: Ifc723e6f84edc91eaf23584135ca1bf16673f500 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/functest/xtesting-pi.yaml12
-rw-r--r--jjb/functest/xtesting.yaml32
2 files changed, 22 insertions, 22 deletions
diff --git a/jjb/functest/xtesting-pi.yaml b/jjb/functest/xtesting-pi.yaml
index 0a4c023fa..a8d55c059 100644
--- a/jjb/functest/xtesting-pi.yaml
+++ b/jjb/functest/xtesting-pi.yaml
@@ -80,7 +80,7 @@
else
image={repo}:{port}/{container}:{tag}
fi
- docker pull $image
+ sudo docker pull $image
- builder:
name: xtesting-pi-run-containers
@@ -95,7 +95,7 @@
if [ "{env}" != "None" ]; then
for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
fi
- [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/results || true
+ [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
if [ "{repo}" = "_" ]; then
image={container}:{tag}
elif [ "{port}" = "None" ]; then
@@ -103,7 +103,7 @@
else
image={repo}:{port}/{container}:{tag}
fi
- docker run --rm \
+ sudo docker run --rm \
--privileged={privileged} \
--network={network} \
$volumes \
@@ -131,7 +131,7 @@
else
image={repo}:{port}/{container}:{tag}
fi
- docker rmi $image || true
+ sudo docker rmi $image || true
- job-template:
name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
@@ -265,7 +265,7 @@
if [ "{env}" != "None" ]; then
for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
fi
- [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/results || true
+ [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
if [ "{repo}" = "_" ]; then
image={container}:{tag}
elif [ "{port}" = "None" ]; then
@@ -273,7 +273,7 @@
else
image={repo}:{port}/{container}:{tag}
fi
- docker run --rm \
+ sudo docker run --rm \
$volumes \
$env \
-e S3_ENDPOINT_URL=https://storage.googleapis.com \
diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml
index f4d988dca..1d08d7c56 100644
--- a/jjb/functest/xtesting.yaml
+++ b/jjb/functest/xtesting.yaml
@@ -80,7 +80,7 @@
else
image={repo}:{port}/{container}:{tag}
fi
- docker pull $image
+ sudo docker pull $image
- builder:
name: xtesting-run-containers
@@ -95,7 +95,7 @@
if [ "{env}" != "None" ]; then
for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
fi
- [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/results || true
+ [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
if [ "{repo}" = "_" ]; then
image={container}:{tag}
elif [ "{port}" = "None" ]; then
@@ -103,7 +103,7 @@
else
image={repo}:{port}/{container}:{tag}
fi
- docker run --rm \
+ sudo docker run --rm \
--privileged={privileged} \
--network={network} \
$volumes \
@@ -131,7 +131,7 @@
else
image={repo}:{port}/{container}:{tag}
fi
- docker rmi $image || true
+ sudo docker rmi $image || true
- job-template:
name: 'xtesting-{repo}-{container}-{tag}-pull'
@@ -253,7 +253,7 @@
if [ "{env}" != "None" ]; then
for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
fi
- [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/results || true
+ [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
if [ "{repo}" = "_" ]; then
image={container}:{tag}
elif [ "{port}" = "None" ]; then
@@ -261,7 +261,7 @@
else
image={repo}:{port}/{container}:{tag}
fi
- docker run --rm \
+ sudo docker run --rm \
$volumes \
$env \
-e S3_ENDPOINT_URL=https://storage.googleapis.com \
@@ -406,7 +406,7 @@
if [ "{from}" != "None" ]; then
sed -i {from} Dockerfile
fi
- docker build $build_args \
+ sudo docker build $build_args \
--pull=false --no-cache --force-rm=true \
-t $image .
@@ -438,7 +438,7 @@
else
image=_:/alpine:{dependency}
fi
- docker pull $image || true
+ sudo docker pull $image || true
- builder:
name: xtesting-remove-dep-images
@@ -452,7 +452,7 @@
else
image=_:/alpine:{dependency}
fi
- docker rmi $image || true
+ sudo docker rmi $image || true
- job-template:
name: 'xtesting-{repo}-{tag}-dep-pull'
@@ -489,14 +489,14 @@
builders:
- shell: |
set +x
- apt-get update && apt-get install \
+ sudo apt-get update && sudo apt-get install \
software-properties-common gpg -y
- add-apt-repository -y ppa:deadsnakes/ppa
- apt-get update && apt-get install python3.8 \
+ sudo add-apt-repository -y ppa:deadsnakes/ppa
+ sudo apt-get update && sudo apt-get install python3.8 \
python3.8-dev python3.8-distutils \
python3.7 python3.7-dev python3.6 python3.6-dev \
python python-dev python3-pip enchant -y
- pip3 install tox tox-pip-version
+ sudo pip3 install tox tox-pip-version
tox
@@ -681,7 +681,7 @@
else
image={repo}:{port}/{container}:{tag}
fi
- docker push $image
+ sudo docker push $image
- trigger:
name: xtesting-commit
@@ -769,9 +769,9 @@
name: xtesting-trivy
builders:
- shell: |
- apt-get update && apt-get install curl -y
+ sudo apt-get update && sudo apt-get install curl -y
- curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b .
+ curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
if [ "{repo}" = "_" ]; then
image={container}:{tag}
elif [ "{port}" = "None" ]; then