Hello,
A few weeks ago, I asked about techniques for making new packages available to
other new packages so that the autopkgtest job could be run successfully in a
pipeline in the Salsa CI environment. Eventually, this was made to work by taking advantage of the aptly job defined in the standard Debian CI pipeline.
To recap, the aptly job publishes the package built during the execution of a
pipeline by creating a dedicated apt-compatible package repository just for that package. Such repositories can then be made available to various jobs in
the pipeline of another package, allowing the successful installation of that
package and its dependencies, including new packages, and the successful execution of jobs like autopkgtest.
However, one other thing I wanted to achieve was to take the complete set of new packages and to publish them in a single package repository. This would allow people to install and test the built packages in a more convenient fashion than asking them to hunt down each built package from job artefacts or
to build the packages themselves.
Obviously, the aptly job in the standard Debian CI pipeline publishes a single
package (or maybe a collection of packages built from a single source package), but I wanted to aggregate all packages published by a collection of
aptly repositories. Fortunately, it seems that this is possible by augmenting
the existing aptly job definition as shown in the following file:
https://salsa.debian.org/moin-team/moin/-/blob/debian/master/debian/salsa-ci.yml
Ignoring the "ls" command which was there to troubleshoot this rather opaque environment, one script adds repository definitions to the apt configuration,
whereas the other performs the appropriate "apt source" and "apt download" commands, making the source and binary package files available for aptly to process. Consequently, aptly will include all the dependency packages in the final package repository.
(Since the scripts reside in my package's debian directory, I also had to request the availability of the Git repository for the job. Generally, I have
found it challenging to have these job definitions make effective use of scripts due to environmental inconsistencies.)
I imagine that publishing packages like this is not particularly desirable, at
least if done widely, but I hope it shows that it can be done relatively easily, at least if all the right incantations have been discovered.
However, one other thing I wanted to achieve was to take the complete set of
new packages and to publish them in a single package repository. This would >> allow people to install and test the built packages in a more convenient
fashion than asking them to hunt down each built package from job artefacts or
to build the packages themselves.
Obviously, the aptly job in the standard Debian CI pipeline publishes a single
package (or maybe a collection of packages built from a single source
package), but I wanted to aggregate all packages published by a collection of
aptly repositories. Fortunately, it seems that this is possible by augmenting
the existing aptly job definition as shown in the following file:
https://salsa.debian.org/moin-team/moin/-/blob/debian/master/debian/salsa-ci.yml
For another angle, see:aptly/pool/main/
https://salsa.debian.org/philh/user-setup/-/pipelines/576662
In which I have a `harvest-repos` job that grabs artifacts from `build`
jobs in other pipelines, and an `aptly-plus` job that's got an added
`needs: harvest-repos` that can combine the artifacts from its build and harvest-repos jobs and lump them all together.
In the resulting aptly repo you can see that it includes both the
local package (user-setup) under the 'u' directory, and 'grub-installer' under the 'g' directory:
https://salsa.debian.org/philh/user-setup/-/jobs/4671054/artifacts/browse/
That's done with:
https://salsa.debian.org/installer-team/branch2repo/
Quite a lot of that is already part of the standard salsa-CI pipeline,
and my aim is that branch2repo will pretty-much disapear, with its
components being optional bits of the standard pipeline, and maybe a few variable settings.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 349 |
Nodes: | 16 (2 / 14) |
Uptime: | 117:28:58 |
Calls: | 7,612 |
Files: | 12,786 |
Messages: | 5,683,872 |