Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

ci: lib.sh: set PATH for sudo even in no-go case#1498

Merged
GabyCT merged 1 commit intokata-containers:masterfrom
grahamwhaley:20190424_install_gopath
Apr 24, 2019
Merged

ci: lib.sh: set PATH for sudo even in no-go case#1498
GabyCT merged 1 commit intokata-containers:masterfrom
grahamwhaley:20190424_install_gopath

Conversation

@grahamwhaley
Copy link
Copy Markdown
Contributor

If the scripts failed to find go or a GOPATH they would follow a different
path and invoke sudo -E, but not with the PATH=$PATH argument. This
normally works on oru CIs, but on Zuul, where the old distro go version
will be in the sudo path first, it fails with a 'go too old' error.
Pass the CI env/user PATH into the sudo to ensure we pick up
the correct golang.

Fixes: #1479

Signed-off-by: Graham Whaley graham.whaley@intel.com

If the scripts failed to find go or a GOPATH they would follow a different
path and invoke `sudo -E`, but not with the PATH=$PATH argument. This
normally works on oru CIs, but on Zuul, where the old distro go version
will be in the sudo path first, it fails with a 'go too old' error.
Pass the CI env/user PATH into the `sudo` to ensure we pick up
the correct golang.

Fixes: kata-containers#1479

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
@grahamwhaley
Copy link
Copy Markdown
Contributor Author

/test
I was tempted to squash that function a bit, as it feels like the only difference now between the two sudos is the error message, and we could handle that with a pre-check. But, no harm... let's see how it flies.

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.

3 participants