zuul-jobs/roles/ensure-bazel/tasks/main.yaml
Sorin Sbarnea ad3167bd56 Fixes all tasks should be named rule
This prepared for ansible-lint v5 which no longer has exceptions
for task naming, requiring all to be named.

Change-Id: I5e761d1e3836fa270d7afdcf01780320001f820d
Part-Of: #773245
2021-03-08 13:30:32 +00:00

17 lines
468 B
YAML

- name: Check version of bazel
shell: |
set -o pipefail
bazel --version | grep -Eo '([0-9]+\.)+[0-9]+'
failed_when: false
register: installed_bazel_version
- name: Display Bazel version
debug:
msg: "Current installed Bazel version is {{ installed_bazel_version.stdout }}"
- name: Download and install Bazel if needed
include_tasks: install-bazel.yaml
when:
- install_bazel_if_missing
- installed_bazel_version.stdout != bazel_version