Publish modules to the Forge with Travis CI

You can automatically publish new versions of your module to the Forge using Travis CI.

 
  1. If this is your first time using Travis CI for automatic publishing, you must first enable Travis CI to publish to the Forge.
    1. Enable Travis CI for the module repository.
    2. Generate a Travis-encrypted Forge password string. For instructions, see the Travis CI encryption keys docs.
    3. 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

  2. To publish to the Forge with Travis CI, update, tag, and push your repository.
    1. Update the version number in the module's metadata.json file and commit the change to the module repository.
    2. Tag the module repo with the desired version number. For more information about how to do this, see Git docs on basic tagging.
    3. Push the commit and tag to your Git repository. Travis CI builds and publish the module.