You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did research the code logic around loading plugins and it seems that the statement in docs that one can simply load plugins from a current directory by overriding PACKER_PLUGIN_PATH is not correct.
If you want to load a custom build of a plugin the following conditions must match:
Plugin name must now contain the API version, OS architecture and name and SHA sum.
There must be a SHASUM file next to the plugin file with a suffix
Must not be in a root directory that was passed via PACKER_PLUGIN_PATH
Here is an example of a Makefile that builds a plugin and prepares the environment in a way that one can execute it via make start:
The important trick is to create subdirectory ./build/plugins and build the executable there into correct form with underscores and then creating SHA256SUM suffixed file as well. Only then packer appears to load it.
I believe this is no longer correct:
https://developer.hashicorp.com/packer/docs/plugins/creation#testing-plugins
I did research the code logic around loading plugins and it seems that the statement in docs that one can simply load plugins from a current directory by overriding PACKER_PLUGIN_PATH is not correct.
If you want to load a custom build of a plugin the following conditions must match:
Here is an example of a Makefile that builds a plugin and prepares the environment in a way that one can execute it via
make start
:The important trick is to create subdirectory
./build/plugins
and build the executable there into correct form with underscores and then creating SHA256SUM suffixed file as well. Only then packer appears to load it.There was a thread about this bug but the strict rules did not allowed me to post more than 2 links in a single post, while I was trying to figure it out it blocked the whole thread and marked as spam: https://discuss.hashicorp.com/t/plugin-not-being-loaded-via-packer-plugin-path-from-root/72865
The text was updated successfully, but these errors were encountered: