Merge changes from topic "bashisms"
authorRobert Varga <nite@hq.sk>
Sat, 20 Aug 2022 14:06:43 +0000 (14:06 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 20 Aug 2022 14:06:43 +0000 (14:06 +0000)
* changes:
  Chore: migrate some scripts shebang to sh
  Fix: sourced files w/o arg bashisms

44 files changed:
jenkins-config/global-vars-releng.sh
jenkins-config/global-vars-sandbox.sh
jenkins-init-scripts/builder.sh
jenkins-init-scripts/devstack.sh
jenkins-init-scripts/docker.sh
jenkins-init-scripts/local-init.sh
jenkins-init-scripts/mininet-ubuntu.sh
jenkins-init-scripts/robot.sh
jjb/autorelease/autorelease-get-integration-test-variables.sh
jjb/autorelease/autorelease-macros.yaml
jjb/autorelease/branch-cut.sh
jjb/autorelease/generate-release-notes.sh
jjb/autorelease/version-bump.sh
jjb/docs/docs_version_bump.sh
jjb/docs/docs_version_bump_projects.sh
jjb/integration/common-functions.sh
jjb/integration/distribution/distribution-delete-snaphot-artifacts.sh
jjb/integration/integration-apex-run-tests.sh
jjb/integration/integration-cleanup-tmp.sh
jjb/integration/integration-cleanup-workspace.sh
jjb/integration/integration-configure-clustering.sh
jjb/integration/integration-deploy-controller-run-test.sh
jjb/integration/integration-deploy-openstack-run-test.sh
jjb/integration/integration-get-apex-addresses.sh
jjb/integration/integration-rebase-gerrit-patch.sh
jjb/integration/integration-run-test.sh
jjb/integration/integration-start-cluster-run-test.sh
jjb/netvirt/quagga-build.sh
jjb/opendaylight-infra-deploy-maven-site.sh
jjb/ovsdb/cleanup-docker.sh
jjb/ovsdb/include-setup-hwvtep-docker.sh
jjb/ovsdb/setup-docker.sh
jjb/packaging/helm-repo-init.sh
jjb/packaging/helm.yaml
jjb/packaging/openstack-k8s-cluster-delete.sh
jjb/packaging/openstack-k8s-config-export.sh
jjb/packaging/openstack-k8s-create-with-template.sh
jjb/packaging/openstack-k8s-deploy-helm.sh
jjb/releng-maven-mri-stage.sh
packer/provision/null_data.sh
packer/provision/rh-user_data.sh
packer/provision/system_reseal.sh
packer/provision/system_reseal_local_env.sh
scripts/delete-jobs.sh

index c7f45cb6440acd6a3cf74ce2cb1de9402818ba42..2b3fc306623c31ca93f45947b8822283a96bb1a7 100644 (file)
@@ -1,3 +1,5 @@
+#!/bin/sh
+
 CONTAINER_PULL_REGISTRY=nexus3.opendaylight.org:10003
 CONTAINER_PUSH_REGISTRY=nexus3.opendaylight.org:10002
 DOCKER_REGISTRY=nexus3.opendaylight.org
index 939673443ce1a9094c1c3cae60a44e92b0c0d036..c65dc77030ab54a401d98a957079fc935dbb4658 100644 (file)
@@ -1,3 +1,5 @@
+#!/bin/sh
+
 CONTAINER_PULL_REGISTRY=nexus3.opendaylight.org:10003
 CONTAINER_PUSH_REGISTRY=nexus3.opendaylight.org:10002
 DOCKER_REGISTRY=nexus3.opendaylight.org
index 367451f56e414ca0b3d74c26a7a20aae185071f8..b27028b253b3ea412ce9f80aa613066f0dff42b7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # vim: sw=2 ts=2 sts=2 et :
 
 yum clean all
index d8a87327650ab8a0625af634359eb5b0f0e47319..02f07960419bea5b2dcdaad933d807fd0ba0d84c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # It looks like the devstack gate is stomping on our dnsmasq setup which
 # therefore kills our ability to do proper lookups of some resources.
index d8963184cb5017fc49366cdeb0968e4f6bfa821c..7fa0825c896a40256a39af05a15d7b46c1052a69 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # make sure we don't require tty for sudo operations
 cat <<EOF >/etc/sudoers.d/89-jenkins-user-defaults
index d55974cae491e060aedf2156cb01708dd9ea541e..ff15325beddfa3eb289b70622a931fd2881c1568 100755 (executable)
@@ -12,5 +12,5 @@
 INIT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
 "${INIT_DIR}/system_type.sh"
 # shellcheck disable=SC1091
-source /tmp/system_type.sh
+. /tmp/system_type.sh
 "${INIT_DIR}/${SYSTEM_TYPE}.sh"
index 7f0cd569ef76c7f4bed431f669c4d8b37ca3a4f6..5feab209160cf8dd606cf377ddfed86623027465 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # make sure we don't require tty for sudo operations
 cat <<EOF >/etc/sudoers.d/89-jenkins-user-defaults
index 5fc0579d81c08e252db395c2392b58df815f9d02..ab13038869a465e952f04523788f80ea2901551b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # make sure we don't require tty for sudo operations
 cat <<EOF >/etc/sudoers.d/89-jenkins-user-defaults
index 95ff652ae7e723842b87c0239238304a5f995085..d309744a4bfb379f626b75af3688ed4439beb893 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2015, 2016 The Linux Foundation and others.
index cdfe01cdc6339c754c83bf5b169326274c9c9308..2cc67e01d42c31d91eaff7e020ffd9f9f91b895d 100644 (file)
@@ -46,7 +46,7 @@
           #!/bin/bash -l
           set -xe -o pipefail
           python3 -m venv $WORKSPACE/venv
-          source $WORKSPACE/venv/bin/activate
+          . $WORKSPACE/venv/bin/activate
           PYTHON="$WORKSPACE/venv/bin/python"
           $PYTHON -m pip install --upgrade networkx
           $PYTHON -m pip freeze
index 0c24b27c94f342d62a78328fb4dd521c2336952d..6d458b509dd6b5b8ac591f17575caf76d58c8bfa 100644 (file)
@@ -29,7 +29,7 @@ LOG_FILE="$WORKSPACE/archives/branch-cut.log"
 set -eu -o pipefail
 
 # shellcheck disable=SC1090
-source ~/lf-env.sh
+. ~/lf-env.sh
 
 lf-activate-venv "git-review==1.28"
 
index 6f42692cf9fd96a496102d44078b953c512c2fbe..48bd517d5d0655b0803c5e06eacda8ebb6357ac3 100644 (file)
@@ -14,7 +14,7 @@
 set -x
 
 # shellcheck disable=SC1090
-source ~/lf-env.sh
+. ~/lf-env.sh
 
 lf-activate-venv "git-review==1.28"
 
index f54e0a3e85a6c5f853b9edb6013a35e6c4ec223f..a95f9b32f592843547bc4ed991e6f9e9c96a0908 100644 (file)
@@ -27,7 +27,7 @@ BRANCH="$GERRIT_BRANCH"
 set -eu -o pipefail
 
 # shellcheck disable=SC1090
-source ~/lf-env.sh
+. ~/lf-env.sh
 
 lf-activate-venv "git-review==1.28"
 
index 90021ed03ad428670b8c11b743e1521bb7b51b58..54b241ec3d0a6724a3d5e5a375ef7e61fe29d6ef 100644 (file)
@@ -31,7 +31,7 @@ done
 set +u  # Allow unbound variables for virtualenv
 virtualenv --quiet "/tmp/v/git-review"
 # shellcheck source=/tmp/v/git-review/bin/activate disable=SC1091
-source "/tmp/v/git-review/bin/activate"
+. "/tmp/v/git-review/bin/activate"
 pip install --quiet --upgrade "pip==9.0.3" setuptools
 pip install --quiet --upgrade git-review
 git config --global --add gitreview.username "jenkins-$SILO"
index 31cb15994bb7b9a2270e840df0d2237b3f7f3f4e..05a2b8b0025df224b56a47c6d12a250a5eff94e5 100644 (file)
@@ -30,7 +30,7 @@ while getopts :h: opts; do
 done
 
 # shellcheck disable=SC1090
-source ~/lf-env.sh
+. ~/lf-env.sh
 
 lf-activate-venv "git-review==1.28"
 
index 801aa9c84ce44c7de20d713c4e62e4bd876a6fdc..6c967d0cb00c1d18940143b25126de8631bbcd8a 100644 (file)
@@ -279,7 +279,7 @@ function run_plan() {
         for line in $( grep -E -v '(^[[:space:]]*#|^[[:space:]]*$)' "${type}plan.txt" ); do
             printf "Executing %s...\\n" "${line}"
             # shellcheck source=${line} disable=SC1091
-            source "${line}"
+            . "${line}"
         done
     fi
     printf "Finished running %s plans\\n" "${type}"
index 825023d31958a73633162c5bec2e812f3697ccc6..b0ca5ae6b997bc88d10ede39473dbb247eeb589f 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/sh -x
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
index 84d06e59a3a3ab84b54103d52e55734fed7366eb..980f590a0cc79eb00f46c3a8548f8c7e62e24fdd 100644 (file)
@@ -3,7 +3,7 @@
 # ${ROBOT_VENV} comes from the integration-install-robotframework.sh
 # script.
 # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091
-source "${ROBOT_VENV}/bin/activate"
+. "${ROBOT_VENV}/bin/activate"
 source /tmp/common-functions.sh "${BUNDLEFOLDER}"
 # Ensure we fail the job if any steps fail.
 set -ex -o pipefail
@@ -45,7 +45,7 @@ ssh "$OPENSTACK_COMPUTE_NODE_2_IP" "sudo bash /tmp/extra_node_configs.sh"
 
 USER=heat-admin
 openstack object save OPNFV-APEX-SNAPSHOTS overcloudrc
-source overcloudrc
+. overcloudrc
 cat overcloudrc
 openstack hypervisor list
 
index eda0da905f9e0602b1b52c0d9b4619c6fc36699d..cda9a63095a2a6427b3d3df41b943f57732907e4 100644 (file)
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+
 echo "Cleaning up Robot installation..."
 
 # ${ROBOT_VENV} comes from the integration-install-robotframework.sh
index f824262aeb025c56f7692f171b486425bfe25d74..c7cecef61eade81ae924fb737107093c5fe03df4 100644 (file)
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+
 echo "Cleaning up the workspace..."
 
 # Leftover files from previous runs could be wrongly copied as results.
index 0fdcb9c587be2a2771f24f313e26e19dd0e6a16e..42f73e40a3c6ada706b24cc1c74a79b1c1f81b10 100644 (file)
@@ -4,7 +4,7 @@
 # ${ROBOT_VENV} comes from the integration-install-robotframework.sh
 # script.
 # shellcheck disable=SC1090,SC1091
-source "${ROBOT_VENV}/bin/activate"
+. "${ROBOT_VENV}/bin/activate"
 source /tmp/common-functions.sh "${BUNDLEFOLDER}"
 
 echo "#################################################"
index 825194e9c970c082144fced0f65e8de7f8981d2c..ee5e91fc7e953b5cf8515156529d23e62ea254ee 100755 (executable)
@@ -9,7 +9,7 @@ fi
 # ${ROBOT_VENV} comes from the integration-install-robotframework.sh
 # script.
 # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091
-source "${ROBOT_VENV}/bin/activate"
+. "${ROBOT_VENV}/bin/activate"
 source /tmp/common-functions.sh "${BUNDLEFOLDER}"
 
 
index 3520c7baff0c3db3fe638da432831cc2961bad4e..25bd8ecc4c9b199701631bed2a71db639d54254a 100644 (file)
@@ -3,7 +3,7 @@
 # ${ROBOT_VENV} comes from the integration-install-robotframework.sh
 # script.
 # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091
-source "${ROBOT_VENV}/bin/activate"
+. "${ROBOT_VENV}/bin/activate"
 source /tmp/common-functions.sh "${BUNDLEFOLDER}"
 # Ensure we fail the job if any steps fail.
 set -ex -o pipefail
@@ -1148,7 +1148,7 @@ export OS_TENANT_NAME=admin
 unset OS_CLOUD
 EOF
 
-source /tmp/os_netvirt_client_rc
+. /tmp/os_netvirt_client_rc
 
 echo "Get all versions before executing robot"
 echo "openstack --version"
index 005df554100e08850cb9c8cd83d6d1e60f862e02..6606860dd0e73ef411391ee6650547113ba155a8 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash -l
+#!/bin/sh -l
 # Get the Controller and Tools VM slave addresses
 
 set -ex -o pipefail
index b1fbae329b511a647a37389de6597bf4e1541fcb..ceb3457a7c97ae9bd09902f66f467a2289fb7d94 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # Make sure changes merged after patch creation are applied.
 
 set -exu
index fa9db12048a4b96073e225c07f2abbb21ac0528f..d1277b2b2adbee24501f7eacb11be70d514b7da5 100755 (executable)
@@ -8,7 +8,7 @@ fi
 # ${ROBOT_VENV} comes from the integration-install-robotframework.sh
 # script.
 # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091
-source "${ROBOT_VENV}/bin/activate"
+. "${ROBOT_VENV}/bin/activate"
 source /tmp/common-functions.sh "${BUNDLEFOLDER}"
 echo "#################################################"
 echo "## invoke Tests for non-karaf Controllers      ##"
index 03c2335fb5d1da1228eb00b444f11a0c530ad5a8..81c30c927114b60789466e1b6f18cdce98848e31 100644 (file)
@@ -4,7 +4,7 @@
 # ${ROBOT_VENV} comes from the integration-install-robotframework.sh
 # script.
 # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091
-source "${ROBOT_VENV}/bin/activate"
+. "${ROBOT_VENV}/bin/activate"
 source /tmp/common-functions.sh "${BUNDLEFOLDER}"
 # Ensure we fail the job if any steps fail.
 set -ex -o pipefail
index ca46597d1ec04386c46f4dc831d49eebe3ce43a4..294601ebd8a159ae1f0f5b0f505b5bf9d40c6f7e 100644 (file)
@@ -40,7 +40,6 @@ esac
 
 popd
 
-# todo: remove below lines once the scripts in zrpcd repos build the
-# source packages.
+# todo: remove below lines once the scripts in zrpcd repos build the src packages.
 # Ref: https://lists.opendaylight.org/pipermail/integration-dev/2018-July/012330.html
 tar cvzf "$WORKSPACE/upload_files/zrpcd.$(date +%F).tar.gz" "$(pwd)/zrpcd"
index 03d5c3d1b6ec2e6d20d9315c4b9a4751c6fd9f63..d27109499ec379a04755ad4f2c9ae9ccf84b8b5b 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
index 9aff8ed0eb3857c3d7db2ccfde5e071b3b38250b..ec7bbd312e7373ce704b57915c337d604b060e57 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 set -e
 
index 7860c4b72721a80c5ffdf6020d510e759f549b5c..f8d310302b2db866992181987d09ad359ff6922a 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 set -e
 
index 23f457545e9804933d570e0686142b2d70817566..ceb8539a67a93872bb61a60c43ded62c450901a0 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 set -e
 
index 60ef6352409812fc8c06529d75c08db0fb51bf56..5d584d2dbab812001f7d51a8ea545fa03caead0f 100644 (file)
@@ -15,7 +15,7 @@ set -e -o pipefail
 mkdir -p ".chartstorage"
 
 chartmuseum --port=6464 --storage="local" --storage-local-rootdir=".chartstorage" &> /dev/null &
-source helm.prop
+. helm.prop
 $HELM_BIN plugin install --version v0.9.0 https://github.com/chartmuseum/helm-push.git || true
 $HELM_BIN repo add local http://localhost:6464
 $HELM_BIN repo add opendaylight http://localhost:6464
index 5726b36d68c538e050fa350257246770614ef810..9d95315a303055bf811b702f9779a99bbf514f7e 100644 (file)
     helm_build_script: |
       #!/bin/bash
       set -x
-      source helm.prop
+      . helm.prop
       set -e -o pipefail
       cd helm/opendaylight
       helm3.7 version
index 7550ded663a8b5086f52ea4bc62bbbfe6b753dc3..a43a457e3fbde1d4cb76623efd14c36e3e0f0e19 100644 (file)
@@ -13,7 +13,7 @@ echo "---> Delete K8S cluster"
 
 set -eux -o pipefail
 # shellcheck disable=SC1090
-source ~/lf-env.sh
+. ~/lf-env.sh
 
 os_cloud="${OS_CLOUD:-vex}"
 cluster_name="${CLUSTER_NAME}"
index 883df0014f6fe39ffefe317b4056b456872543c8..5f834c7abf4abc5fa72ada980605e6780fc2918c 100644 (file)
@@ -13,7 +13,7 @@ echo "---> Export K8S cluster config and view nodes"
 set -eux -o pipefail
 
 # shellcheck disable=SC1090
-source ~/lf-env.sh
+. ~/lf-env.sh
 
 OS_TIMEOUT=5             # Wait time in minutes for OpenStack cluster nodes to come up.
 CLUSTER_NODE_RETRIES=15  # Number of times to retry waiting for a cluster nodes.
index 7513c9f5e59de9804b3bd9509bf27909c070b5c0..4adcf8f91c1dcd54f562ae2522128a18d85bcb19 100644 (file)
@@ -13,7 +13,7 @@ echo "---> Create K8S cluster with pre-existing template"
 
 set -eux -o pipefail
 # shellcheck disable=SC1090
-source ~/lf-env.sh
+. ~/lf-env.sh
 lf-activate-venv python-openstackclient python-magnumclient
 
 OS_TIMEOUT=20       # Wait time in minutes for OpenStack cluster to come up.
index d418168938fcaa5110189256d4d0ed82ab93b0e3..cf27ce4098d109420084915e58f6cc6f15ac97fe 100644 (file)
@@ -15,7 +15,7 @@ set -eux -o pipefail
 set -x
 
 # shellcheck disable=SC1090
-source ~/lf-env.sh
+. ~/lf-env.sh
 
 K8S_DEPLOY_LOG="$WORKSPACE/archives/k8s-kubectl-file.log"
 mkdir -p "$WORKSPACE/archives"
index 823a03f9622378a6f947f0c4c267aa33050387c2..3b5ddd56d08ae141bf90e65e08b8d24e4919e28a 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 echo "---> releng-maven-mri-stage.sh"
 # This script publishes artifacts to a staging repo in Nexus and exports the karaf bundle URL.
index 3fa6a3c9f017a56b663e25d4e2af3dc869124bac..dbaed3bff853d746d8a1b217cd334f06d01463fd 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # vi: ts=4 sw=4 sts=4 et :
 
 # Nothing to do for Ubuntu specific provisioning
index 6bddb244902554264896f3d78e5a0a75c9b317d4..8ad9abf7b079f94918e46acec4f472b31a637130 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # vi: ts=4 sw=4 sts=4 et :
 
 /bin/sed -i 's/ requiretty/ !requiretty/' /etc/sudoers;
index f8bc7dc5f9b4b865df8ebf7c06eb617c3fa3bb98..311fcc42188c45d1402f0a93ad4e7c4d94064b28 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # vim: sw=2 ts=2 sts=2 et :
 
index 041fffeff0d9b7455bc905cf0ec3821627e355d7..4b4e51593e17c2b958dee4243fdb14d582e5ac88 100644 (file)
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/bin/sh
 
 # Here add local env changes.
index ef8c84fa4db7cf5c656a4f60ee33182bd4713b85..7baf0a36d518cfebd545b95b230dbf08d5600a60 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Script to delete Jenkins jobs by searching a string.
 #