summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2021-07-01 11:10:13 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2021-07-01 11:10:13 +0200
commit788258da45285c27801ca08a8564722c6e1e7284 (patch)
treea65ed76c9256ff681d9e512f08fcfa7efabdfc98
parentb7bf83ddffbb3c7228ab9a6baf7f6b3b6ff714f3 (diff)
Protect if {volumes} or env is None (zip part)
Change-Id: Id17fc3b4c5420174f48984ffe8c48054f8e6a30e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--jjb/functest/functest-kubernetes-pi.yaml10
-rw-r--r--jjb/functest/functest-kubernetes.yaml10
-rw-r--r--jjb/functest/functest-pi.yaml10
-rw-r--r--jjb/functest/functest.yaml10
-rw-r--r--jjb/functest/xtesting-pi.yaml10
-rw-r--r--jjb/functest/xtesting.yaml10
6 files changed, 48 insertions, 12 deletions
diff --git a/jjb/functest/functest-kubernetes-pi.yaml b/jjb/functest/functest-kubernetes-pi.yaml
index 42c1a8c86..a874110f0 100644
--- a/jjb/functest/functest-kubernetes-pi.yaml
+++ b/jjb/functest/functest-kubernetes-pi.yaml
@@ -428,8 +428,14 @@
builders:
- shell: |
set +x
- volumes=; for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
- env=; for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
+ volumes=;
+ if [ "{volumes}" != "None" ]; then
+ for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
+ fi
+ env=;
+ 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
if [ "{repo}" = "_" ]; then
image={container}:{tag}
diff --git a/jjb/functest/functest-kubernetes.yaml b/jjb/functest/functest-kubernetes.yaml
index a0bc4c2df..c49eaf042 100644
--- a/jjb/functest/functest-kubernetes.yaml
+++ b/jjb/functest/functest-kubernetes.yaml
@@ -418,8 +418,14 @@
builders:
- shell: |
set +x
- volumes=; for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
- env=; for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
+ volumes=;
+ if [ "{volumes}" != "None" ]; then
+ for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
+ fi
+ env=;
+ 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
if [ "{repo}" = "_" ]; then
image={container}:{tag}
diff --git a/jjb/functest/functest-pi.yaml b/jjb/functest/functest-pi.yaml
index a4d4b52b5..8c7092303 100644
--- a/jjb/functest/functest-pi.yaml
+++ b/jjb/functest/functest-pi.yaml
@@ -687,8 +687,14 @@
builders:
- shell: |
set +x
- volumes=; for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
- env=; for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
+ volumes=;
+ if [ "{volumes}" != "None" ]; then
+ for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
+ fi
+ env=;
+ if [ "{env}" != "None" ]; then
+ for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
+ fi
[ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
if [ "{repo}" = "_" ]; then
image={container}:{tag}
diff --git a/jjb/functest/functest.yaml b/jjb/functest/functest.yaml
index 0b4d1b7e9..0a4dc2aae 100644
--- a/jjb/functest/functest.yaml
+++ b/jjb/functest/functest.yaml
@@ -577,8 +577,14 @@
builders:
- shell: |
set +x
- volumes=; for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
- env=; for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
+ volumes=;
+ if [ "{volumes}" != "None" ]; then
+ for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
+ fi
+ env=;
+ if [ "{env}" != "None" ]; then
+ for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
+ fi
[ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
if [ "{repo}" = "_" ]; then
image={container}:{tag}
diff --git a/jjb/functest/xtesting-pi.yaml b/jjb/functest/xtesting-pi.yaml
index fa3c64427..0a4c023fa 100644
--- a/jjb/functest/xtesting-pi.yaml
+++ b/jjb/functest/xtesting-pi.yaml
@@ -257,8 +257,14 @@
builders:
- shell: |
set +x
- volumes=; for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
- env=; for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
+ volumes=;
+ if [ "{volumes}" != "None" ]; then
+ for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
+ fi
+ env=;
+ 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
if [ "{repo}" = "_" ]; then
image={container}:{tag}
diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml
index ab770cd7b..f4d988dca 100644
--- a/jjb/functest/xtesting.yaml
+++ b/jjb/functest/xtesting.yaml
@@ -245,8 +245,14 @@
builders:
- shell: |
set +x
- volumes=; for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
- env=; for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
+ volumes=;
+ if [ "{volumes}" != "None" ]; then
+ for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
+ fi
+ env=;
+ 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
if [ "{repo}" = "_" ]; then
image={container}:{tag}