Publish modules to the Forge with Travis CI
You can automatically publish new versions of your module to the Forge using Travis CI.
- If this is your first time using Travis CI for automatic
publishing, you must first enable Travis CI to publish to the Forge.
- Enable Travis CI for the module repository.
- Generate a Travis-encrypted Forge password string. For instructions, see the Travis CI encryption keys docs.
- Create a
.travis.yml
file in the module's repository base. Include a deployment section that includes your Forge username and the encrypted Forge password, such as:deploy: provider: puppetforge user: <FORGE_USER> password: secure: "<ENCRYPTED_FORGE_PASSWORD>" on: tags: true # all_branches is required to use tags all_branches: true
- To publish to the Forge
with Travis CI, update, tag, and push your repository.
- Update the version number in the module's
metadata.json
file and commit the change to the module repository. - Tag the module repo with the desired version number. For more information about how to do this, see Git docs on basic tagging.
- Push the commit and tag to your Git repository. Travis CI builds and publish the module.
- Update the version number in the module's