Repository navigation
Conversation
Builds rpm or deb packages from nfpm configurations, caches them and optionally uploads them. What the local copies of the product repositories did each on their own is an input.
The package extension, the version cadence, the extra variables and the per-distribution variable files leave the action: the first two are known from its other inputs, the last two belong to the calling workflows.
The files next to a configuration are left to the calling workflow, and a deb takes its release from deb_release instead of a stability rule.
The configurations read the commit hash and their other values as nfpm variables, an empty key file variable skips the signature, and nfpm writes the packages in the working directory itself.
An unsigned rpm is built only when allow_unsigned asks for it, and the key is no longer written for a deb build.
Contributor
Author
|
Superseded by #13: same change on a branch with a single commit. |
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
Second action of the
packagingpackage:packaging/nfpm, the shared version of the localpackage-nfpm/packageactions (6 repositories, 15 variants once their maintained branches are counted). It goes in the samepackaging1.0.0 release asparse-distrib.${COMMIT_HASH}and their other values as variables (withexpand: trueon thecontentsentries using one in a path), the key file variable decides the signature, and--targetwrites the packages in the working directory.@APACHE_USER@/@APACHE_GROUP@: nfpm does not read the owner of a file from the environment.deb_release,deb_copyrightandallow_unsigned. What a single repository needs stays in its workflows; the README lists, per repository, the inputs and the changes its switch needs.The switch of a repository therefore changes its configurations too (
@COMMIT_HASH@to${COMMIT_HASH}, and for a few@luaver@or@PHP_MIN_VERSION@to variables), in the same pull request as its workflows.Behavior changes a reviewer cannot guess from the diff:
key.gpgin the workspace.allow_unsigned: "true"builds it unsigned instead, which is what centreon does today. The key is only written for an rpm build.@UPPERCASE@placeholder left in a configuration fails the step in every repository; centreon-agent had no such check.package_extensionandstabilityare no longer inputs.NEXT_MAJOR_VERSIONneeds no branch-specific code: six months later before 26.10, the next month since.<release>+deb12u1instead of<release>~bookworm, which Debian sorts as newer for the same release.actions/cache/savev6.1.0; the callers restore them with older versions of the action.Equivalence with the local copies:
develop,dev-26.10.x,dev-25.10.x,dev-24.10.xof centreon, centreon-collect, centreon-modules;developof centreon-plugins, centreon-stream-connector-scripts, centreon-agent) was run next to this script with a stand-in of nfpm, on 7 distributions, 4 stabilities and several versions, the configurations of the shared side being written the new way.LUA_VERSIONvariable, and the suffix of its debs, changed on purpose.descriptionandcontentspaths withexpand: trueare expanded, the owner of a file is not, empty key variables build an unsigned rpm, and a passphrase-protected key gives an rpm carrying RSA and PGP signatures.Tests and checks:
lintbuilds a real, unsigned package with nfpm 2.43.4 inside Debian and AlmaLinux containers, cache step included.Not covered here, to check when the callers switch:
Fixes: MON-216366