Skip to content

Commit

Permalink
Set default value for e2e when cluster_profile is not defined
Browse files Browse the repository at this point in the history
Signed-off-by: CS Zhang <zhangcho@us.ibm.com>
  • Loading branch information
cs-zhang committed Feb 21, 2024
1 parent a0b87b6 commit 32d6329
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -4,6 +4,10 @@ set -o nounset
set -o errexit
set -o pipefail

# Set CLUSTER_PROFILE_DIR and CLUSTER_TYPE to default value if cluster_profile is not specified
CLUSTER_PROFILE_DIR=${CLUSTER_PROFILE_DIR:-$SHARED_DIR}
CLUSTER_TYPE=${CLUSTER_TYPE:-powervs}

export AWS_SHARED_CREDENTIALS_FILE=${CLUSTER_PROFILE_DIR}/.awscred
export AZURE_AUTH_LOCATION=${CLUSTER_PROFILE_DIR}/osServicePrincipal.json
export GCP_SHARED_CREDENTIALS_FILE=${CLUSTER_PROFILE_DIR}/gce.json
Expand Down
Expand Up @@ -638,8 +638,9 @@ cat > "/tmp/powervs-config.json" << EOF
{"id":"${POWERVS_USER_ID}","apikey":"${IBMCLOUD_API_KEY}","region":"${POWERVS_REGION}","zone":"${POWERVS_ZONE}","serviceinstance":"${POWERVS_SERVICE_INSTANCE_ID}","resourcegroup":"${POWERVS_RESOURCE_GROUP}"}
EOF
cp "/tmp/powervs-config.json" "${SHARED_DIR}/"
cp "/etc/sno-power-credentials/ssh-privatekey" "${SHARED_DIR}/"
#Copy the auth artifacts to shared dir for the next steps
scp -r "${SSH_OPTIONS[@]}" root@${BASTION}:${BASTION_CI_SCRIPTS_DIR}/auth/* ${SHARED_DIR}/.
scp "${SSH_OPTIONS[@]}" root@${BASTION}:${BASTION_CI_SCRIPTS_DIR}/auth/* "${SHARED_DIR}/"
echo "Finished prepare_next_steps"

echo "Test cluster accessiblity"
Expand Down

0 comments on commit 32d6329

Please sign in to comment.