Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PA-5701) Allow platform's name to be overridden
The puppet-runtime repo needs to build agent-runtime-7.x and agent-runtime-main projects using different solaris 11 sparc platform definitions, one is cross-compiled, the other is not. It's not possible to have conditional logic in the platform definition, because the platform DSL is evaluated before the project DSL[1]. In addition, the platform definition's filename is used to name the build artifacts, for example note solaris-113 in: agent-runtime-main-202308020.2.g2ddb502.solaris-113-sparc.tar.gz However, this breaks vanagon projects that try to consume that tarball, like pxp-agent-vanagon and puppet-agent. Therefore, this modifies vanagon so that it's possible to override the platform name, version or architecture, different than the platform definition's filename, for example: # In configs/platforms/solaris-11-sparc.rb platform "solaris-11-sparc" do |plat| # used to build agent-runtime-7.x # In configs/platforms/solaris-11-native-sparc.rb platform("solaris-11-sparc", override_name: true) do |plat| # used to build agent-runtime-main This also eliminates needing to special case `os_version`[2]. This is backwards compatible for existing platform definitions. However, any platform definition that passes `override_name` must update their vanagon dependency. [1] https://github.com/puppetlabs/vanagon/blob/54d2a797cc95a84b4da48726a9a5b2943bfaf014/lib/vanagon/driver.rb#L34-L35 [2] https://github.com/puppetlabs/puppet-runtime/blob/2ddb50288e18d0f8f189a4b8ecda587cd7135643/configs/projects/_shared-agent-settings.rb#L127
- Loading branch information