aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorguillaume.lambert <guillaume.lambert@orange.com>2022-05-10 22:04:23 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2023-03-27 15:08:21 +0200
commitde85f0b134d3e6aaeb3f81c93fd70dc72d92d785 (patch)
tree5aa43c0795efff279f463bb3aa3f4d5ef74fe58d /docker
parentc244314b781ccf6893efb45c259b8cf96fad98f2 (diff)
Stop bashing functest scripts
Though bash is a good interactive user shell and apart portability concerns, many UN*X systems and GNU+Linux distributions now prefers Almquist or Kornshell variants for scripting in order to improve the system performance and maintenability. https://wiki.ubuntu.com/DashAsBinSh https://mywiki.wooledge.org/Bashism https://en.wikipedia.org/wiki/Almquist_shell Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: I32c5490f9eab54e6cac594f3eac1e392edf8b272 (cherry picked from commit b9fedb6868306a6e3145b7ee851ea3a84353df9c)
Diffstat (limited to 'docker')
-rw-r--r--docker/benchmarking/hooks/post_checkout2
-rw-r--r--docker/core/Dockerfile5
-rw-r--r--docker/smoke/hooks/post_checkout2
-rw-r--r--docker/vnf/hooks/post_checkout2
4 files changed, 6 insertions, 5 deletions
diff --git a/docker/benchmarking/hooks/post_checkout b/docker/benchmarking/hooks/post_checkout
index 8d0e98124..c347524ea 100644
--- a/docker/benchmarking/hooks/post_checkout
+++ b/docker/benchmarking/hooks/post_checkout
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
from="${DOCKER_REPO%/*}/functest-core:${DOCKER_TAG}"
sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile
diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
index 2a7fc75c7..54f58a3a5 100644
--- a/docker/core/Dockerfile
+++ b/docker/core/Dockerfile
@@ -48,9 +48,10 @@ RUN apk -U upgrade && \
mkdir -p /etc/xtesting && \
cp /src/functest/functest/ci/logging.ini /etc/xtesting/ && \
cp /src/functest/functest/ci/logging.debug.ini /etc/xtesting/ && \
- bash -c "mkdir -p /var/lib/xtesting /home/opnfv" && \
+ sh -c "mkdir -p /var/lib/xtesting /home/opnfv" && \
ln -s /var/lib/xtesting /home/opnfv/functest && \
- bash -c "mkdir -p /home/opnfv/functest{/conf,/data,/images,/results} /home/opnfv/repos/vnfs" && \
+ sh -c "mkdir -p /home/opnfv/functest/conf /home/opnfv/functest/conf/data /home/opnfv/functest/conf/images /home/opnfv/functest/conf/results && \
+ mkdir -p /home/opnfv/repos/vnfs" && \
mkdir -p /etc/rally && \
printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'\n" > /etc/rally/rally.conf && \
printf "\n[openstack]\nneutron_bind_l2_agent_types = Open vSwitch agent,Linux bridge agent,OVN Controller Gateway agent\n" >> /etc/rally/rally.conf && \
diff --git a/docker/smoke/hooks/post_checkout b/docker/smoke/hooks/post_checkout
index 3e5670b4a..b23f6f449 100644
--- a/docker/smoke/hooks/post_checkout
+++ b/docker/smoke/hooks/post_checkout
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
from="${DOCKER_REPO%/*}/functest-tempest:${DOCKER_TAG}"
sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile
diff --git a/docker/vnf/hooks/post_checkout b/docker/vnf/hooks/post_checkout
index 8d0e98124..c347524ea 100644
--- a/docker/vnf/hooks/post_checkout
+++ b/docker/vnf/hooks/post_checkout
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
from="${DOCKER_REPO%/*}/functest-core:${DOCKER_TAG}"
sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile