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:
parent
73f653729c
commit
a8cff58ba0
@ -1,5 +1,6 @@
|
|||||||
stages:
|
stages:
|
||||||
- package
|
- package
|
||||||
|
- test
|
||||||
- repo
|
- repo
|
||||||
- pages
|
- pages
|
||||||
|
|
||||||
@ -46,6 +47,25 @@ package:
|
|||||||
only:
|
only:
|
||||||
- tags
|
- 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:
|
reprepro:
|
||||||
cache:
|
cache:
|
||||||
untracked: true
|
untracked: true
|
||||||
|
11
.gitlab-ci/test.sh
Normal file
11
.gitlab-ci/test.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user