zuul-jobs/roles/ensure-bazelisk/README.rst
Ian Wienand 9e92459592 Document output variables
Several roles are setting facts that are expected to be consumed by
roles following them; generally things like the path to installed
tools, etc.

Add a section to policy about this behaviour in general, noting it
should use the cachable flags to persist the values.

Add specific documentation notes in an "Output Variable" section for
roles currently implementing this behaviour.

Change-Id: I05657fec198176c7d7345e84293f4902c81fa30c
2020-04-17 10:45:15 +02:00

38 lines
1.1 KiB
ReStructuredText

Ensure that bazelisk is present.
If bazelisk is already installed, this role does nothing. Otherwise,
it downloads bazelisk from GitHub and installs it in the user's
home directory by default.
**Role Variables**
.. zuul:rolevar:: bazelisk_version
:default: v1.3.0
Version of bazelisk to install.
.. zuul:rolevar:: bazelisk_arch
:default: linux-amd64
Architecture to install.
.. zuul:rolevar:: bazelisk_url
:default: https://github.com/bazelbuild/bazelisk/releases/download/{{ bazelisk_version }}/bazelisk-{{ bazelisk_arch }}
The URL from which to download bazelisk.
.. zuul:rolevar:: bazelisk_target
:default: "{{ ansible_user_dir }}/.local/bin/bazelisk"
Where to install bazelisk. If the role downloads bazelisk, it will
set :zuul:rolevar:`ensure-bazelisk.bazelisk_executable` to this value as well.
**Output Variables**
.. zuul:rolevar:: bazelisk_executable
:default: bazelisk
The bazelisk executable. If this already exists, the role will not
perform any further actions. It will be made available for other
roles running after role.