Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Add OS environment variable #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinpollet
Copy link

@kevinpollet kevinpollet commented Sep 24, 2020

Hello,

First, thanks for your work!

I've tried to install this Helm plugin on macos and because of the static download URL, the linux binary is always downloaded.

❯ helm plugin install https://github.com/rancher/helm-unittest
Downloading https://github.com/rancher/helm-unittest/releases/download/v0.1.6-rancher1/helm-unittest-linux-amd64.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   655  100   655    0     0   1966      0 --:--:-- --:--:-- --:--:--  1966
100 4799k  100 4799k    0     0  2694k      0  0:00:01  0:00:01 --:--:-- 4077k
Preparing to install into /Users/kevinpollet/Library/helm/plugins/helm-unittest
helm-unittest installed into /Users/kevinpollet/Library/helm/plugins/helm-unittest
/Users/kevinpollet/Library/helm/plugins/helm-unittest/install-binary.sh: line 44: /Users/kevinpollet/Library/helm/plugins/helm-unittest/untt: cannot execute binary file
Failed to install helm-unittest
For support, go to https://github.com/kubernetes/helm
Error: plugin install hook for "unittest" exited with error

In order to fix that behaviour I've added an OS environment variable which can be set to the desired value (e.g. macos, windows) which defaults to linux (to be backward compatible).

❯ CATTLE_HELM_UNITTEST_VERSION=v0.1.6-rancher1 ARCH=amd64 OS=macos helm plugin install .
Downloading https://github.com/rancher/helm-unittest/releases/download/v0.1.6-rancher1/helm-unittest-macos-amd64.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   655  100   655    0     0   1882      0 --:--:-- --:--:-- --:--:--  1882
100 4833k  100 4833k    0     0  2918k      0  0:00:01  0:00:01 --:--:-- 4823k
Preparing to install into /Users/kevinpollet/Library/helm/plugins/helm-unittest
helm-unittest installed into /Users/kevinpollet/Library/helm/plugins/helm-unittest
Running chart unittest written in YAML.

This renders your charts locally (without tiller) and
validates the rendered output with the tests defined in
test suite files. Simplest test suite file looks like
below:
...

@r3kzi
Copy link

r3kzi commented Oct 12, 2020

Any chance this could be merged? :-)

rawmind0 pushed a commit to rawmind0/helm-unittest that referenced this pull request Aug 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants