[nautilus/wip/oholy/ci-style-check: 4/5] ci: Use docker image to speed up jobs
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/oholy/ci-style-check: 4/5] ci: Use docker image to speed up jobs
- Date: Thu, 26 Mar 2020 12:59:59 +0000 (UTC)
commit 6726b63045b148e6e3fe93486ed9f2377a61b153
Author: Ondrej Holy <oholy redhat com>
Date: Thu Mar 26 10:26:58 2020 +0100
ci: Use docker image to speed up jobs
Fedora and style check jobs install 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.
.gitlab-ci.yml | 26 +++++++++++++++++++++-----
.gitlab/Dockerfile | 5 +++++
2 files changed, 26 insertions(+), 5 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cf5b7dfd5..3bdb64bbc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,7 @@ variables:
stages:
- triage
+ - image
- test
- cross environment
- deploy
@@ -29,12 +30,8 @@ nightly:
- 'flatpak devel'
fedora rawhide:
- image: fedora:rawhide
+ image: registry.gitlab.gnome.org/gnome/nautilus:latest
stage: cross environment
- before_script:
- - dnf update -y --nogpgcheck
- - dnf install -y 'dnf-command(builddep)' redhat-rpm-config libseccomp-devel gcovr --nogpgcheck
- - dnf builddep -y nautilus --nogpgcheck
script:
- meson _build .
- cd _build
@@ -92,3 +89,22 @@ style check:
- gcc data/lineup-parameters.c `pkg-config --cflags --libs gio-2.0 gio-unix-2.0` -o
data/lineup-parameters
- LANG=C.utf8 data/run-uncrustify.sh
- git diff --exit-code | tee uncrustify.diff
+
+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
+ only:
+ variables:
+ - $CI_PROJECT_NAMESPACE == "GNOME"
diff --git a/.gitlab/Dockerfile b/.gitlab/Dockerfile
new file mode 100644
index 000000000..3861b3f84
--- /dev/null
+++ b/.gitlab/Dockerfile
@@ -0,0 +1,5 @@
+FROM fedora:rawhide
+
+RUN dnf install -y dnf-plugins-core uncrustify findutils \
+ && dnf builddep -y nautilus \
+ && dnf clean all
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]