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
fix: bundle install scripts in release archives (#504) (#1011)
* fix: bundle install scripts in release archives (#504)
Release .tgz archives built by goreleaser only shipped plugin.yaml, the
binary, README and LICENSE, but plugin.yaml defines install/update hooks
that call install-binary.sh / install-binary.ps1. Extracting a release
.tgz and running 'helm plugin install ./diff' therefore failed with
'install-binary.sh: not found'.
- .goreleaser.yml: bundle install-binary.sh and install-binary.ps1 in
every archive.
- install-binary.sh / install-binary.ps1: skip the (now redundant)
binary download when the platform binary is already staged in
HELM_PLUGIN_DIR during install. Update mode always re-downloads.
- release workflow: snapshot-only smoke test asserting every archive
bundles plugin.yaml, both install scripts, and the binary.
- README: note that extracting a release .tgz and running
helm plugin install ./diff now works directly.
Fixes#504
Signed-off-by: yxxhero <aiopsclub@163.com>
* fix(ci): accept .exe suffix in archive smoke test
Windows archives bundle diff/bin/diff.exe (not diff/bin/diff). The core
fix is confirmed working: all archives (incl. Windows) now bundle the
install scripts and binary.
Signed-off-by: yxxhero <aiopsclub@163.com>
* fix(install): retry binary download with backoff
The git-clone install path resolves to releases/latest/download/<asset>,
which can 404 during a release window when the new release is published
but its assets are not fully uploaded yet. curl -sSf under 'set -e'
failed immediately with no retry.
Add a 5-attempt retry loop with linear backoff (3s,6s,9s,12s) around the
curl/wget download in install-binary.sh, and equivalent try/catch retry
in install-binary.ps1. This absorbs the release upload window and
general transient network errors. The archive-install path is unaffected
(it skips the download entirely via the existing guard).
Signed-off-by: yxxhero <aiopsclub@163.com>
* ci: add end-to-end archive install test for #504
Reproduces the issue #504 scenario in CI: extracts a snapshot linux
archive, runs 'helm plugin install ./diff', asserts the install hook
skips the network download (bundled binary already staged) and that
'helm diff version' runs. Prevents regressions in the archive-install
path.
Signed-off-by: yxxhero <aiopsclub@163.com>
---------
Signed-off-by: yxxhero <aiopsclub@163.com>
If installing this in an offline/airgapped environment, download the platform-specific binary archive (e.g., `helm-diff-linux-amd64.tgz` or `helm-diff-windows-amd64.tgz`) from [releases](https://github.com/databus23/helm-diff/releases). Make sure to select the correct `.tgz` file for your operating system and architecture.
27
27
28
+
The release archives include everything needed to install the plugin (binary, `plugin.yaml`, and the install scripts). The simplest way to install offline is to extract the archive and point `helm plugin install` at the extracted directory:
29
+
30
+
```
31
+
tar xzf helm-diff-linux-amd64.tgz # extracts into a ./diff directory
32
+
helm plugin install ./diff
33
+
```
34
+
35
+
The install script detects that the binary is already bundled and skips the GitHub download.
36
+
37
+
Alternatively, if you keep a separate local checkout of the plugin source, you can point the installer at a downloaded `.tgz` via the `HELM_DIFF_BIN_TGZ` environment variable.
38
+
28
39
Set `HELM_DIFF_BIN_TGZ` to the absolute path to the downloaded binary archive:
0 commit comments