From 5607ab72300471548ed9e3509e1b8bec20fc4b04 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Wed, 13 Dec 2017 22:24:53 +0100 Subject: [PATCH] Initial Continuous Integration --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..ab15d90f2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +stages: + - build + +build-debian: + stage: build + image: debian:stretch + script: | + echo "Installing build dependencies..." + apt-get update + apt-get install -y build-essential + apt-get build-dep -y . + + echo "Converting to native package..." + suffix="~$CI_COMMIT_SHA" + sed -i "1{s/-1) /$suffix) /}" debian/changelog + sed -i 's/3.0 (quilt)/3.0 (native)/' debian/source/format + + echo "Building LemonLDAP..." + dpkg-buildpackage + + echo "Moving artifacts..." + mkdir artifacts + mv ../*.tar.xz ../*.dsc ../*.changes ../*.deb artifacts + artifacts: + paths: + - 'artifacts/*' + expire_in: 1 week