Add web-ext-lint job report to the log folder
- Add fetch-web-ext-lint role, which copies the web-ext-lint report to
the log folder.
Changes in the web-ext-lint job:
- Change the main playbook so the lint report is saved in a file called
web-ext-lint.txt (so it can fetched later on).
- Add a post playbook which calls the fetch-web-ext-lint role.
- Add a description to the job.
Change-Id: Ifc2ef60084ecc33087e5ce2761ad91d84e7eff3c
diff --git a/roles/web-ext-lint/tasks/main.yaml b/roles/web-ext-lint/tasks/main.yaml
index 62cf135..57b5b12 100644
--- a/roles/web-ext-lint/tasks/main.yaml
+++ b/roles/web-ext-lint/tasks/main.yaml
@@ -1,7 +1,11 @@
- name: Run the web-ext linter
shell:
- cmd: >-
- web-ext lint --no-input --boring
- {{ '--source-dir=' + source_dir if source_dir else '' }}
- {{ extra_lint_flags }}
+ cmd: |
+ set -o pipefail
+ set -e
+ web-ext lint --no-input --boring \
+ {{ '--source-dir=' + source_dir if source_dir else '' }} \
+ {{ extra_lint_flags }} | tee -a web-ext-lint.txt
chdir: "{{ zuul.project.src_dir }}"
+ executable: /bin/bash
+ changed_when: false