-
Notifications
You must be signed in to change notification settings - Fork 139
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
cleanup files created by deploy.sh #192 #199
Conversation
# clean up MLZ config resources | ||
echo "INFO: cleaning up MLZ resources with tag 'DeploymentName=${mlz_env_name}'..." | ||
. "${this_script_path}/scripts/config/config_clean.sh" "${mlz_config_file}" | ||
# clean up reources that was created by deploy.sh | ||
rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path:?}/${tfvars_filename}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the unset validator :?
? I want to say set -e
should throw on a bad reference/path.
rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path:?}/${tfvars_filename}" | |
rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path}/${tfvars_filename}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with removing it. This is the output from running shellcheck.
$ shellcheck src/clean.sh
In src/clean.sh line 102:
rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path}/${tfvars_filename}"
^-- SC2115: Use "${var:?}" to ensure this never expands to / .
.... So I added ':?' to resolve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. Thanks for sharing!
# clean up MLZ config resources | ||
echo "INFO: cleaning up MLZ resources with tag 'DeploymentName=${mlz_env_name}'..." | ||
. "${this_script_path}/scripts/config/config_clean.sh" "${mlz_config_file}" | ||
# clean up reources that was created by deploy.sh | ||
rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path:?}/${tfvars_filename}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. Thanks for sharing!
Adding the word INFO for consistency. Co-authored-by: Glenn Musa <[email protected]>
* cleanup files created by deploy.sh Azure#192 * removing all components .tfvars files * used explicit tiers instead of '*' * added function to delete files in dir by name * changed order file deletes * Update src/clean.sh Adding the word INFO for consistency. Co-authored-by: Glenn Musa <[email protected]> Co-authored-by: jjansen23 <[email protected]> Co-authored-by: Glenn Musa <[email protected]>
Description
Deleted the .mlzconfig and the .tfvars that was created by deploy.sh
Issue reference
The issue this PR will close: #192
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
shellcheck
.vscode/extensions.json
.)