Packer
Git
@ethanmdavidson
A plugin for Packer which provides access to git.
- Community
Updated last year
- GitHub(opens in new tab)
Git
The Git plugin is able to interact with Git repos through Packer.
Installation
To install this plugin, copy and paste this code into your Packer configuration, then run packer init
.
packer {
required_plugins {
git = {
version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git"
}
}
}
Alternatively, you can use packer plugins install
to manage installation of this plugin.
$ packer plugins install github.com/ethanmdavidson/git
Manual Installation
You can find pre-built binary releases of the plugin here.
Or, 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.
Components
Data Sources
- git-commit - Retrieve information about a specific commit, e.g. the commit hash.
- git-repository - Retrieve information about a repository, e.g. the value of HEAD.
- git-tree - Retrieve the list of
files present in a specific commit, similar to
git ls-tree -r
.