diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-09-19 10:14:49 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-09-19 10:33:27 +0200 |
commit | dece25372d52734a58f00bb1547195e9e138625a (patch) | |
tree | d422eab358b6b314af66e62c851bbba316c68a94 /jjb | |
parent | 492c28556906ef83b8fd300ad71003dd7b0c0560 (diff) |
Update buildargs logic
Change-Id: I393e5669f190ddf81cf2afcc9e153809686d5f1c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/functest/functest-kubernetes-ng.yaml | 5 | ||||
-rw-r--r-- | jjb/functest/functest-kubernetes-pi.yaml | 12 | ||||
-rw-r--r-- | jjb/functest/functest-kubernetes.yaml | 15 | ||||
-rw-r--r-- | jjb/functest/functest-pi.yaml | 12 | ||||
-rw-r--r-- | jjb/functest/functest.yaml | 15 | ||||
-rw-r--r-- | jjb/functest/xtesting-pi.yaml | 12 | ||||
-rw-r--r-- | jjb/functest/xtesting.yaml | 15 |
7 files changed, 57 insertions, 29 deletions
diff --git a/jjb/functest/functest-kubernetes-ng.yaml b/jjb/functest/functest-kubernetes-ng.yaml index 2c42fc051..dd00c5bd0 100644 --- a/jjb/functest/functest-kubernetes-ng.yaml +++ b/jjb/functest/functest-kubernetes-ng.yaml @@ -27,7 +27,7 @@ branch: stable/kali slave: lf-virtual1 dependency: 3.11 - buildargs: --build-arg K8S_TAG=1.18 + buildargs: {'K8S_TAG': 1.18} from: s/:kali$/:v1.18/g - functest-kubernetes-ng-jobs: &functest-kubernetes-ng-jobs @@ -63,7 +63,8 @@ fi build_args="" if [ "{buildargs}" != "None" ]; then - build_args="{buildargs}" + for i in $(eval echo {buildargs} | tr -d '[]' |sed "s/, / /g" ); \ + do build_args="--build-arg $i $build_args"; done fi if [ "{ref_arg}" != "None" ]; then build_args="$build_args --build-arg {ref_arg}={ref}" diff --git a/jjb/functest/functest-kubernetes-pi.yaml b/jjb/functest/functest-kubernetes-pi.yaml index 48a534f3e..4d6ec25bb 100644 --- a/jjb/functest/functest-kubernetes-pi.yaml +++ b/jjb/functest/functest-kubernetes-pi.yaml @@ -103,11 +103,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 @@ -439,11 +441,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 diff --git a/jjb/functest/functest-kubernetes.yaml b/jjb/functest/functest-kubernetes.yaml index 8c4972966..e11042f9b 100644 --- a/jjb/functest/functest-kubernetes.yaml +++ b/jjb/functest/functest-kubernetes.yaml @@ -103,11 +103,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 @@ -425,11 +427,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 @@ -644,7 +648,8 @@ fi build_args="" if [ "{buildargs}" != "None" ]; then - build_args="{buildargs}" + for i in $(eval echo {buildargs} | tr -d '[]' |sed "s/, / /g" ); \ + do build_args="--build-arg $i $build_args"; done fi if [ "{ref_arg}" != "None" ]; then build_args="$build_args --build-arg {ref_arg}={ref}" diff --git a/jjb/functest/functest-pi.yaml b/jjb/functest/functest-pi.yaml index 52dc042e4..ffca9ac67 100644 --- a/jjb/functest/functest-pi.yaml +++ b/jjb/functest/functest-pi.yaml @@ -126,11 +126,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 @@ -689,11 +691,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 diff --git a/jjb/functest/functest.yaml b/jjb/functest/functest.yaml index 31a448cde..7a0be506a 100644 --- a/jjb/functest/functest.yaml +++ b/jjb/functest/functest.yaml @@ -116,11 +116,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 @@ -579,11 +581,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 @@ -866,7 +870,8 @@ fi build_args="" if [ "{buildargs}" != "None" ]; then - build_args="{buildargs}" + for i in $(eval echo {buildargs} | tr -d '[]' |sed "s/, / /g" ); \ + do build_args="--build-arg $i $build_args"; done fi if [ "{ref_arg}" != "None" ]; then build_args="$build_args --build-arg {ref_arg}={ref}" diff --git a/jjb/functest/xtesting-pi.yaml b/jjb/functest/xtesting-pi.yaml index a935dcb76..4d2bd22d2 100644 --- a/jjb/functest/xtesting-pi.yaml +++ b/jjb/functest/xtesting-pi.yaml @@ -89,11 +89,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 @@ -259,11 +261,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml index ec613a682..1b22fdc91 100644 --- a/jjb/functest/xtesting.yaml +++ b/jjb/functest/xtesting.yaml @@ -89,11 +89,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 @@ -247,11 +249,13 @@ set +x volumes=; if [ "{volumes}" != "None" ]; then - for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done + 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 + 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 @@ -397,7 +401,8 @@ fi build_args="" if [ "{buildargs}" != "None" ]; then - build_args="{buildargs}" + for i in $(eval echo {buildargs} | tr -d '[]' |sed "s/, / /g" ); \ + do build_args="--build-arg $i $build_args"; done fi if [ "{ref_arg}" != "None" ]; then build_args="$build_args --build-arg {ref_arg}={ref}" |