Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install bazel #622

Merged
merged 2 commits into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions roles/config-bazel/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
bazel_version: '0.28.1'
23 changes: 23 additions & 0 deletions roles/config-bazel/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# We can install specify version bazel in task, like this:
#- roles:
# - role: config-bazel
# bazel_version: '0.28.1'
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice help description

- name: Check if bazel has satisfied requirement
shell: bazel --version |grep -Eo '([0-9]+\.)+[0-9]+'
ignore_errors: yes
register: curr_bazel_version

- name: Install bazel
shell: |
set -ex
apt-get update
apt-get -y install build-essential openjdk-8-jdk python zip unzip
wget https://github.com/theopenlab/package/releases/download/master/bazel.{{ bazel_version }}
chmod +x ./bazel.{{ bazel_version }}
cp bazel.{{ bazel_version }} /usr/local/bin/bazel
bazel version
when:
- curr_bazel_version.stdout != bazel_version
args:
executable: /bin/bash