Workflow debian_pipeline
We want to provide a workflow coordinating all the steps that are typically run to build and test an upload to Debian, similar to the Salsa CI pipeline but (eventually) with more distribution-wide testing and the ability to handle the task of performing the upload.
This builds on the existing sbuild workflow.
task_data
:source_artifact
(Single lookup, required): thedebian:source-package
ordebian:upload
artifact representing the source package to testvendor
(string, required): the distribution vendor on which to run testscodename
(string, required): the distribution codename on which to run testsarchitectures
(list of strings, optional): if set, only run on any of these architecture namesarchitectures_allowlist
(list of strings, optional, either concrete architecture names orall
): if set, only run on any of these architecture names; whilearchitectures
is intended to be supplied by users, this field is intended to be provided via Task configurationarchitectures_denylist
(list of strings, optional, either concrete architecture names orall
): if set, do not run on any of these architecture names; this field is intended to be provided via Task configurationarch_all_host_architecture
(string, defaults toamd64
): concrete architecture on which to run tasks forArchitecture: all
packagessigning_template_names
(dictionary, optional): mapping from architecture to list of names of binary packages that should be used as signing templates by the make_signed_source sub-workflowsbuild_backend
(string, optional): see Task PackageBuildsbuild_environment_variant
(string, optional): variant of the environment to build on, e.g.buildd
enable_check_installability
(boolean, defaults to True): whether to include installability-checking taskscheck_installability_suite
(Single lookup, required ifenable_check_installability
is True): thedebian:suite
collection to check installability against; once we have a good way to look up the primary suite for a vendor and codename, this could default to doing soenable_autopkgtest
(boolean, defaults to True): whether to include autopkgtest tasksautopkgtest_backend
(string, optional): see Autopkgtest taskenable_reverse_dependencies_autopkgtest
(boolean, defaults to True): whether to include autopkgtest tasks for reverse-dependenciesreverse_dependencies_autopkgtest_suite
(Single lookup, required ifenable_reverse_dependencies_autopkgtest
is True): thedebian:suite
collection to search for reverse-dependencies; once we have a good way to look up the primary suite for a vendor and codename, this could default to doing soenable_lintian
(boolean, defaults to True): whether to include lintian taskslintian_backend
(string, optional): see Lintian tasklintian_fail_on_severity
(string, optional): see Lintian taskenable_piuparts
(boolean, defaults to True): whether to include piuparts taskspiuparts_backend
(string, optional): see Piuparts taskenable_make_signed_source
(boolean, defaults to False): whether to sign the contents of builds and make a signed source packagemake_signed_source_purpose
(string, required only ifenable_make_signed_source
is True): the purpose of the key to sign with; see Sign taskmake_signed_source_key
(Single lookup, required only ifenable_make_signed_source
is True): thedebusine:signing-key
artifact to sign with; must matchpurpose
enable_confirmation
(boolean, defaults to False): whether the generated workflow includes a confirmation step asking the user to double check what was built before the uploadenable_upload
(boolean, defaults to False): whether to upload to an upload queueupload_key
(Single lookup, optional): key used to sign the uploads. If not set and ifupload_require_signature
is True, then the user will have to remotely sign the files.upload_require_signature
(boolean, defaults to True): whether the uploads must be signedupload_include_source
(boolean, defaults to True): include source with the uploadupload_include_binaries
(boolean, defaults to True): include binaries with the uploadupload_merge_uploads
(boolean, defaults to True): if True, merge the uploads and create a single PackageUpload task to upload them all together; if False, create a separate PackageUpload task for each uploadupload_since_version
(string, optional): ifsource_artifact
is adebian:source-package
, include changelog information from all versions strictly later than this version in the.changes
file; the default is to include only the topmost changelog entryupload_target_distribution
(string, optional): ifsource_artifact
is adebian:source-package
, override the targetDistribution
field in the.changes
file to this value; the default is to use the distribution from the topmost changelog entryupload_target
(string, defaults toftp://anonymous@ftp.upload.debian.org/pub/UploadQueue/
): the upload queue, as anftp://
orsftp://
URLupload_delayed_days
(integer, optional): the number of days to delay the upload; this assumes that the upload queue implements Debian’s convention of uploading delayed uploads to aDELAYED/{n}-day
queue
The effective set of architectures is {architectures}
(defaulting to all
architectures supported by this debusine instance and the
{vendor}:{codename}
suite, plus all
), intersecting
{architectures_allowlist}
if set, and subtracting
{architectures_denylist}
if set.
The workflow creates sub-workflows and tasks as follows, with substitutions based on its own task data:
an sbuild sub-workflow, with task data:
input.source_artifact
:{source_artifact}
target_distribution
:{vendor}:{codename}
backend
:{sbuild_backend}
architectures
: the effective set of architecturesarch_all_host_architecture
:{arch_all_host_architecture}
, if setenvironment_variant
:{sbuild_environment_variant}
, if setsigning_template_names
:{signing_template_names}
, if set
if any of
enable_check_installability
,enable_autopkgtest
,enable_lintian
, andenable_piuparts
are True, a qa sub-workflow, with task data copied from the items of the same name in this workflow’s task data, plus:binary_artifacts
:internal@collections/name:build-{architecture}
, for each available architecturearchitectures
: the effective set of architectures
if
enable_confirmation
is set, a Confirm taskif
enable_make_signed_source
andsigning_template_names
are set, a make_signed_source sub-workflow, with task data:binary_artifacts
:internal@collections/name:build-{architecture}
, for each available architecturesigning_template_artifacts
:internal@collections/name:signing-template-{architecture}-{binary_package_name}
, for each architecture and binary package name fromsigning_template_names
vendor
:{vendor}
codename
:{codename}
architectures
: the effective set of architecturespurpose
:{make_signed_source_purpose}
key
:{make_signed_source_key}
sbuild_backend
:{sbuild_backend}
if
enable_upload
is set, a package_upload sub-workflow configured to require a signature from the developer, with task data:source_artifact
:{source_artifact}
(left unset ifupload_include_source
is False)binary_artifacts
:internal@collections/name:build-{architecture}
, for each available architecturemerge_uploads
:{upload_merge_uploads}
since_version
:{upload_since_version}
target_distribution
:{upload_target_distribution}
key
:{upload_key}
require_signature
:{upload_require_signature}
target
:{upload_target}
vendor
:{vendor}
codename
:{codename}
delayed_days
:{upload_delayed_days}
The first work request for each architecture in the make_signed_source
sub-workflow and the first work request in
the package_upload
sub-workflow depend on the Confirm task above.
Todo
Not implemented: enable_check_installability
,
check_installability_suite
, enable_reverse_dependencies_autopkgtest
,
reverse_dependencies_autopkgtest_suite
and enable_confirmation
.
See the relevant blueprints for task installability,
reverse dependencies autopkgtest or
enable confirmation.
Todo
There should also be an option to add the results to a debian:suite collection rather than uploading it to an external queue. However, this isn’t very useful until debusine has its own repository hosting, and once it does, we’ll need to be able to apply consistency checks to uploads rather than just adding them to suites in an unconstrained way. This will probably involve a new workflow yet to be designed.
Todo
The pipeline should also include the ability to schedule a debdiff against a baseline suite (either directly or in a sub-workflow).