Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build ODS-CI test image on release-2.13 branch #2125

Closed
wants to merge 3 commits into from

Conversation

liswang89
Copy link

No description provided.

Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
536 0 0 536 100

@@ -0,0 +1,21 @@
export SET_ENVIRONMENT=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [shellcheck] reported by reviewdog 🐶
Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. SC2148

ARTIFACT_DIR="/tmp"
fi

poetry run robot --include ${TEST_SUITE} -d ${ARTIFACT_DIR} -x xunit_test_result.xml -r test_report.html --variablefile ${TEST_VARIABLES_FILE} ${TEST_CASE_FILE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ARTIFACT_DIR="/tmp"
fi

poetry run robot --include ${TEST_SUITE} -d ${ARTIFACT_DIR} -x xunit_test_result.xml -r test_report.html --variablefile ${TEST_VARIABLES_FILE} ${TEST_CASE_FILE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

shellcheck

⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

USERS_ARR+=($prefix$additional_base_suffix)


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

USERS_ARR+=($prefix$additional_base_suffix)


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

PWS_ARR+=($pw)


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

USERS_ARR+=($prefix$additional_base_suffix$i)


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

USERS_ARR+=($prefix$additional_base_suffix$i)


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

USERS_ARR+=($prefix$additional_base_suffix$i)


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

PWS_ARR+=($pw)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

suffixes=$(echo $suffix_info | jq -c '.list[]')


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

declare -a suffixes_arr=($suffixes)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

quotes_flag=$(echo $suffix | egrep -o '".+"')


📝 [shellcheck] reported by reviewdog 🐶
egrep is non-standard and deprecated. Use grep -E instead. SC2196

quotes_flag=$(echo $suffix | egrep -o '".+"')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

complete_name=$(echo $complete_name | tr -d '"')


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

USERS_ARR+=($complete_name)


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

PWS_ARR+=($pw)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user_mapping=$(jq -r --arg idpname $1 --arg test_user $2 '.[][$idpname][$test_user]' configs/templates/user_config.json)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user_mapping=$(jq -r --arg idpname $1 --arg test_user $2 '.[][$idpname][$test_user]' configs/templates/user_config.json)


[shellcheck] reported by reviewdog 🐶
Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'. SC2116

test_user_regex=$(echo "${test_user_mapping/<RAND_BASE>/"[a-zA-Z]+"}")


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user_mapping=$(echo $users_string | egrep -o "$test_user_regex(,|$)" | tr -d ",")


📝 [shellcheck] reported by reviewdog 🐶
egrep is non-standard and deprecated. Use grep -E instead. SC2196

test_user_mapping=$(echo $users_string | egrep -o "$test_user_regex(,|$)" | tr -d ",")


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo $test_user_mapping


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo $test_user_mapping


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

idp=$(jq --arg idpname $1 '.[][$idpname]' configs/templates/user_config.json)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

pw=$(echo $idp | jq -r '.pw')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo Random $1 pasword: $pw


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo Random $1 pasword: $pw


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

prefixes=$(echo $idp | jq --raw-output '.prefixes[]')


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

prefixes=($prefixes)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

suffix_info=$(echo $idp | jq --arg pref $prefix '.suffixes[$pref]')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

suffix_info=$(echo $idp | jq --arg pref $prefix '.suffixes[$pref]')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

suffix_type=$(echo $suffix_info | jq --raw-output '.type')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

rand_length=$(echo $suffix_info | jq '.rand_length')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

generated_base_suffix=$(generate_rand_user_base_suffix $rand_length)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

generate_incremental_suffixes $generated_base_suffix


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

rand_length=$(echo $suffix_info | jq '.rand_length')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

generated_base_suffix=$(generate_rand_user_base_suffix $rand_length)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

generate_custom_suffixes $generated_base_suffix


🚫 [shellcheck] reported by reviewdog 🐶
Double quote array expansions to avoid re-splitting elements. SC2068

htp_users_string=$(printf ,%s ${HTP_USERS[@]})


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

cluster_adm_user=$(extract_testvariables_users_mapping htpasswd cluster_admin_username $htp_users_string)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo cluster admin username $cluster_adm_user


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo Cluster name is $CLUSTER_NAME


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm create idp -c "${CLUSTER_NAME}" -t htpasswd -n htpasswd --username $cluster_adm_user --password $htp_pw


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm create idp -c "${CLUSTER_NAME}" -t htpasswd -n htpasswd --username $cluster_adm_user --password $htp_pw


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm create user $cluster_adm_user --cluster $CLUSTER_NAME --group=cluster-admins


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm create user $cluster_adm_user --cluster $CLUSTER_NAME --group=cluster-admins


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

htp_string=$(htpasswd -b -B -n $cluster_adm_user $htp_pw)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

htp_string=$(htpasswd -b -B -n $cluster_adm_user $htp_pw)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

perform_oc_logic $OC_HOST $cluster_adm_user $htp_pw


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

perform_oc_logic $OC_HOST $cluster_adm_user $htp_pw


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

perform_oc_logic $OC_HOST $cluster_adm_user $htp_pw


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

oc get secret $secret_name -ojsonpath={.data.htpasswd} -n openshift-config | base64 --decode > configs/users.htpasswd


⚠️ [shellcheck] reported by reviewdog 🐶
This { is literal. Check expression (missing ;/\n?) or quote it. SC1083

oc get secret $secret_name -ojsonpath={.data.htpasswd} -n openshift-config | base64 --decode > configs/users.htpasswd


⚠️ [shellcheck] reported by reviewdog 🐶
This } is literal. Check expression (missing ;/\n?) or quote it. SC1083

oc get secret $secret_name -ojsonpath={.data.htpasswd} -n openshift-config | base64 --decode > configs/users.htpasswd


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

htpasswd -bB configs/users.htpasswd $htp_user $htp_pw


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

htpasswd -bB configs/users.htpasswd $htp_user $htp_pw


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

oc create secret generic $secret_name --from-file=htpasswd=configs/users.htpasswd --dry-run=client -o yaml -n openshift-config | oc replace -f -


🚫 [shellcheck] reported by reviewdog 🐶
Double quote array expansions to avoid re-splitting elements. SC2068

ldap_users_str=$(printf ,%s ${LDAP_USERS[@]})


🚫 [shellcheck] reported by reviewdog 🐶
Double quote array expansions to avoid re-splitting elements. SC2068

ldap_pws_str=$(printf ,%s ${LDAP_PWS[@]})


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

users_base64=$(echo -n $ldap_users_str | base64 -w 0)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

rand_base64=$(echo -n $ldap_pws_str | base64 -w 0)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

rand_base64=$(echo -n $rand | base64 -w 0)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm post /api/clusters_mgmt/v1/clusters/${ocm_clusterid}/identity_providers --body=configs/create_ldap_idp.jinja


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user=$(extract_testvariables_users_mapping ldap TEST_USER $ldap_users_str)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user_2=$(extract_testvariables_users_mapping ldap TEST_USER_2 $ldap_users_str)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user_3=$(extract_testvariables_users_mapping ldap TEST_USER_3 $ldap_users_str)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user_4=$(extract_testvariables_users_mapping ldap TEST_USER_4 $ldap_users_str)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

groups=$(jq -r --arg idpname ldap --arg pref $prefix '.[][$idpname].groups_map[$pref][]' configs/templates/user_config.json)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo $groups


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

groups=($groups)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

add_users_to_ocm_dedicated_admins $prefix


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

add_users_to_groups $group $prefix


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

add_users_to_groups $group $prefix


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

oc adm groups add-users $1 $user


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

oc adm groups add-users $1 $user


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm create user $user --cluster $CLUSTER_NAME --group=dedicated-admins


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm create user $user --cluster $CLUSTER_NAME --group=dedicated-admins


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo OCM cluster ID: $ocm_clusterid


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

done < <(ocm get /api/clusters_mgmt/v1/clusters/$ocm_clusterid/identity_providers)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

idp=$(jq --arg idpname $1 '.[][$idpname]' configs/templates/user_config.json)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

pw=$(echo $idp | jq -r '.pw')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user=$(echo $idp | jq -r '.TEST_USER')


⚠️ [shellcheck] reported by reviewdog 🐶
test is referenced but not assigned (for output from commands, use "$(test ...)" ). SC2154


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user_2=$(echo $idp | jq -r '.TEST_USER_2')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user_3=$(echo $idp | jq -r '.TEST_USER_3')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

test_user_4=$(echo $idp | jq -r '.TEST_USER_4')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

cluster_admin_user=$(echo $idp | jq -r '.cluster_admin_username')


⚠️ [shellcheck] reported by reviewdog 🐶
Variable was used as an array but is now assigned a string. SC2178

prefixes=$(echo $idp | jq --raw-output '.prefixes[]')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

prefixes=$(echo $idp | jq --raw-output '.prefixes[]')


⚠️ [shellcheck] reported by reviewdog 🐶
Expanding an array without an index only gives the first element. SC2128

prefixes=($prefixes)


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

prefixes=($prefixes)


⚠️ [shellcheck] reported by reviewdog 🐶
Expanding an array without an index only gives the first element. SC2128

if [[ $prefixes = "null" || -z "${prefixes// }" || ! ${#prefixes[@]} -gt 0 ]]; then


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

suffix_info=$(echo $idp | jq --arg pref $prefix '.suffixes[$pref]')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

suffix_info=$(echo $idp | jq --arg pref $prefix '.suffixes[$pref]')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

suffix_type=$(echo $suffix_info | jq --raw-output '.type')


[shellcheck] reported by reviewdog 🐶
Use -z instead of ! -n. SC2236

if [[ $suffix_info = "null" || -z "${suffix_info// }" || ! -n $suffix_info || $suffix_type = "null" || -z "${suffix_type// }" || ! -n $suffix_type ]]; then


[shellcheck] reported by reviewdog 🐶
Use -z instead of ! -n. SC2236

if [[ $suffix_info = "null" || -z "${suffix_info// }" || ! -n $suffix_info || $suffix_type = "null" || -z "${suffix_type// }" || ! -n $suffix_type ]]; then


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

n_users=$(echo $suffix_info | jq '.n_users')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

n_users=$(echo $suffix_info | jq '.n_users')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

rand_length=$(echo $suffix_info | jq '.rand_length')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

list=$(echo $suffix_info | jq -c '.list[]')


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

list=($list)


⚠️ [shellcheck] reported by reviewdog 🐶
Expanding an array without an index only gives the first element. SC2128

if [[ $list = "null" || -z "${list// }" || ! ${#list[@]} -gt 0 ]]; then


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

rand_length=$(echo $suffix_info | jq '.rand_length')


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

list=$(echo $suffix_info | jq -c '.list[]')


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

list=($list)


⚠️ [shellcheck] reported by reviewdog 🐶
Expanding an array without an index only gives the first element. SC2128

if [[ $list = "null" || -z "${list// }" || ! ${#list[@]} -gt 0 ]]; then


⚠️ [shellcheck] reported by reviewdog 🐶
Variable was used as an array but is now assigned a string. SC2178

groups=$(jq -r --arg idpname ldap --arg pref $prefix '.[][$idpname].groups_map[$pref][]' configs/templates/user_config.json)


📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

groups=$(jq -r --arg idpname ldap --arg pref $prefix '.[][$idpname].groups_map[$pref][]' configs/templates/user_config.json)


⚠️ [shellcheck] reported by reviewdog 🐶
Expanding an array without an index only gives the first element. SC2128

groups=($groups)


⚠️ [shellcheck] reported by reviewdog 🐶
Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. SC2206

groups=($groups)


⚠️ [shellcheck] reported by reviewdog 🐶
Expanding an array without an index only gives the first element. SC2128

if [[ $groups = "null" || -z "${groups// }" || ! ${#groups[@]} -gt 0 ]]; then

TEST_VARIABLES_FILE="test-variables.yml"

AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred"
AWS_ACCESS_KEY_ID=$(cat $AWS_SHARED_CREDENTIALS_FILE | grep aws_access_key_id | tr -d ' ' | cut -d '=' -f 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
AWS_ACCESS_KEY_ID appears unused. Verify use (or export if used externally). SC2034

TEST_VARIABLES_FILE="test-variables.yml"

AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred"
AWS_ACCESS_KEY_ID=$(cat $AWS_SHARED_CREDENTIALS_FILE | grep aws_access_key_id | tr -d ' ' | cut -d '=' -f 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086


AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred"
AWS_ACCESS_KEY_ID=$(cat $AWS_SHARED_CREDENTIALS_FILE | grep aws_access_key_id | tr -d ' ' | cut -d '=' -f 2)
AWS_SECRET_ACCESS_KEY=$(cat $AWS_SHARED_CREDENTIALS_FILE | grep aws_secret_access_key | tr -d ' ' | cut -d '=' -f 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
AWS_SECRET_ACCESS_KEY appears unused. Verify use (or export if used externally). SC2034


AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred"
AWS_ACCESS_KEY_ID=$(cat $AWS_SHARED_CREDENTIALS_FILE | grep aws_access_key_id | tr -d ' ' | cut -d '=' -f 2)
AWS_SECRET_ACCESS_KEY=$(cat $AWS_SHARED_CREDENTIALS_FILE | grep aws_secret_access_key | tr -d ' ' | cut -d '=' -f 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo "Performing oc login using TEST username and password"
username=$(yq eval '.TEST_USER.USERNAME' test-variables.yml)
password=$(yq eval '.TEST_USER.PASSWORD' test-variables.yml)
oc login "$OC_HOST" --username $username --password $password --insecure-skip-tls-verify=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

echo "Performing oc login using TEST username and password"
username=$(yq eval '.TEST_USER.USERNAME' test-variables.yml)
password=$(yq eval '.TEST_USER.PASSWORD' test-variables.yml)
oc login "$OC_HOST" --username $username --password $password --insecure-skip-tls-verify=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

oc login $1 --username $2 --password $3 || (echo "Login failed $i times. Trying again in 30 seconds (max 7 times)." && sleep 30)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

oc login $1 --username $2 --password $3 || (echo "Login failed $i times. Trying again in 30 seconds (max 7 times)." && sleep 30)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

oc login $1 --username $2 --password $3 || (echo "Login failed $i times. Trying again in 30 seconds (max 7 times)." && sleep 30)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm login --token=${OCM_TOKEN} --url=${OCM_ENV} ;\

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm login --token=${OCM_TOKEN} --url=${OCM_ENV} ;\

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

ocm login --token=${OCM_TOKEN}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. SC2002

cat /dev/urandom | tr -dc "0-9a-zA-Z@#$%_+=" | head -c "${length}"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
$/${} is unnecessary on arithmetic variables. SC2004

array[$RANDOM]=$i

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [shellcheck] reported by reviewdog 🐶
Double quote array expansions to avoid re-splitting elements. SC2068

printf %s ${array[@]::$1} $'\n'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

n_users=$(echo $suffix_info | jq '.n_users')

Copy link

sonarcloud bot commented Dec 10, 2024

@liswang89
Copy link
Author

Outdated.

@liswang89 liswang89 closed this Dec 10, 2024
@liswang89 liswang89 deleted the release-2.13 branch December 12, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant