[gnome-shell/wip/fmuellner/more-ci: 12/12] ci: Use custom image for JS checks
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/more-ci: 12/12] ci: Use custom image for JS checks
- Date: Thu, 21 Feb 2019 11:52:47 +0000 (UTC)
commit 8491a747c9cf2a906a8fdafecbe1c805f1e655ff
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Feb 13 05:49:37 2019 +0100
ci: Use custom image for JS checks
Running dnf to update and install additional packages every time
the job is executed slows down the CI pipeline. Avoid this by
using another custom images for JS source checks.
In addition to the js shell we use for the existing syntax check,
also include eslint for future jobs and some extension-specific
tooling to make the image more useful to extension authors.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/408
.gitlab-ci.yml | 4 +---
.gitlab-ci/Dockerfile.extension-ci | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d02f3eb0b..ea91cec00 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,10 +25,8 @@ check_commit_log:
- merge_requests
js_check:
- image: registry.fedoraproject.org/fedora:latest
+ image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v1
stage: source_check
- before_script:
- - dnf install -y findutils mozjs60-devel
script:
- find js -name '*.js' -exec js60 -c -s '{}' ';' 2>&1 | tee $JS_LOG
- (! grep -q . $JS_LOG)
diff --git a/.gitlab-ci/Dockerfile.extension-ci b/.gitlab-ci/Dockerfile.extension-ci
new file mode 100644
index 000000000..228355475
--- /dev/null
+++ b/.gitlab-ci/Dockerfile.extension-ci
@@ -0,0 +1,18 @@
+FROM registry.fedoraproject.org/fedora:latest
+
+RUN dnf -y update && dnf -y upgrade && \
+ dnf install -y 'dnf-command(copr)' && \
+
+ # For syntax checks with `find . -name '*.js' -exec js60 -c -s '{}' ';'`
+ dnf install -y findutils mozjs60-devel && \
+
+ # For static analysis with eslint
+ dnf install -y nodejs && \
+ npm install -g eslint && \
+
+ # Shameless plug for my own tooling; useful for generating zip
+ dnf copr enable -y fmuellner/gnome-shell-ci && \
+ dnf install -y gnome-extensions-tool meson && \
+
+ dnf clean all && \
+ rm -rf /var/cache/dnf
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]