Please run Salsa CI at least once before uploading new Debian (Go) packages
Hi all!
I was today reviewing a bunch of Go team packages with the intent to
sponsor uploads, but they all have in common that Salsa CI is not
running at all, or is not being triggered correctly.
https://salsa.debian.org/go-team/packages/apt-transport-oci
https://salsa.debian.org/go-team/packages/fzf/-/merge_requests/6
https://salsa.debian.org/momoto/golang-github-offchainlabs-go-bitfield/-/merge_requests/1
https://salsa.debian.org/tambre/golang-github-segmentio-asm
Hence I wanted to summarize here for the entire list what needs to be
done for Salsa CI to run.
1. Check out the README at
https://salsa.debian.org/salsa-ci-team/pipeline - it applies to all
Salsa hosted projects, including all Go packages
2. Make sure the package has a debian/gitlab-ci.yml file (Go team
convention) or a debian/salsa-ci.yml file and that the package
Settings > CI/CD > CI/CD configuration file points to this file
3. Make sure the contents is either equivalent to the latest version
of https://salsa.debian.org/go-team/infra/pkg-go-tools/blob/master/config/gitlabciyml.go
that runs both Go team CI and Salsa CI, or use the plain contents from
https://salsa.debian.org/salsa-ci-team/pipeline/-/blob/master/recipes/salsa-ci.yml
to only run Salsa CI. Running the Go team custom CI is not essential
as it does not build the actual package, and thus not really useful.
4. The pipeline is not run automatically after configuring it. You can
either trigger it by running the pipeline manually (Build > Pipelines
> Run pipeline) or by pushing something. If you push dummy commits,
remember to rebase and remove them so they don't pollute the git
history that you intend to get merged and used for the next upload.
Additionally, in the Go team it is very common that packages are done
in bundles of a main package and all of its dependencies. The CI will
(correctly) fail on packages that are not ready to be uploaded because
their dependencies have not entered Debian yet, as seen in:
https://salsa.debian.org/tambre/golang-github-segmentio-encoding
(depends on golang-github-segmentio-asm-dev)
https://salsa.debian.org/tambre/golang-github-neilotoole-jsoncolor
(depends on golang-github-segmentio-encoding)
For these you can add one temporary extra commit that with
SALSA_CI_EXTRA_REPOSITORY to load the dependency and be able to
proceed with the testing of the remaining pipeline.
You can seen an example of this in the last commit (marked "WIP") in
https://salsa.debian.org/go-team/packages/usql/-/merge_requests/3/commits
where I enabled access to a PPA where I have previously uploaded all
the other packages that are dependencies of usql.
- Otto
Reply to: