feat(edge-connect-delete): added delete app instance and app deletion action
This commit is contained in:
parent
2c275da020
commit
f6cbb68550
2 changed files with 37 additions and 18 deletions
20
endpoint.sh
20
endpoint.sh
|
|
@ -18,17 +18,21 @@ main() {
|
|||
local cli_path="${temp_dir}/edge-connect-client"
|
||||
chmod +x "${cli_path}"
|
||||
|
||||
local -a args
|
||||
args=("--file" "${INPUT_CONFIG_FILE}")
|
||||
|
||||
if [[ "${INPUT_DRY_RUN}" == "true" ]]; then
|
||||
args+=("--dry-run")
|
||||
fi
|
||||
local -a args_instance_delete
|
||||
args_instance_delete=("--name" "${INPUT_NAME}-${INPUT_APPVERSION}-instance" "--org" "${INPUT_ORG}" "--region" "${INPUT_REGION}" "--cloudlet-org" "${INPUT_CLOUDLET_ORG}" "--cloudlet" "${INPUT_CLOUDLET}")
|
||||
|
||||
echo Executing: "${cli_path}" apply --auto-approve "${args[@]}"
|
||||
echo Executing: "${cli_path}" instance delete "${args_instance_delete[@]}"
|
||||
|
||||
# The CLI uses an interactive prompt, so we need to pipe "yes" to it.
|
||||
"${cli_path}" apply --auto-approve "${args[@]}"
|
||||
"${cli_path}" instance delete "${args_instance_delete[@]}"
|
||||
|
||||
local -a args_app_delete
|
||||
args_app_delete=("--name" "${INPUT_NAME}" "--version" "${INPUT_APPVERSION}" "--org" "${INPUT_ORG}" "--region" "${INPUT_REGION}")
|
||||
|
||||
echo Executing: "${cli_path}" app delete "${args_app_delete[@]}"
|
||||
|
||||
# The CLI uses an interactive prompt, so we need to pipe "yes" to it.
|
||||
"${cli_path}" app delete "${args_app_delete[@]}"
|
||||
}
|
||||
|
||||
main
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue