Skip to content

Commit

Permalink
ocm: append '\' before shell command output
Browse files Browse the repository at this point in the history
OCM CI failing with the errors described in
cloud-bulldozer#268

Recently PR cloud-bulldozer#255 introduced some code for identifying last active
AWS key which is causing errors in CI run.
Inside run_ocm_benchmark.sh, the script ssh into ocm CI jumphost
and execute this code. So we need to add additional '\' before
parsing/using command output.
  • Loading branch information
venkataanil committed Nov 14, 2022
1 parent b672085 commit dad288e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dags/nocp/scripts/run_ocm_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ run_ocm_benchmark(){
rm -rf /tmp/environment_new.txt vars.sh
echo "Clean-up existing OSD access keys.."
AWS_KEY=$(aws iam list-access-keys --user-name OsdCcsAdmin --output text --query 'AccessKeyMetadata[*].AccessKeyId')
LEN_AWS_KEY=`echo $AWS_KEY | wc -w`
if [[ ${LEN_AWS_KEY} -eq 2 ]]; then
aws iam delete-access-key --user-name OsdCcsAdmin --access-key-id `printf ${AWS_KEY[0]}`
AWS_KEY=\$(/usr/bin/aws iam list-access-keys --user-name OsdCcsAdmin --output text --query 'AccessKeyMetadata[*].AccessKeyId')
LEN_AWS_KEY=\$(echo \$AWS_KEY | wc -w)
if [[ \${LEN_AWS_KEY} -eq 2 ]]; then
/usr/bin/aws iam delete-access-key --user-name OsdCcsAdmin --access-key-id \$(printf \${AWS_KEY[0]})
fi
echo "Creating aws key with admin user for OCM testing"
admin_key=\$(/usr/bin/aws iam create-access-key --user-name OsdCcsAdmin --output json)
Expand Down

0 comments on commit dad288e

Please sign in to comment.