From 31c8ee102bdbfcf25b797a45c14a3d18f1d2495d Mon Sep 17 00:00:00 2001 From: Graham Whaley Date: Thu, 18 Apr 2019 11:17:15 +0100 Subject: [PATCH] QA CI: Put /usr/local/go/bin in PATH The CI setup scripts may (likely will) install the correct version of golang into /usr/local/go/* when run. Ensure we have that in our PATH before the system default go, else the build will likely fail (due to using the wrong go version). The modification is in two places (playbook and role/task), as afaict there is no mechanism to set an ansible style `environment` at a higher level, such as the higher level Zuul jobs.yaml file, that will then persist across all sub-execution units. We could maybe place the required PATH into a var, and use that to set the PATH in the lower down items *if* maintenance becomes too much of a burden. Change-Id: I34205d5c4397d730eaf266122591140e0647b49b Signed-off-by: Graham Whaley --- playbooks/QA-check/run.yaml | 2 +- roles/CI-setup/tasks/main.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/QA-check/run.yaml b/playbooks/QA-check/run.yaml index 48c020d..e83abed 100644 --- a/playbooks/QA-check/run.yaml +++ b/playbooks/QA-check/run.yaml @@ -10,5 +10,5 @@ export CI=true export ZUUL=true export GOPATH=$HOME/go - export PATH=${GOPATH}/bin:/usr/sbin:$PATH + export PATH=${GOPATH}/bin:/usr/local/go/bin:/usr/sbin:$PATH .ci/run.sh diff --git a/roles/CI-setup/tasks/main.yaml b/roles/CI-setup/tasks/main.yaml index 53798be..00ad18d 100644 --- a/roles/CI-setup/tasks/main.yaml +++ b/roles/CI-setup/tasks/main.yaml @@ -18,6 +18,6 @@ export GOPATH=$HOME/go export CI=true export ZUUL=true - export PATH=${GOPATH}/bin:/usr/sbin:$PATH + export PATH=${GOPATH}/bin:/usr/local/go/bin:/usr/sbin:$PATH .ci/install_go.sh -p -f .ci/setup.sh