diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25af76f..7858eca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - package + - test - repo - pages @@ -46,6 +47,25 @@ package: only: - tags +test-plain-install: + stage: test + image: docker:latest + services: + - docker:dind + script: + - docker run + -d + --name systemd-ubuntu + --privileged + -v /sys/fs/cgroup:/sys/fs/cgroup:ro + -v $CI_PROJECT_DIR:/src + -e CI_PROJECT_DIR=/src + -e CI_COMMIT_TAG=CI_COMMIT_TAG + jrei/systemd-ubuntu:20.04 + - docker exec -t systemd-ubuntu /bin/bash /src/.gitlab-ci/test.sh + only: + - tags + reprepro: cache: untracked: true diff --git a/.gitlab-ci/test.sh b/.gitlab-ci/test.sh new file mode 100644 index 0000000..2c3a89e --- /dev/null +++ b/.gitlab-ci/test.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +VERSION=$(echo "${CI_COMMIT_TAG#*v}" | cut -d'-' -f1) +PATCHLEVEL=$(echo "${CI_COMMIT_TAG}" | cut -d'-' -f2) +apt-get -qq update +apt-get -qqy install "${CI_PROJECT_DIR}/gitea_${VERSION}-${PATCHLEVEL}_amd64.deb" +systemctl start gitea +sleep 10 +if ! systemctl is-active gitea; then + journalctl -lu gitea --no-pager +fi