summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-06-22 13:34:59 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-06-22 16:07:09 +1000
commitb6e2038aafbfc17752659fa94fb6e4b782dda2e5 (patch)
tree369e8a82d6df61ca3e2ce78fd165804841687959
parent8fa778e3d00368ab8910a3079e8b671d132e3a1e (diff)
gitlab CI: add Arch to the list of built imageswip/arch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--.gitlab-ci.yml65
1 files changed, 65 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d272848e..f20c972c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -42,12 +42,14 @@ variables:
###############################################################################
FEDORA_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz valgrind binutils libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel'
UBUNTU_DEBS: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz valgrind binutils libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
+ ARCH_PKGS: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz valgrind binutils libwacom gtk3 mtdev '
############################ end of package lists #############################
MESON_BUILDDIR: builddir
NINJA_ARGS: ''
MESON_PARAMS: ''
FEDORA_DOCKER_IMAGE: $CI_REGISTRY/libinput/$CI_PROJECT_NAME/fedora/$FEDORA_VERSION
UBUNTU_DOCKER_IMAGE: $CI_REGISTRY/libinput/$CI_PROJECT_NAME/ubuntu/$UBUNTU_VERSION
+ ARCH_DOCKER_IMAGE: $CI_REGISTRY/libinput/$CI_PROJECT_NAME/arch/rolling
# When using docker-in-docker (dind), it's wise to use the overlayfs driver
# for improved performance.
DOCKER_DRIVER: overlay2
@@ -175,6 +177,11 @@ ubuntu:18.04@docker-check:
CURRENT_DOCKER_IMAGE: $UBUNTU_DOCKER_IMAGE:latest
<<: *docker_check
+arch:rolling@docker-check:
+ variables:
+ GIT_STRATEGY: none
+ CURRENT_DOCKER_IMAGE: $ARCH_DOCKER_IMAGE:latest
+ <<: *docker_check
#################################################################
# #
@@ -275,6 +282,38 @@ ubuntu:18.04@docker-prep:
# Note: we can not use $UBUNTU_VERSION here
- ubuntu:18.04@docker-check
+.arch@docker-prep: &arch_docker_prep
+ stage: docker_prep
+ services:
+ - docker:dind
+ script:
+ # if the check was successful, we just skip recreating the docker image
+ - test -e .img_ready && exit 0
+
+ - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+
+ # create a Dockerfile with our dependencies
+ - echo "FROM base/archlinux" > Dockerfile
+ - echo "WORKDIR /app" >> Dockerfile
+ - echo "RUN pacman -S --refresh; pacman -S --sysupgrade --noconfirm; pacman -S --clean --noconfirm" >> Dockerfile
+ - echo "RUN pacman -S --noconfirm $ARCH_PKGS; pacman -S --clean --noconfirm" >> Dockerfile
+
+ # create the docker image
+ - docker build --tag $ARCH_DOCKER_IMAGE:latest --tag $ARCH_DOCKER_IMAGE:$CI_JOB_ID .
+
+ # push the docker image to the libinput registry
+ - docker push $ARCH_DOCKER_IMAGE:latest
+ - docker push $ARCH_DOCKER_IMAGE:$CI_JOB_ID
+ <<: *restrict_docker_creation
+
+arch:rolling@docker-prep:
+ variables:
+ GIT_STRATEGY: none
+ <<: *arch_docker_prep
+ dependencies:
+ - arch:rolling@docker-check
+
+
# Add some manual runners to be able to recreate the cache on a day
# the list of the rpms changed
@@ -310,6 +349,13 @@ ubuntu:18.04@force-docker-prep:
when: manual
dependencies: []
+arch:rolling@force-docker-prep:
+ variables:
+ GIT_STRATEGY: none
+ <<: *arch_docker_prep
+ when: manual
+ dependencies: []
+
#################################################################
# #
# docker clean stage #
@@ -412,6 +458,12 @@ ubuntu:18.04@docker-clean:
CURRENT_DOCKER_IMAGE: $UBUNTU_DOCKER_IMAGE
<<: *docker_clean
+arch:rolling@docker-clean:
+ variables:
+ GIT_STRATEGY: none
+ CURRENT_DOCKER_IMAGE: $ARCH_DOCKER_IMAGE
+ <<: *docker_clean
+
#################################################################
# #
# build stage #
@@ -554,3 +606,16 @@ ubuntu:18.04@default-build:
UBUNTU_VERSION: "17.10"
<<: *ubuntu_template
<<: *default_build
+
+#
+# Arch
+#
+.arch@template: &arch_template
+ stage: build
+ image: $ARCH_DOCKER_IMAGE:latest
+ <<: *default_artifacts
+ dependencies: []
+
+arch:rolling@default-build:
+ <<: *arch_template
+ <<: *default_build