ci: test against trixie (#78771)
gitea/publik-devinst/pipeline/head There was a failure building this commit
Details
gitea/publik-devinst/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
fc6364fb7f
commit
c5634d132f
|
@ -4,10 +4,10 @@ pipeline {
|
|||
agent any
|
||||
options { disableConcurrentBuilds() }
|
||||
stages {
|
||||
stage('Unit Tests (bullseye)') {
|
||||
stage('Unit Tests (trixie)') {
|
||||
steps {
|
||||
catchError(stageResult: 'FAILURE') {
|
||||
sh 'sudo ./test-nspawn bullseye'
|
||||
sh 'sudo ./test-nspawn trixie'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,21 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
if [ $1 = bullseye ] || [ $1 = bookworm ]
|
||||
if [ $1 = trixie ] || [ $1 = bookworm ]
|
||||
then
|
||||
suite=$1
|
||||
image=publik-devinst-$suite
|
||||
fs=/var/lib/machines/$image
|
||||
test -d $fs || (cd /var/lib/machines && debootstrap --include=systemd-container $suite $image http://deb.debian.org/debian/)
|
||||
if [ $suite = trixie ]; then suite=testing; fi
|
||||
test -d $fs || (cd /var/lib/machines && debootstrap --include=systemd-container,dbus $suite $image http://deb.debian.org/debian/)
|
||||
rsync -a --delete . $fs/opt/publik-devinst
|
||||
systemd-nspawn -x -D $fs /opt/publik-devinst/test-nspawn run-tests
|
||||
elif [ $1 = 'run-tests' ]
|
||||
then
|
||||
apt update
|
||||
apt full-upgrade -y
|
||||
apt install -y wget ca-certificates gnupg2 git ansible postgresql sudo python3
|
||||
if grep -q 12 /etc/debian_version; then ANSIBLE_PACKAGE=ansible; else ANSIBLE_PACKAGE=ansible-core; fi
|
||||
apt install -y wget ca-certificates gnupg2 git $ANSIBLE_PACKAGE postgresql sudo python3
|
||||
id testuser || adduser --disabled-password --gecos "" testuser
|
||||
usermod -a -G sudo testuser
|
||||
grep -q testuser /etc/sudoers || echo 'testuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
|
Loading…
Reference in New Issue