[PATCH] gitlab-ci: Use docker images
Daniel Vetter
daniel.vetter at ffwll.ch
Wed Oct 31 13:36:12 UTC 2018
Shrinks the usual pipeline considerably, since we don't first waste a
few minutes installing stuff.
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
.gitlab-ci.yml | 25 ++++++++++++++++++++++---
Dockerfile.fedora | 4 ++++
2 files changed, 26 insertions(+), 3 deletions(-)
create mode 100644 Dockerfile.fedora
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 91cb6a20585d..ab68a168b3d8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,26 @@
-image: fedora:latest
+image: $CI_REGISTRY/$CI_PROJECT_PATH/dim-fedora:latest
-before_script:
- - dnf install -y ShellCheck python3-docutils python3-sphinx make
+stages:
+ - containers
+ - build
+ - deploy
+
+container-build:
+ stage: containers
+ image: docker:stable
+ only:
+ changes:
+ - Dockerfile.fedora
+ - .gitlab-ci.yml
+ services:
+ - docker:dind
+ variables:
+ DOCKER_HOST: tcp://docker:2375
+ DOCKER_DRIVER: overlay2
+ script:
+ - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/dim-fedora -f Dockerfile.fedora .
+ - docker push $CI_REGISTRY/$CI_PROJECT_PATH/dim-fedora
check:
stage: build
diff --git a/Dockerfile.fedora b/Dockerfile.fedora
new file mode 100644
index 000000000000..0e1132ed401c
--- /dev/null
+++ b/Dockerfile.fedora
@@ -0,0 +1,4 @@
+FROM fedora:28
+
+RUN dnf install -y \
+ ShellCheck python3-docutils python3-sphinx make
--
2.19.1
More information about the dim-tools
mailing list