Skip to content

Commit

Permalink
Merge pull request #47 from mgueury/main
Browse files Browse the repository at this point in the history
Small fix for groups
  • Loading branch information
MarcGueury authored Jun 30, 2023
2 parents c4190b9 + 6f70a28 commit 2c80390
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion basis/bin/add_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ "$APIM_HOST" != "" ]; then
get_ui_url
if [ -f src/oke/ingress-app.yaml ]; then
ENDPOINT_GIT=src/oke/ingress-app.yaml
curl -k "https://${APIM_HOST}/ords/apim/rest/add_api?git_repo_url=${TF_VAR_git_url}&impl_name=${FIRST_LETTER_UPPERCASE}&icon_url=${TF_VAR_language}&runtime_console=https://cloud.oracle.com/api-gateway/gateways/$TF_VAR_apigw_ocid/deployments/$APIGW_DEPLOYMENT_OCID&version=${GIT_BRANCH}&endpoint_url=${UI_URL}/app/dept&endpoint_git_path=${ENDPOINT_GIT}&spec_git_path=src/app/openapi_spec.yaml&spec_type=OpenAPI"
fi
curl -k "https://${APIM_HOST}/ords/apim/rest/add_api?git_repo_url=${TF_VAR_git_url}&impl_name=${FIRST_LETTER_UPPERCASE}&icon_url=${TF_VAR_language}&runtime_console=https://cloud.oracle.com/api-gateway/gateways/$TF_VAR_apigw_ocid/deployments/$APIGW_DEPLOYMENT_OCID&version=${GIT_BRANCH}&endpoint_url=${UI_URL}/app/dept&endpoint_git_path=${ENDPOINT_GIT}&spec_git_path=src/app/openapi_spec.yaml&spec_type=OpenAPI"
fi
fi
6 changes: 2 additions & 4 deletions basis/bin/auto_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if declare -p | grep -q "__TO_FILL__"; then
echo
echo "Edit the file env.sh. Some variables needs to be filled:"
cat env.sh | grep __TO_FILL__
exit
exit 1
fi

if ! command -v jq &> /dev/null; then
Expand Down Expand Up @@ -198,9 +198,7 @@ if [ -f $STATE_FILE ]; then
fi

# Compute
if [ "$TF_VAR_deploy_strategy" == "compute" ]; then
get_attribute_from_tfstate "COMPUTE_IP" "starter_instance" "public_ip"
fi
get_attribute_from_tfstate "COMPUTE_IP" "starter_instance" "public_ip"

# Bastion
get_attribute_from_tfstate "BASTION_IP" "starter_bastion" "public_ip"
Expand Down
4 changes: 3 additions & 1 deletion basis/bin/done.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,6 @@ if [ ! -z "$UI_URL" ]; then
fi
fi


if [ -f $ROOT_DIR/src/after_done.sh ]; then
$ROOT_DIR/src/after_done.sh
fi
1 change: 0 additions & 1 deletion basis/bin/gen_auth_token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export ROOT_DIR=${BIN_DIR%/*}
if grep -q 'TF_VAR_auth_token="__TO_FILL__"' $ROOT_DIR/env.sh; then
echo "Generating a new AUTH_TOKEN"
get_user_details
echo TF_VAR_user_ocid=$TF_VAR_user_ocid
oci iam auth-token create --description "OCI_STARTER_TOKEN" --user-id $TF_VAR_user_ocid > auth_token.log 2>&1
export TF_VAR_auth_token=`cat auth_token.log | jq -r '.data.token'`

Expand Down
4 changes: 4 additions & 0 deletions basis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ export TARGET_DIR=$ROOT_DIR/target

cd $ROOT_DIR
mkdir -p $TARGET_DIR

# Show the log and save it in target/build.log
bin/build_all.sh $@ 2>&1 | tee $TARGET_DIR/build.log
# Return the exit code of build_all.sh
exit ${PIPESTATUS[0]}
2 changes: 1 addition & 1 deletion basis/destroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export ROOT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && p
export TARGET_DIR=$ROOT_DIR/target

cd $ROOT_DIR
bin/destroy_all.sh $@ 2>&1 | tee $TARGET_DIR/destroy.log
bin/destroy_all.sh $@ 2>&1 | tee $TARGET_DIR/destroy.log

0 comments on commit 2c80390

Please sign in to comment.