summaryrefslogtreecommitdiffstats
path: root/kubernetes/robot
diff options
context:
space:
mode:
authorGuillaume Lambert <guillaume.lambert@orange.com>2021-03-12 13:53:18 +0100
committerGuillaume Lambert <guillaume.lambert@orange.com>2021-09-22 09:17:18 +0000
commit85b1492555d765b14864e0d2d59db7a50cdccaf0 (patch)
treeaea3a348a63c939b1c4dfa4f1bc1162ebbd9df0c /kubernetes/robot
parentb62b9cf9e7e5248972baa619c6d015459187cd64 (diff)
[COMMON] Enforce checkbashisms tox profile
- add checkbahims to tox.ini default profiles - remove -f options to unforce bashisms detection in explicit bash scripts and to differentiate treatments between bash and sh - migrate #!/bin/bash shebangs to #!/bin/sh for scripts without bashisms The following scripts have not been migrated since they still use bashisms difficult to migrate (mostly arrays - more details below) ./kubernetes/common/mariadb-init/resources/config/db_init.sh ./kubernetes/portal/components/portal-mariadb/resources/config/ \ mariadb/docker-entrypoint.sh ./kubernetes/helm/plugins/deploy/deploy.sh ./kubernetes/helm/plugins/undeploy/undeploy.sh ./kubernetes/sdnc/components/sdnc-prom/resources/bin/ensureSdncActive.sh $ find . -not -path '*/\.*' -name *.sh -exec checkbashisms -f {} + 2>&1\ | grep line | cut -d' ' -f 7- | sort | uniq -c | sort -k1,1nr 18 (bash arrays, ${name[0|*|@]}): 2 (declare): 1 ($FUNCNAME): 1 (shopt): 1 (trap with ERR|DEBUG|RETURN): https://mywiki.wooledge.org/Bashism#Arrays https://mywiki.wooledge.org/Bashism#Special_Variables https://mywiki.wooledge.org/Bashism#Builtins https://www.oilshell.org/release/0.5.alpha2/test/spec.wwz/builtin-trap.html Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Id06ad1d45004321a293bdd26038d8da5f7b6b4ac
Diffstat (limited to 'kubernetes/robot')
-rwxr-xr-xkubernetes/robot/demo-k8s.sh3
-rwxr-xr-xkubernetes/robot/ete-k8s.sh2
-rwxr-xr-xkubernetes/robot/eteHelm-k8s.sh2
-rwxr-xr-xkubernetes/robot/instantiate-k8s.sh2
-rwxr-xr-xkubernetes/robot/scripts/etescript/hvves-etescript.sh2
-rwxr-xr-xkubernetes/robot/scripts/etescript/security-etescript.sh2
-rwxr-xr-xkubernetes/robot/scripts/etescript/vnfsdk-etescript.sh2
7 files changed, 8 insertions, 7 deletions
diff --git a/kubernetes/robot/demo-k8s.sh b/kubernetes/robot/demo-k8s.sh
index 37631bc673..439390525f 100755
--- a/kubernetes/robot/demo-k8s.sh
+++ b/kubernetes/robot/demo-k8s.sh
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+
# Copyright (C) 2018 Amdocs, Bell Canada
# Modifications Copyright (C) 2019 Samsung
# Modifications Copyright (C) 2020 Nokia
diff --git a/kubernetes/robot/ete-k8s.sh b/kubernetes/robot/ete-k8s.sh
index 01cf0922fa..4ef8f462f0 100755
--- a/kubernetes/robot/ete-k8s.sh
+++ b/kubernetes/robot/ete-k8s.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright © 2018 Amdocs, Bell Canada
#
diff --git a/kubernetes/robot/eteHelm-k8s.sh b/kubernetes/robot/eteHelm-k8s.sh
index 8b74da77f8..1b31c16e81 100755
--- a/kubernetes/robot/eteHelm-k8s.sh
+++ b/kubernetes/robot/eteHelm-k8s.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
#
diff --git a/kubernetes/robot/instantiate-k8s.sh b/kubernetes/robot/instantiate-k8s.sh
index 623870b9f3..aef812b143 100755
--- a/kubernetes/robot/instantiate-k8s.sh
+++ b/kubernetes/robot/instantiate-k8s.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright 2019 AT&T Intellectual Property. All rights reserved.
#
diff --git a/kubernetes/robot/scripts/etescript/hvves-etescript.sh b/kubernetes/robot/scripts/etescript/hvves-etescript.sh
index eb04e07fa1..16fec57b15 100755
--- a/kubernetes/robot/scripts/etescript/hvves-etescript.sh
+++ b/kubernetes/robot/scripts/etescript/hvves-etescript.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright © 2019 Nokia
#
diff --git a/kubernetes/robot/scripts/etescript/security-etescript.sh b/kubernetes/robot/scripts/etescript/security-etescript.sh
index bf51329431..a114cf59ea 100755
--- a/kubernetes/robot/scripts/etescript/security-etescript.sh
+++ b/kubernetes/robot/scripts/etescript/security-etescript.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
# Copyright 2019 Samsung Electronics Co., Ltd.
#
diff --git a/kubernetes/robot/scripts/etescript/vnfsdk-etescript.sh b/kubernetes/robot/scripts/etescript/vnfsdk-etescript.sh
index a93f109085..e23e5ed83b 100755
--- a/kubernetes/robot/scripts/etescript/vnfsdk-etescript.sh
+++ b/kubernetes/robot/scripts/etescript/vnfsdk-etescript.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# SPDX-License-Identifier: Apache-2.0