[gnome-continuous] Add CI for Continuous
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] Add CI for Continuous
- Date: Thu, 31 May 2018 08:10:36 +0000 (UTC)
commit 0c8efc9f8ef5ac24d798f8925b57b0076d3396b9
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu May 31 09:04:57 2018 +0100
Add CI for Continuous
Make sure that we do some minimal validation on the Continuous manifest,
to avoid obvious "fix a missing comma" commits.
.gitlab-ci.yml | 8 ++++++++
.gitlab-ci/Dockerfile | 36 ++++++++++++++++++++++++++++++++++++
.gitlab-ci/run-docker.sh | 11 +++++++++++
.gitlab-ci/validate-manifest.sh | 5 +++++
4 files changed, 60 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..732ffcd
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,8 @@
+stages:
+ - validate
+
+validate-manifest:
+ image: registry.gitlab.gnome.org/gnome/gnome-continuous/master:v1
+ stage: validate
+ script:
+ - bash -x .gitlab-ci/validate-manifest.sh manifest.json
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
new file mode 100644
index 0000000..f4b31ba
--- /dev/null
+++ b/.gitlab-ci/Dockerfile
@@ -0,0 +1,36 @@
+FROM fedora:28
+
+RUN dnf -y install \
+ cairo-devel \
+ cairo-gobject-devel \
+ e2fsprogs-devel \
+ gcc \
+ gcc-c++ \
+ gdk-pixbuf2-devel \
+ gdk-pixbuf2-modules \
+ gettext \
+ git \
+ gjs \
+ glib-networking \
+ glib2-devel \
+ glibc-devel \
+ glibc-headers \
+ gobject-introspection-devel \
+ gtk-doc \
+ intltool \
+ json-glib-devel \
+ libarchive-devel \
+ libsoup-devel \
+ libxml2-devel \
+ mozjs52 \
+ ostree \
+ && dnf clean all
+
+ARG HOST_USER_ID=5555
+ENV HOST_USER_ID ${HOST_USER_ID}
+RUN useradd -u $HOST_USER_ID -ms /bin/bash user
+
+USER user
+WORKDIR /home/user
+
+ENV LANG C.UTF-8
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
new file mode 100755
index 0000000..4b579d4
--- /dev/null
+++ b/.gitlab-ci/run-docker.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+TAG="registry.gitlab.gnome.org/gnome/gnome-continuous/master:v1"
+
+sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
+ --file "Dockerfile" .
+sudo docker run --rm --security-opt label=disable \
+ --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+ --tty --interactive "${TAG}" bash
diff --git a/.gitlab-ci/validate-manifest.sh b/.gitlab-ci/validate-manifest.sh
new file mode 100755
index 0000000..fa046bb
--- /dev/null
+++ b/.gitlab-ci/validate-manifest.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+manifest=$1
+
+json-glib-validate $manifest
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]