1
0
mirror of https://gitlab.com/packaging/gitea synced 2024-12-18 08:03:29 +00:00

add test for package

This commit is contained in:
morph027 2020-06-20 10:55:39 +02:00
parent 73f653729c
commit a8cff58ba0
No known key found for this signature in database
GPG Key ID: BF17A54BB873BE58
2 changed files with 31 additions and 0 deletions

View File

@ -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

11
.gitlab-ci/test.sh Normal file
View File

@ -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