diff options
author | Guillaume Lambert <guillaume.lambert@orange.com> | 2021-03-11 13:42:23 +0100 |
---|---|---|
committer | Guillaume Lambert <guillaume.lambert@orange.com> | 2021-06-16 17:31:03 +0000 |
commit | 134188daef48f9c1fadad5b26b4fb1e6417e4304 (patch) | |
tree | 05c74c5b3dee688de0d52e616a5f286a27955081 /kubernetes/robot | |
parent | f11d35a6320c98785c6c2ec2a84c8a2988a4b732 (diff) |
[COMMON] Fix $BASH_SOURCE and pushd/popd bashisms
pointed out by checkbashisms.
Issue-ID: OOM-2643
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: Ic9c4edc0fc6bd94a95bcb85d84379e868fb09930
Diffstat (limited to 'kubernetes/robot')
-rwxr-xr-x | kubernetes/robot/instantiate-k8s.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kubernetes/robot/instantiate-k8s.sh b/kubernetes/robot/instantiate-k8s.sh index f4f6b04e4c..623870b9f3 100755 --- a/kubernetes/robot/instantiate-k8s.sh +++ b/kubernetes/robot/instantiate-k8s.sh @@ -1,4 +1,5 @@ #!/bin/bash + # Copyright 2019 AT&T Intellectual Property. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +THIS_DIR="$( cd "$( dirname "$0" )" >/dev/null 2>&1 && pwd )" NAMESPACE= FOLDER= @@ -138,13 +139,13 @@ kubectl --namespace $NAMESPACE cp ${POD}:share/logs/$OUTPUT_FOLDER/summary/stack kubectl --namespace $NAMESPACE cp ${POD}:share/logs/$OUTPUT_FOLDER/summary/results.json "$OUTPUT_DIRECTORY"/results.json kubectl --namespace $NAMESPACE cp ${POD}:share/logs/$OUTPUT_FOLDER/log.html "$OUTPUT_DIRECTORY"/log.html -pushd . +initdir=$(pwd) # echo -e "import hashlib\nwith open(\"README.md\", \"r\") as f: bytes = f.read()\nreadable_hash = hashlib.sha256(bytes).hexdigest()\nprint(readable_hash)" | python cd "$OUTPUT_DIRECTORY" tar -czvf vnf_heat_results.tar.gz * -popd +cd $initdir echo "VNF test results: $OUTPUT_DIRECTORY/vnf_heat_results.tar.gz" |