-
Notifications
You must be signed in to change notification settings - Fork 10
(CAT-1345) Update gem README.md #61
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
LukasAud
merged 1 commit into
puppetlabs:main
from
david22swan:cat-1345/main/update_readme
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,55 @@ | ||
| # Puppet::Modulebuilder | ||
|
|
||
| ## Table of Contents | ||
|
|
||
| 1. [Overview - What is Puppet::Modulebuilder?](#overview) | ||
| 2. [Description - What does the gem do?](#description) | ||
| 3. [Usage - How can the gem be used?](#usage) | ||
| 4. [Testing - How to test changes to the gem?](#contributing) | ||
| 5. [Contributing - How to contribute to the gem?](#contributing) | ||
| 6. [Development - How to release changes to the gem?](#development) | ||
|
|
||
| ## Overview | ||
|
|
||
| The `puppet-modulebuilder` gem contains the reference implementation for building Puppet modules from source. | ||
|
|
||
| ## Description | ||
|
|
||
| The purpose of this tool is to take a given local module directory and compile it into a `.tar` file, known as the `tarball`, that can then be installed directly by Puppet on a target machine or uploaded onto the [Puppet Forge](https://forge.puppet.com/) so that it can be accessed publicly. | ||
|
|
||
| As part of this process any non-deliverable aspects of the module, parts of it related to the modules development or testing for example, are stripped away leaving only the documentation and the puppet/ruby code that is needed for the module to function. | ||
|
|
||
| ## Usage | ||
|
|
||
| This gem can be used in one of two ways, the first being to call on it directly as shown in the example below: | ||
|
|
||
| ```ruby | ||
| builder = Puppet::Modulebuilder::Builder.new('./puppetlabs-motd', './pkg', nil) | ||
| builder.build | ||
| ``` | ||
|
|
||
| ## Development | ||
| For conveniances sake the `puppet-modulebuilder` gem has been included within the `PDK` and as such can be called on to run against a module from within it using the build command as shown below: | ||
|
|
||
| ```ruby | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't ruby |
||
| pdk build | ||
| ``` | ||
|
|
||
| ### Testing | ||
|
|
||
| To release a new version, update the version number in `version.rb`, run `bundle exec rake changelog` and create a mergeback PR with the results. If that passes, run `bundle exec rake 'release[upstream]'`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). | ||
| Acceptance tests for this module leverage [puppet_litmus](https://github.com/puppetlabs/puppet_litmus) | ||
|
|
||
| ```bash | ||
| bundle exec rake 'litmus:provision[docker, litmusimage/ubuntu:22.04]' | ||
| bundle exec rake 'litmus:install_agent[puppet8-nightly]' | ||
| bundle exec rake 'litmus:install_module' | ||
| ``` | ||
|
|
||
| ## Contributing | ||
|
|
||
| Bug reports and pull requests are welcome on GitHub at https://github.com/puppetlabs/puppet-modulebuilder. | ||
|
|
||
| ## Development | ||
|
|
||
| To release a new version, simply run the `Release Prep` github action workflow, passing it the desired version, in order to generate a PR containing the necesary changes. | ||
|
|
||
| Once this PR is merged you can then run the `Release` action in order to build the gem and push it to [rubygems.org](https://rubygems.org). | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it describe which files it reads here? Like
.gitignore,.pmtignore,.pdkignoreand in which order?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a new PR with an update: #62