Releasing, Using and Debugging a Plugin
Understand the releasing, using, and debugging of a Packer plugin.
We'll cover the following
Packer has strict release requirements for allowing the packer binary to find and use a plugin. To have the plugin downloadable, the following requirements must be met:
Must be released on GitHub; no other source is allowed.
Have a repository named
packer-plugin-*
, where*
is the name of your plugin.Only use dashes, not underscore.
Must have a plugin release that includes certain assets we will describe.
The official release document can be found here.
Releasing a plugin
The first step for generating a release is to create a GNU Privacy Guard (GPG) key to sign releases. The GitHub instructions can be found here (but see notes directly underneath first).
Before you follow that document, remember these things while following the instructions:
Make sure you add the public key to your GitHub profile.
Do not use
$
or any other symbol in your passphrase, as it will cause issues.
Once that is completed, you need to add the private key to your repository so that the GitHub actions we define will be able to sign the releases. You will need to go to your GitHub repository's "Settings | Secrets". Click the provided "New Repository Secret" button.
Choose the name GPG_PRIVATE_KEY
.
In the value section, you will need to paste in your GPG private key that you can export with:
Get hands-on with 1400+ tech skills courses.