Scroll to navigation

PKGOS-SALSA-CHECK-CONFIG(1) Debian OpenStack packaging PKGOS-SALSA-CHECK-CONFIG(1)

NAME

pkgos-salsa-check-config - check the configuration of a project of the Debian OpenStack team on Salsa

SYNOPSIS

pkgos-salsa-check-config --project-name <name> [--openstack-release <release>] [--debian-release <suite>] [--jenkins-token <token>] [--repair] [--debug]
pkgos-salsa-check-config --project-id <id> [--openstack-release <release>] [--debian-release <suite>] [--jenkins-token <token>] [--repair] [--debug]

DESCRIPTION

pkgos-salsa-check-config performs an audit of the configuration of a single project of the Debian OpenStack team on salsa.debian.org, using the GitLab REST API, and prints one line per check. Unless --repair is used, it never writes anything to the GitLab API, and its return code is always zero (even if some configuration is wrong), so that it can safely be run on the whole team through pkgos-salsa-run-on-all-projects(1).

If the project's default branch on the GitLab side isn't named debian/<release> (for example "master", for projects not following the debian/<openstack-release> branch schema), the two branch checks below are reported as OK without being verified, and the Jenkins hook is expected without a push_events_branch_filter (ie: with branch_filter_strategy set to all_branches) instead of filtering on debian/<openstack-release>. It checks that:

is the default branch of the project.
exists in the project repository.
is set to debian/salsa-ci.yml, ie: Salsa CI is enabled with the Debian packaging pipeline configuration of the project itself.
(through the KGB instance at http://kgb.debian.net, notifying the #debian-openstack-commits IRC channel) is added, with push events enabled.
(https://webhook.salsa.debian.org) is added, with push, tag push and merge request events enabled.
https://<debian-release>-<openstack-release>.debian.net is added for the debian/<openstack-release> branch.
dispatch@tracker.debian.org.

On failure, each line shows what was found, and the expected configuration.

With --repair, after printing the audit, each failed check is fixed by calling the corresponding pkgos-salsa-set-* script: a missing debian/<openstack-release> branch is created from the previous release of /etc/pkgos/openstack-release.txt with pkgos-salsa-new-branch(1), then the default branch is set with pkgos-salsa-set-default-branch(1), ci_config_path with pkgos-salsa-set-ci-config-path(1), the irker webhook with pkgos-salsa-set-irker(1), the tagpending webhook with pkgos-salsa-set-tagpending-hook(1), the Jenkins webhook with pkgos-salsa-set-webhook(1) (which requires --jenkins-token), and the emails-on-push integration with pkgos-salsa-set-emails-on-push(1). Note that the webhook repairs add a new webhook: if one exists but is misconfigured rather than missing, a second webhook is added, which should then be cleaned manually in the Salsa web interface.

OPTIONS

Name of the project, for example "nova". If omitted, it defaults to the name of the Git repository containing the current working directory (ie: the basename of the toplevel directory), when running from inside a Git repository. A --project-name passed on the command line always takes precedence.
Numeric ID of the project, as optional alternative to --project-name.
OpenStack release to check. Defaults to TARGET_OPENSTACK_REL from /etc/pkgos/pkgos.conf. If omitted, it defaults to the OpenStack release of the currently checked-out debian/<release> Git branch, provided that release is listed in /etc/pkgos/openstack-release.txt, falling back to ${TARGET_OPENSTACK_REL} from /etc/pkgos/pkgos.conf.
Debian release of the Jenkins instances to check. Defaults, in this order, to the value passed on the command line, to the only Debian release on which --openstack-release is available according to /etc/pkgos/openstack-debian-release.txt (the script refuses to guess when there are several), and to TARGET_DISTRO from /etc/pkgos/pkgos.conf.
Jenkins token, passed to pkgos-salsa-set-webhook(1) when the Jenkins webhook repair needs to add the webhook. Unused without --repair.
After the audit, fix each failed check by calling the corresponding pkgos-salsa-set-* script. Projects which are fully configured are never written to, and the return code remains zero even if a repair fails, so that a team-wide sweep through pkgos-salsa-run-on-all-projects(1) is not interrupted.
Print the URL of each GitLab API call on stderr.

FILES

/etc/pkgos/pkgos.conf
Global OpenStack packaging tools configuration file, defining TARGET_OPENSTACK_REL and TARGET_DISTRO.
/etc/pkgos/openstack-release.txt
Ordered list of OpenStack releases, used by the --repair branch creation to derive the release to create the new branch from.

ENVIRONMENT

Salsa personal access token with API access. May also be set in /etc/pkgos/pkgos.conf.

EXAMPLES

SEE ALSO

pkgos-salsa-get-project-id(1), pkgos-salsa-run-on-all-projects(1), pkgos-salsa-new-branch(1), pkgos-salsa-set-default-branch(1), pkgos-salsa-set-irker(1), pkgos-salsa-set-tagpending-hook(1), pkgos-salsa-set-emails-on-push(1), pkgos-salsa-set-ci-config-path(1), pkgos-salsa-set-webhook(1).

AUTHOR

This script and its man page: (c) 2026, Thomas Goirand <zigo@debian.org>, released under the Apache-2.0 license.

23 September 2026 openstack-pkg-tools