Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.69 KB

README.md

File metadata and controls

49 lines (36 loc) · 1.69 KB

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.