In Ubuntu 20.04 snapcraft is now a snap instead of a deb package. Has anyone get snapcraft to work in GitLab CI?
snapd requires systemctl for init, so using snaps in a CI job won’t work with docker executor (default for GitLab.com)
However, snaps can be installed and used in CI jobs if you use a Shell executor for
Proof of concept CI job using shell runner on 20.04 to install snapd and nmap snap here:
It’s a little janky, but you can use the unofficial Docker images from cibuilds to build and publish snaps from GitLab CI. This job from the FluffyChat repository is an example (it also shows the somewhat cumbersome workaround you need if your
snapcraft.yaml specifies one or more