
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 <graham.whaley@intel.com>
24 lines
675 B
YAML
24 lines
675 B
YAML
- name: Run distribution specific tasks
|
|
include_tasks: "{{ lookup('first_found', file_list) }}"
|
|
vars:
|
|
file_list:
|
|
- "setup/{{ ansible_distribution }}.yaml"
|
|
- "setup/{{ ansible_os_family }}.yaml"
|
|
- "setup/default.yaml"
|
|
|
|
- name: Run Kata CI setup
|
|
args:
|
|
executable: /bin/bash
|
|
chdir: "{{ zuul.project.src_dir }}"
|
|
shell: |
|
|
set -x
|
|
# set a ${WORKSPACE}, so we look enough like a Jenkins env that
|
|
# the Kata ci script will execute
|
|
export WORKSPACE=$HOME
|
|
export GOPATH=$HOME/go
|
|
export CI=true
|
|
export ZUUL=true
|
|
export PATH=${GOPATH}/bin:/usr/local/go/bin:/usr/sbin:$PATH
|
|
.ci/install_go.sh -p -f
|
|
.ci/setup.sh
|