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

fix: added script to check for and delete packer cache #24

Merged
merged 4 commits into from
Nov 14, 2023

Conversation

lennessyy
Copy link
Contributor

Describe the Change

This PR adds a script to the tutorials container that checks for existing packer cache. If it is found, the script deletes it.

Review Changes

🎫 Jira Ticket

@lennessyy lennessyy requested a review from a team as a code owner November 13, 2023 18:42
@lennessyy lennessyy requested review from karl-cardenas-coding, addetz and caroldelwing and removed request for a team November 13, 2023 18:42
@lennessyy
Copy link
Contributor Author

I added some logic so it doesn't throw an error if it doesn't find existing cache.

Copy link
Collaborator

@karl-cardenas-coding karl-cardenas-coding left a comment

Choose a reason for hiding this comment

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

Feedback provided.

edge/vmware/clone_vm_template/delete-packer-cache.sh Outdated Show resolved Hide resolved
source /edge/vmware/clone_vm_template/setenv.sh

# Check if the packer cache exists
CACHE_EXISTS=$(govc datastore.ls -ds=$vcenter_datastore /packer_cache 2>/dev/null)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure sending to null is the answer. What if the error is related due to access? I think if an error, then we should output that error to help the user.

#25)

* fix: added new tools such as oras and awscli, updated Terraform files to include OCI registries

* chore: updated the template and documentation

* docs: minor update to the terraform.tfvars file

* docs: minor update to the terraform.tfvars file

---------

Co-authored-by: Karl Cardenas <[email protected]>
@lennessyy lennessyy merged commit d525fc6 into main Nov 14, 2023
3 checks passed
@lennessyy lennessyy deleted the add-pacaker-cache-delete branch November 14, 2023 16:31
Copy link

🎉 This PR is included in version 1.0.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants