Add lint job to the check pipeline

This is a Zuul job which will run |web-ext lint| on the extension's
//src directory to see if there are any lint errors.

If any lint error is returned, the check will fail. Otherwise, if it
successfully passes the lint check (meaning only warning or softer
messages were shown), the check will pass successfully.

Change-Id: I5c97ee4c1646f6362672442793bccfaea3b77c3b
diff --git a/.zuul.yaml b/.zuul.yaml
new file mode 100644
index 0000000..328dbda
--- /dev/null
+++ b/.zuul.yaml
@@ -0,0 +1,15 @@
+- job:
+    name: infinitegforums-lint
+    parent: web-ext-lint
+    pre-run: playbooks/lint/pre.yaml
+    run: playbooks/lint/run.yaml
+    irrelevant-files:
+      - ".github/.*"
+      - "docs/.*"
+      - "OWNERS"
+      - "README.md"
+
+- project:
+    check:
+      jobs:
+        - infinitegforums-lint
diff --git a/playbooks/lint/pre.yaml b/playbooks/lint/pre.yaml
new file mode 100644
index 0000000..0a452dd
--- /dev/null
+++ b/playbooks/lint/pre.yaml
@@ -0,0 +1,4 @@
+- hosts: all
+  roles:
+    - role: ensure-go
+      go_version: 1.13
diff --git a/playbooks/lint/run.yaml b/playbooks/lint/run.yaml
new file mode 100644
index 0000000..c4dba19
--- /dev/null
+++ b/playbooks/lint/run.yaml
@@ -0,0 +1,6 @@
+- hosts: all
+  roles:
+    - role: generate-ext-manifest
+      target_browser: "GECKO"
+    - role: web-ext-lint
+      extra_lint_flags: "--ignore-files sw.js"
diff --git a/roles/generate-ext-manifest/defaults/main.yaml b/roles/generate-ext-manifest/defaults/main.yaml
new file mode 100644
index 0000000..8aa92ec
--- /dev/null
+++ b/roles/generate-ext-manifest/defaults/main.yaml
@@ -0,0 +1 @@
+target_browser: CHROMIUM
diff --git a/roles/generate-ext-manifest/tasks/main.yaml b/roles/generate-ext-manifest/tasks/main.yaml
new file mode 100644
index 0000000..28fedba
--- /dev/null
+++ b/roles/generate-ext-manifest/tasks/main.yaml
@@ -0,0 +1,6 @@
+- name: Generate extension manifest
+  include_role:
+    name: go
+  vars:
+    go_command: "run generateManifest.go {{target_browser}}"
+    zuul_work_dir: "{{ zuul.project.src_dir }}"