I have built a deb package for a systemd service, which I would like to test after building it with GitLab CI.
The image I use is based on debian:stable
(i.e. buster at the time of this writing).
I am doing a basic smoke test like this:
test:
stage: test
script:
- dpkg -i myservice.deb
- systemctl start myservice
This fails with an error message, because systemctl
is not found. If I install that as part of the test, it still fails because systemd
is not the first process on the system.
How can I test a systemctl service on GitLab CI? Is there a Debian image which runs systemd?