Skip to content

Add PuppetCore gem source support to gem_ci and tools_mend_ruby workflows #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 2, 2025

Conversation

gavindidrichsen
Copy link
Contributor

@gavindidrichsen gavindidrichsen commented Apr 1, 2025

Overview

This PR is about puppetcore enablement:

  • It simplifies the existing puppetcore-enabled module_ci.yml, removing an unnecessary input parameter.
  • It enhances gem_ci.yml and tooling_mend_ruby.yml enabling puppetcore.

All updates have been manually tested against puppetcore and non-puppetcore consumers to ensure backward compatibility. For example, this puppet_upgrade PR enables puppetcore and re-uses both the gem_ci.yml and tooling_mend_ruby.yml. Therefore I found 2 non-puppetcore consumers (puppet-strings and puppet_litmus) of these same shared workflows and verified that these consumers also continue to work as expected. The tests results are all below in the PR comments.

Changes

  • Removed puppetcore_api_type input parameter because the extra flexibility was not worth the cost of added complexity, I believe.
  • Added environment configuration for PuppetCore authentication using PUPPET_FORGE_TOKEN. This "secret" is then in turn used to set the BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM which enables authenticated access to the puppetcore gems

ALSO updated the how to document for consumers of these re-usable modules, see docs/how-to/how_to_inject_puppetcore_authentication_into_the_shared_workflows.md

Impact

  • Modules using these workflows can now access private Puppet gems when authorized
  • Consuming workflows need to set a valid PUPPET_FORGE_TOKEN secret on their repository
  • No breaking changes expected as all new parameters have sensible defaults and the new shared workflows have been verified with both a puppetcore enabled module. See in the comments below for proof of testing.

@gavindidrichsen
Copy link
Contributor Author

Given that 2 shared workflows have changed in this PR, module_ci.yml and 'gem_ci.yml, I wanted to manually test puppetcore and non-puppetcore against both the module_ci.yml and 'gem_ci.yml

Verification of module_ci.yml

puppetcore repo:

image

non-puppetcore repo:

image

Verification of gem_ci.yml

puppetcore repo:

image

non-puppetcore repo:

image

@gavindidrichsen
Copy link
Contributor Author

Given that another shared workflow has changed in this PR, tooling_mend_ruby.yml, I wanted to manually test puppetcore and non-puppetcore against this too

Verification of tooling_mend_ruby.yml

puppetcore repo:

image

non-puppetcore repo:

image

@gavindidrichsen gavindidrichsen changed the title Update gem_ci.yml with puppetcore Add PuppetCore gem source support to gem_ci and tools_mend_ruby workflows Apr 2, 2025
This commit enables puppetcore by adding the necessary secret and environment variables.

Signed-off-by: Gavin Didrichsen <[email protected]>
This commit simplifies the existing module_ci removing an unnecessary parameter.  I decided that the added flexibility was not worth the complexity.

Signed-off-by: Gavin Didrichsen <[email protected]>
@gavindidrichsen gavindidrichsen marked this pull request as ready for review April 2, 2025 11:19
@gavindidrichsen gavindidrichsen requested review from a team as code owners April 2, 2025 11:19
@danadoherty639 danadoherty639 merged commit 03d8a7d into main Apr 2, 2025
2 checks passed
@danadoherty639 danadoherty639 deleted the OSPTE-186 branch April 2, 2025 11:44
gavindidrichsen added a commit that referenced this pull request Apr 15, 2025
This reverts commit 03d8a7d, reversing
changes made to 28ec60f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants