Repository navigation
Conversation
Import package-delivery-pulp, promote-to-stable-pulp, pulp-repository-properties, setup-pulp-cli and the pulp script helpers from centreon/centreon-collect/centreon-modules (identical copies) under pulp/, made self-contained so they can be called from another repository. Refs: MON-215510
Release the repository as vX.Y.Z tags from the conventional commit titles merged on main, through a release pull request and a dedicated app token. Lint the actions (self-contained, SHA-pinned), the scripts and the workflows on every pull request. Refs: MON-215510
Replace release-please with a per-action release: every merge on main tags the changed actions <action>-vX.Y.Z (immutable release) and moves their <action>-vX tag, so callers get fixes by referencing the major tag. The lint check validates the PR title and previews the releases. Refs: MON-215510
Refs: MON-215510
Version each top-level directory as a package: release-please keeps a release pull request per package, and merging it tags <package>/vX.Y.Z and moves <package>/vX. The Pulp repository layout becomes an internal script, with a default for the delivery type the promotion does not pass. Bats tests cover the layout, the setup guards and the repository scripts. Refs: MON-215510
Let a maintainer point a major tag back at a previous release, run the delivery action up to the repository layout on a real runner, audit workflows and actions with zizmor, and delay Dependabot updates by 7 days. Refs: MON-215510
actionlint has had no release since March and rejects the self-repository uses syntax; jactionlint, its maintained fork, also checks composite actions. Set the job timeouts it asks for and use the self-repository syntax in the wiring smoke test. Refs: MON-215510
package-delivery and promote-to-stable duplicated the two steps of setup-cli; they now call it with uses: $/pulp/setup-cli, which resolves to the commit of the release in use. The actions check accepts that syntax inside a package only. Refs: MON-215510
The deb verification asked the api once per package, 687 sequential lookups and about 15 minutes for a full plugins delivery. A delivery labels its uploads with its run id, so one filtered listing per repository now answers for all of them; the per-package lookup remains for what the listing misses and for promotions. Refs: MON-215510
Port of centreon-plugins #6516: a task waiting behind another one is not failing, it gets its own budget and the tasks ahead of it are logged; a promotion only republishes when the latest version has no publication. Refs: MON-215510
Port of centreon-plugins #6518, which the centreon copy lacked: content HEADs and per-package presence lookups run 8 at a time, each Packages index is read once into a map, and the rpm presence check follows. The served-build check of the centreon copy is kept on top of the parallel HEADs. Without it a full plugins delivery spent 8 to 9 minutes on sequential HEADs. Refs: MON-215510
Validate a release tag before it reaches an api path, check that the scripts an action runs exist and are executable, serialize the release and the major tag move, run every step with pipefail, and skip the release until its app is configured. Document that refactor and revert changes are released, as release-please does. Add bats tests of the pulp task wait. Refs: MON-215510
A deb promotion whose publication failed after the repository modify could not be rerun: the suite association already existed, so the release component could not be deduced, and the fallback listing of release components is refused (403) to the CI identity, which aborted the script before the recovery that republishes and re-checks the suite. An empty result aborted too, on a grep under pipefail. Both now reach the recovery. Add bats tests of that rerun. Refs: MON-215510
The actions were imported from develop, but the maintained branches of centreon, centreon-collect and centreon-modules carry code develop lacks. Port it so every branch can switch: the 24.x legacy mirror of dev-24.10.x, which deduces the release component without the admin-only listing; the 24.04 routing of dev-26.10.x to the legacy stable repositories; and feature repositories that already exist no longer need the creation token, which dev-25.10.x and dev-24.10.x callers do not pass. Refs: MON-215510
…ir name Port of the centreon-plugins case: plugins and connectors name both suites after the distribution, so the release component is shared and already associated before the reference upload, and the before/after diff that deduces it is empty. Limited to equal suite names: elsewhere a single association may be the testing one. Refs: MON-215510
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
First step of moving the Pulp delivery actions out of the product repositories: they are copied in centreon, centreon-collect, centreon-modules, centreon-plugins and centreon-plugin-packs, so every delivery change has to be ported 5 times and the copies drift. This PR also sets up how the repository is versioned, released and consumed.
Pulp actions:
pulp/:package-delivery,promote-to-stable,setup-cli, plus the shared scripts inpulp/lib.uses: ./.github/actions/...steps (resolved in the caller's workspace) become$/calls or scripts called throughgithub.action_path, so all files come from the same release.pulp-repository-propertiesandparse-distribbecome internal scripts (pulp/lib/repository-properties.sh): no workflow calls them directly, and their ~30 outputs are not a public interface worth versioning.connectorsrepository family from centreon-plugin-packs, so the plugin-packs callers can switch later.connectorsoutputs as the plugin-packs copy.Merged from centreon-plugins, whose copy had diverged from centreon's in both directions:
Packagesindex (centreon-plugins #6518), kept together with the served-build check of the centreon copy.Merged from the maintained branches of centreon, centreon-collect and centreon-modules, which carry code
developlacks:24.x legacy mirror of
dev-24.10.x, which deduces the release component without the admin-only listing.24.04 routing of
dev-26.10.xto the legacy stable repositories.Feature repositories that already exist need no creation token, which
dev-25.10.xanddev-24.10.xcallers do not pass.New here: a deb promotion interrupted after its repository modify can be rerun (the release component listing refused to the CI identity no longer aborts the recovery).
New here: the deb verification finds the packages of a delivery in one listing filtered on its run id label, instead of one api lookup per package (per-package lookup kept as fallback and for promotions).
Versioning and releases:
pulp), versioned on its own with SemVer; it holds one or several actions built on the same code. Same model as grafana/shared-workflows, with release-please.pulp/CHANGELOG.md) from the squash-merged PR titles; merging it creates the immutablepulp/vX.Y.Ztag and GitHub release, then the floatingpulp/vXtag is moved to it.centreon/github-actions/pulp/package-delivery@pulp/v1: a release reaches every branch without touching the product repositories; a new major is opt-in.move-major-tagworkflow: points a major tag back at a previous release in seconds, since a release reaches every caller at once.lint: PR title format, actions packaged / self-contained / SHA-pinned with existing executable scripts, shellcheck, bats (60 tests: Pulp layout, setup guards, task wait, deb verification, deb promotion, feature repositories, repository scripts), a run ofpulp/package-deliveryup to the repository layout on a real runner, zizmor (security) and jactionlint (validity; maintained fork of actionlint, which has had no release since March and also skips composite actions).@v1: a ref applies to the whole repository, so it would give every package the same version.$/self-repository syntax (package-deliveryandpromote-to-stablecall$/pulp/setup-cli) and shared scripts throughgithub.action_path.$/was verified to resolve to the action's own commit when the action is pinned; it needs runner 2.336.0+ (GitHub-hosted and internal runners are on 2.338.2).Repository settings needed before the first release (admin only, listed in the README):
RELEASE_APP_CLIENT_IDrepository variable, its private key in areleaseenvironment limited tomain. Thereleaseworkflow is skipped until the variable exists.Release tagsruleset, which today blocks every tag creation.lintas a required check.Not in this PR:
centreon/github-actionsin their SHA pinning check).connectorsfamily is untested.installers-*-pulpactions, used by centreon-collect only.Tested with real unstable deliveries, from test branches pinning commits of this PR (stability forced to unstable, branches not merged):
dsmworkflow (run 44533299218, commitf586e53): el9, el10 and trixie delivered to the internal 27.01 unstable repositories and verified.centreon-plugins-sudoersworkflow (run 44534490994, commitf586e53): 7 distributions delivered and verified.pluginsworkflow, 687 packages on each of the 7 distributions in parallel (run 44545438433, commit7eb237c): all delivered and verified.$/pulp/setup-clicall ran from the calling repository.Duration of a full plugins delivery, per distribution:
The deb verification went from about 17 min to 43 s. Part of the rest comes from the first production cleanup of the unstable repositories, done the same morning (18,470 to about 2,000 packages per repository), which shortens the repository update and publication whatever the scripts.
Fixes: MON-215510