summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Michael Brummer <jan.brummer@tabos.org>2020-08-12 16:48:35 +0200
committerJan-Michael Brummer <jan.brummer@tabos.org>2020-08-12 17:07:59 +0200
commit4f22400fab5bdd1e0d70c4583b45a2fe595c6642 (patch)
tree42ae866abc62b68297e5e5ddc807dbed25134f34
parent9e2a6ce2fc88473c0c1d5afd5df418a2abf00b12 (diff)
downloadepiphany-docker-imager.tar.gz
CI: Use docker image to speed up jobsdocker-imager
Style check job installs dependencies on each run. This causes that the pipelines take a long time. Let's use a custom docker image to not block runners for such a long time and to get the pipeline results faster. This commit also adds a new job to generate the docker image for us.
-rw-r--r--.gitlab-ci.yml29
-rw-r--r--.gitlab-ci/Dockerfile5
2 files changed, 30 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 26c724b8a..3c421ac18 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,19 +12,38 @@ variables:
APP_ID: 'org.gnome.Epiphany.Devel'
stages:
+ - image
+ - check
- test
+update image:
+ variables:
+ DOCKER_TLS_CERTDIR: ""
+ image: docker:latest
+ stage: image
+ tags:
+ - privileged
+ services:
+ - docker:dind
+ script:
+ - docker build --tag $CI_REGISTRY_IMAGE .gitlab/
+ - docker tag $CI_REGISTRY_IMAGE "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
+ - docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
+ - docker push $CI_REGISTRY_IMAGE
+ when: manual
+
check-code-style:
- stage: .pre
- image: alpine:latest
+ stage: check
+ image: registry.gitlab.gnome.org/gnome/epiphany/master:v1
interruptible: true
- before_script:
- - apk update && apk add uncrustify bash python3
script:
- bash data/check-code-style
+ dependencies:
+ - update image
flatpak:
extends: '.flatpak'
+ stage: test
variables:
CONFIG_OPTS: '-Dprofile=Devel -Dunit_tests=enabled --werror'
except:
@@ -32,6 +51,7 @@ flatpak:
flatpak master:
extends: '.flatpak'
+ stage: test
variables:
CONFIG_OPTS: '-Dtech_preview=true -Dprofile=Devel'
only:
@@ -39,6 +59,7 @@ flatpak master:
flatpak scanbuild:
extends: '.flatpak'
+ stage: test
variables:
CONFIG_OPTS: '-Dprofile=Devel -Dunit_tests=enabled --werror'
script:
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
new file mode 100644
index 000000000..7da2e88d7
--- /dev/null
+++ b/.gitlab-ci/Dockerfile
@@ -0,0 +1,5 @@
+FROM fedora:rawhide
+
+RUN dnf install -y dnf-plugins-core uncrustify findutils git \
+ && dnf builddep -y epiphany \
+ && dnf clean all