From 471b794709bde7f657917f82d8e22d30978024ec Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sat, 3 Apr 2021 23:30:06 +0100 Subject: [PATCH] Add Gitlab CI. --- .gitlab-ci.yml | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..efef31196 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,67 @@ +--- + +variables: + PKGDEST: $CI_PROJECT_DIR/packages + PACKAGER: 'Alexandre Pujol ' + +stages: + - lint + - package + - preprocess + + +# Code Linter +# ----------- + +bash: + stage: lint + image: koalaman/shellcheck-alpine + script: + - shellcheck --shell=bash + PKGBUILD + debian/apparmor.d.postinst debian/apparmor.d.postrm + + +# Package Build +# ------------- + +archlinux: + stage: package + image: registry.gitlab.com/archlex/packages/builders/arch + script: + - updpkgsums + - sudo pacman -Syu --noconfirm --noprogressbar + - makepkg -s --noconfirm --noprogressbar + artifacts: + expire_in: 1 day + paths: + - $PKGDEST/* + +debian: + stage: package + image: registry.gitlab.com/archlex/packages/builders/debian + script: + - VERSION="$(date +%y.%m%d)-1" + - mkdir -p "$PKGDEST" + - sudo apt-get update -q && sudo apt-get install -y config-package-dev dh-apparmor + - dch --newversion=$VERSION --urgency=medium --distribution=stable --controlmaint "Release $VERSION" + - dpkg-buildpackage -b -d --no-sign + - mv ../*.deb $PKGDEST/ + artifacts: + expire_in: 1 day + paths: + - $PKGDEST/*.deb + + +# Profile Preprocessing +# --------------------- + +apparmor: + stage: preprocess + image: archlinux + dependencies: + - archlinux + script: + - pacman -Syu --noconfirm --noprogressbar apparmor + - pacman -U --noconfirm --noprogressbar $PKGDEST/* + - apparmor_parser --preprocess /etc/apparmor.d 1> /dev/null