diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..fd4ae20 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,74 @@ +stages: + - build + - deploy + +.generic_apt_build_template: &generic_apt_build + apt-get update && apt-get -y upgrade && + apt-get install -y ca-certificates devscripts dpkg-dev equivs lsb-release && + export DEBEMAIL='brendonj@waikato.ac.nz' && + export DEBFULLNAME='Brendon Jones' && + export CODENAME=`lsb_release -c -s` && + mk-build-deps -i -r -t 'apt-get -f -y --force-yes' && + dpkg-buildpackage -b -us -uc -rfakeroot && + mkdir -p built-packages/$CODENAME/ || true && + mv ../*.deb built-packages/$CODENAME/ + +build-bionic: + stage: build + image: ubuntu:bionic + script: + - *generic_apt_build + artifacts: + paths: + - built-packages/* + expire_in: 1 day + only: + - tags + +build-xenial: + stage: build + image: ubuntu:xenial + script: + - *generic_apt_build + artifacts: + paths: + - built-packages/* + expire_in: 1 day + only: + - tags + +build-stretch: + stage: build + image: debian:stretch + script: + - *generic_apt_build + artifacts: + paths: + - built-packages/* + expire_in: 1 day + only: + - tags + +build-jessie: + stage: build + image: debian:jessie + script: + - *generic_apt_build + artifacts: + paths: + - built-packages/* + expire_in: 1 day + only: + - tags + +deploy-packages: + stage: deploy + image: ubuntu:bionic + script: + - ls built-packages/ + artifacts: + paths: + - built-packages/* + expire_in: 1 month + only: + - tags