Add smoke_test_binaries.sh to validate plugin binaries pre-release πͺΏβ¨ - #1813
Open
vzhang-stripe wants to merge 1 commit into
Open
Add smoke_test_binaries.sh to validate plugin binaries pre-release πͺΏβ¨#1813vzhang-stripe wants to merge 1 commit into
vzhang-stripe wants to merge 1 commit into
Conversation
Add a portable, dependency-free bash script that validates a built plugin binary is a launchable HashiCorp go-plugin server before it is published. For each binary in the given directory the script sets the plugin handshake environment variable (plugin_<shortname>, value read from the repo's .plugin file), launches the binary, and confirms it emits the go-plugin handshake line before terminating it. Binaries built for a different OS than the current runner are skipped, and the script exits non-zero on any failure so a release workflow can gate publishing on it. The script is intended to be shared/vendored by plugin release workflows and run between the build and publish steps. Committed-By-Agent: goose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minion run
π§βπ» Human Summary
π€ LLM Summary
Reviewers
r? @
cc @stripe/developer-products
Summary
Adds
scripts/smoke_test_binaries.sh, a portable, dependency-free bash script that validates a built plugin binary is a launchable HashiCorp go-plugin server before it is published. For each binary in a given directory it sets the plugin handshake env var (plugin_<shortname>, with the value read from the repo's.pluginfile β matching the host CLI'sMagicCookieKeyinpkg/plugins/plugin.go), launches the binary, and confirms it emits the go-plugin handshake line before terminating it. Binaries built for a different OS than the current runner are skipped, and the script exits non-zero on any failure so a release workflow can gate publishing on it.This is the shared, source-of-truth validation step from the plan; it is meant to be vendored/consumed by plugin release workflows and run between the build and publish steps.
Verified locally with
shellcheck/bash -nand against a fake plugin binary: a valid binary passes (exit 0), a crashing binary fails (exit 1), and argument/.plugin/empty-dir/non-executable cases behave as expected.