zuul-jobs/roles/go/tasks/main.yaml
vass 0ee411860a Adds go jobs and roles.
Adds jobs to test and build go packages.
Adds a role to download and install go from
the official download page (https://golang.org/dl/).
Adds a role to run commands with go e.g build, test, run.

Change-Id: Iad2d877fffa2530e9fdeec648a60755a80cf01f4
2019-11-20 20:27:21 +01:00

14 lines
369 B
YAML

- name: Require go_command variable
fail:
msg: go_command is required for this role
when: go_command is not defined
- name: Run go command
command: >-
go {{ go_command }}
{% if go_package_dir is defined %}'./{{ go_package_dir }}'{% endif %}
args:
chdir: "{{ zuul_work_dir }}"
environment:
PATH: "{{ ansible_env.PATH }}:{{ go_bin_path }}"