Community
Git Data Sources
The Git plugin is able to fetch data from Git repositories. The following data sources are currently supported:
- commit - Retrieve information about a commit, e.g. the commit hash.
- repository - Retrieve information about a repository, e.g. the value of HEAD.
- tree - Retrieve the list of
files present in a specific commit, similar to
git ls-tree -r
.
How to use this plugin
From Packer v1.7.0, copy and paste this code into your Packer
configuration to install this plugin. Then, run
packer init
.
Manual Installation
You can find pre-built binary releases of the plugin here.
Alternatively, if you prefer to build the plugin from its source
code, clone the GitHub repository
locally and run the command make build
from the root
directory. Upon successful compilation, a packer-plugin-git
plugin
binary file can be found in the root directory.
Once the binary is downloaded or built, please follow the Packer documentation on installing a plugin.