Skip to content

Conversation

@rishabh998186
Copy link
Contributor

Downloaded plugin binaries currently show unspecified version information:


$ curl -Lo wait_plugin https://github.com/pipe-cd/pipecd/releases/download/pkg%2Fapp%2Fpipedv1%2Fplugin%2Fwait%2Fv0.1.1/wait_v0.1.1_darwin_arm64
$ ./wait_plugin version
Version: unspecified, GitCommit: unspecified, BuildDate: unspecified

This makes it impossible to verify which version of a plugin is deployed.

Root Cause
The plugin_release workflow wasn't passing version information when building plugins, and the Makefile's build/plugin target didn't inject version details via ldflags like the build/go target does.

Changes
1 - Updated Makefile
Modified the build/plugin target to inject version/commit/buildDate via ldflags, using the same pattern as build/go:

  • Added BUILD_VERSION, BUILD_COMMIT, BUILD_DATE variables

  • Updated BUILD_OPTS to include version ldflags

2 - Updated workflow
Modified .github/workflows/plugin_release.yaml to pass BUILD_VERSION=${{ inputs.version }} to all plugin build commands (all 4 platform targets)

Test
Verified the fix works locally:

$ make build/plugin PLUGINS=wait BUILD_VERSION=v0.1.1-test
$ ./.artifacts/plugins/wait version
Version: v0.1.1-test, GitCommit: 03df4a5a6d7be22a238c88fe3d741bbf3fb27e20, BuildDate: 20251010-074520

Also tested with the kubernetes plugin to confirm the fix works generically across all plugins:

$ make build/plugin PLUGINS=kubernetes BUILD_VERSION=v0.2.0-test
$ ./.artifacts/plugins/kubernetes version
Version: v0.2.0-test, GitCommit: 03df4a5a6d7be22a238c88fe3d741bbf3fb27e20, BuildDate: 20251010-074748
 

fixes #6306

Signed-off-by: rishabh998186 <rishabh998186@gmail.com.com>
@rishabh998186 rishabh998186 force-pushed the bugfix/plugin-version-unspecified branch 2 times, most recently from ddf2f7b to 17ce23d Compare October 10, 2025 08:45
Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you 👍

@khanhtc1202 khanhtc1202 enabled auto-merge (squash) October 10, 2025 09:01
@khanhtc1202 khanhtc1202 merged commit 738066c into pipe-cd:master Oct 10, 2025
43 checks passed
@github-actions github-actions bot mentioned this pull request Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure version of plugins binary showing correctly

2 participants