-
Notifications
You must be signed in to change notification settings - Fork 330
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
refactor: Use Git branch / tag for versioning #385
Conversation
@tenthirtyam Please let me know what you think about this code change and I will add the other operating systems / releases. |
Hi @dhoppe 👋 Could you kindly open an enhancement request for this refactoring and link the pull request? Thanks! Ryan Johnson |
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.
Initial testing from a git clone...
CONFIRM: Build a Ubuntu Server 22.04 LTS (cloud-init) Template for VMware vSphere?
Continue? (y/n)
y
Building a Ubuntu Server 22.04 LTS (cloud-init) Template for VMware vSphere...
Initializing HashiCorp Packer and required plugins...
Starting the build....
Error: Datasource.Execute failed: reference not found
on /Users/tenthirtyam/Downloads/packer-examples-for-vsphere-build_version/builds/linux/ubuntu/22-04-lts/linux-ubuntu.pkr.hcl line 26:
(source code not available)
Error: Unsupported attribute
on /Users/tenthirtyam/Downloads/packer-examples-for-vsphere-build_version/builds/linux/ubuntu/22-04-lts/linux-ubuntu.pkr.hcl line 41:
(source code not available)
This object does not have an attribute named "vm_name".
Error: Unsupported attribute
on /Users/tenthirtyam/Downloads/packer-examples-for-vsphere-build_version/builds/linux/ubuntu/22-04-lts/linux-ubuntu.pkr.hcl line 54:
(source code not available)
This object does not have an attribute named "build_version".
Error: Unsupported attribute
on /Users/tenthirtyam/Downloads/packer-examples-for-vsphere-build_version/builds/linux/ubuntu/22-04-lts/linux-ubuntu.pkr.hcl line 34:
(source code not available)
This object does not have an attribute named "git-repository".
Error: Unsupported attribute
on /Users/tenthirtyam/Downloads/packer-examples-for-vsphere-build_version/builds/linux/ubuntu/22-04-lts/linux-ubuntu.pkr.hcl line 35:
(source code not available)
This object does not have an attribute named "build_version".
4685101
to
5b6195c
Compare
@tenthirtyam Could you please check if the Git plugin has been installed?
I do not have any issues, except the missing Ansible config related to OpenSSH 9.x.
|
@dhoppe - yes, it's the second plugin shown below: ➜ packer plugins installed
/Users/tenthirtyam/.packer.d/plugins/github.com/rgl/windows-update/packer-plugin-windows-update_v0.14.1_x5.0_darwin_amd64
/Users/tenthirtyam/.packer.d/plugins/github.com/ethanmdavidson/git/packer-plugin-git_v0.3.2_x5.0_darwin_amd64
/Users/tenthirtyam/.packer.d/plugins/github.com/hashicorp/virtualbox/packer-plugin-virtualbox_v1.0.4_x5.0_darwin_amd64
/Users/tenthirtyam/.packer.d/plugins/github.com/hashicorp/vmware/packer-plugin-vmware_v1.0.7_x5.0_darwin_amd64
/Users/tenthirtyam/.packer.d/plugins/github.com/hashicorp/vsphere/packer-plugin-vsphere_v1.1.0_x5.0_darwin_amd64 |
The issue above was related to simply downloading the source and attempting to run as-provided. The Configuration section of the README.md will need to be updated to reflect the use of: Cloning from
|
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.
Please update the README.md based on #385 (comment).
9f700be
to
cc4c1f7
Compare
I just updated the documentation and found a logical error. I have only determined the last available tag, but not the one actually used. |
e09b0f8
to
1cae0ab
Compare
I actually noticed the same with testing with multiple tags - just let me know when you're all set. This is a very nice enhancement - thank you! |
1cae0ab
to
ab4148a
Compare
I think this pull request is ready to be merged. I already fixed that issue because I do not need to fetch the tags. The data source PS: Time to go to bed. It is already late in Germany. ;) |
I'll review it tomorrow - thanks again for the enhancement suggestion! |
Updates `README.md`: - Adds link to `packer-plugin-git` as well as version used. - Updates the order for the Configuration section. Signed-off-by: Ryan Johnson <johnsonryan@vmware.com>
Updates `README.md` to remove duplicate warning in the configuration section. Signed-off-by: Ryan Johnson <johnsonryan@vmware.com>
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.
Reviewed and testing the implementation and documentation updates - LGTM! 🚀
Updates `CHANGELOG.md` to include enhancements included in #385. Signed-off-by: Ryan Johnson <johnsonryan@vmware.com>
Updates `CHANGELOG.md` to include enhancements included in #385. Signed-off-by: Ryan Johnson <johnsonryan@vmware.com>
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. |
Summary of Pull Request
The build already has the timestamp as
build_date
. Consider using the current Git branch / tag asbuild_version
, so that it is clear on which code base the image was built.Type of Pull Request
type/bug
type/feature
ortype/enhancement
type/docs
type/refactor
type/chore
Please describe:
Related to Existing Issues
Closes #388
Test and Documentation Coverage
Breaking Changes?