build: add Zuul check pipeline

This pipeline checks the extension with |web-ext lint|.

Change-Id: I3bce686ff33fcbd24c0857da17eccd12458ed2ec
diff --git a/.zuul.yaml b/.zuul.yaml
new file mode 100644
index 0000000..020fd4f
--- /dev/null
+++ b/.zuul.yaml
@@ -0,0 +1,20 @@
+# == Zuul configuration file ==
+#
+# This file is used to configure this project and its associated jobs in Zuul.
+# Zuul is the CI/CD tool which lets us check changes before they are committed,
+# and build a canary version of the extension on a regular basis.
+#
+# More info about Zuul: https://zuul-ci.org/docs/zuul/
+
+- job:
+    name: screen-capture-lint
+    parent: web-ext-lint
+    pre-run: playbooks/lint/pre.yaml
+    run: playbooks/lint/run.yaml
+    irrelevant-files:
+      - "README.md"
+
+- project:
+    check:
+      jobs:
+        - screen-capture-lint
diff --git a/Makefile b/Makefile
index 3f174f1..7b9d980 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: all chromium-stable chromium-beta
+.PHONY: all chromium-stable chromium-beta test-extension
 
 all: chromium-stable chromium-beta
 
@@ -8,5 +8,8 @@
 chromium-beta:
 	bash release.bash -c beta -b chromium
 
+test-extension:
+	bash generateManifest.bash "chromium"
+
 clean:
 	rm -rf out
diff --git a/playbooks/lint/pre.yaml b/playbooks/lint/pre.yaml
new file mode 100644
index 0000000..5640fa6
--- /dev/null
+++ b/playbooks/lint/pre.yaml
@@ -0,0 +1,5 @@
+- hosts: all
+  roles:
+    - role: ensure-build-essential
+    - role: ensure-zip
+    - role: ensure-genmanifest
diff --git a/playbooks/lint/run.yaml b/playbooks/lint/run.yaml
new file mode 100644
index 0000000..70cd9fb
--- /dev/null
+++ b/playbooks/lint/run.yaml
@@ -0,0 +1,6 @@
+- hosts: all
+  roles:
+    - role: build-extension
+      make_target: test-extension
+    - role: web-ext-lint
+      source_dir: "src"
diff --git a/roles/build-extension/defaults/main.yaml b/roles/build-extension/defaults/main.yaml
new file mode 100644
index 0000000..ba0ea42
--- /dev/null
+++ b/roles/build-extension/defaults/main.yaml
@@ -0,0 +1 @@
+make_target: chromium-stable
diff --git a/roles/build-extension/tasks/main.yaml b/roles/build-extension/tasks/main.yaml
new file mode 100644
index 0000000..6ca0225
--- /dev/null
+++ b/roles/build-extension/tasks/main.yaml
@@ -0,0 +1,6 @@
+- name: Build extension
+  make:
+    chdir: "{{ zuul.project.src_dir }}"
+    target: "{{ make_target }}"
+  environment:
+    PATH: "{{ ansible_env.HOME }}/go/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"