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

Retrieve checksum from subfolder/filename #239

Merged
merged 5 commits into from
Mar 18, 2020
Merged

Conversation

sylviamoss
Copy link

This PR adds the implementation to retrieve a checksum from a file based on a subfolder + filename. For example:
Iso checksum file contains both below, differing only by the subfolder.

a264b6b009dfaa16286fdfd046a156a43587333b  ./hwe-netboot/mini.iso
27c39bac2cf4640c00cacfc8982b0ba39e7b7f96  ./netboot/mini.iso

The checksummed path is http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/mini.iso
We then verify wich checksum filename is contained by the checksummed path if none of the previous options was valid.

This is motivated by issue hashicorp/packer#8774

@sylviamoss sylviamoss changed the base branch from master to v2 March 17, 2020 14:55
Copy link
Contributor

@azr azr left a comment

Choose a reason for hiding this comment

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

Super Nice one; LGTM !

.gitignore Outdated Show resolved Hide resolved
Copy link

@mildwonkey mildwonkey left a comment

Choose a reason for hiding this comment

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

Looks good to me!
I ran terraform's test locally against this branch for good measure, no concerns here :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants