Skip to content
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

(FEAT) Add PE to matrix_from_metadata_v3 #576

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

coreymbe
Copy link
Contributor

@coreymbe coreymbe commented Oct 24, 2024

Summary

This commit adds a feature to the matrix_from_metadata_v3 tool allowing users to pass the option --pe-include which will add Puppet Enterprise LTS versions to the collection matrix.

This is done by utilizing the puppet_forge gem to make a connection to the Forge API and retrieve a list of PE versions.

The code in this commit will only add the LTS versions of PE to the collection matrix if the tool is passed the aforementioned option and the puppet version in the LTS falls within the supported range found in the metadata.

Note: Ideally this would add LTS and STS to the collection matrix. Once PE 2025.y is released, this could be easily updated to add the STS to the collection as well.

Additional Context

My team is currently unable to utilize this tool to test our modules against PE. As such we are building our own matrix in separate workflows for PE and OSP. It would be nice to have a way to dynamically determine the LTS and STS PE versions and add them to the collection matrix.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified.
# bundle exec rspec spec/exe/matrix_from_metadata_v3_spec.rb --format documentation

matrix_from_metadata_v3
  without arguments
    run successfully
    generates the matrix
  with puppetlabs GITHUB_REPOSITORY_OWNER
    run successfully
    generates the matrix
  with argument --puppetlabs
    run successfully
    generates the matrix
  with --exclude-platforms "ubuntu-18.04"
    run successfully
    generates the matrix without excluded platforms
  with --platform-exclude "ubuntu-(18.04|22.04)" --platform-exclude "redhat-[89]"
    run successfully
    generates the matrix without excluded platforms
  with --pe-include
    run successfully
    generates the matrix with PE LTS versions

Finished in 3.96 seconds (files took 0.26874 seconds to load)
12 examples, 0 failures

@coreymbe coreymbe requested a review from a team as a code owner October 24, 2024 19:50
@david22swan
Copy link
Member

Hey, gonna approve and merge this, but going forward with PRs could you open them from the main fork instead of your own as otherwise the mend scan will not work.

@david22swan david22swan merged commit 30d176e into puppetlabs:main Oct 25, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Has been Actioned
Development

Successfully merging this pull request may close these issues.

2 participants