Merge "Add .bazelrc and force color"
diff --git a/roles/ensure-bazelisk/files/bazelrc b/roles/ensure-bazelisk/files/bazelrc
new file mode 100644
index 0000000..1675340
--- /dev/null
+++ b/roles/ensure-bazelisk/files/bazelrc
@@ -0,0 +1,4 @@
+# Bazel automatically detects whether colors should be output, most probably
+# based on whether stdin is /dev/null or is a tty. Zuul supports ANSI coloring
+# output so we can turn it on.
+common --color=yes
diff --git a/roles/ensure-bazelisk/tasks/main.yaml b/roles/ensure-bazelisk/tasks/main.yaml
index efe48c3..22f9385 100644
--- a/roles/ensure-bazelisk/tasks/main.yaml
+++ b/roles/ensure-bazelisk/tasks/main.yaml
@@ -23,3 +23,8 @@
bazelisk_executable: "{{ bazelisk_target }}"
cacheable: true
when: bazelisk_downloaded is changed
+
+- name: Add Bazel configuration
+ copy:
+ src: bazelrc
+ dest: "{{ ansible_user_dir }}/.bazelrc"