Puppet Forge Deployment
This page documents deployments using dpl v1 which is currently the legacy version. The dpl v2 is released, and we recommend useig it. Please see our blog post for details. dpl v2 documentation can be found here.
Travis CI can automatically deploy your modules to Puppet Forge or to your own Forge instance after a successful build.
To deploy to Puppet Forge, add your Puppet Forge username and your
encrypted Puppet Forge password to your
.travis.yml
:
deploy:
provider: puppetforge
user: "<Your username>"
password:
secure: "YOUR ENCRYPTED PASSWORD"
Deploy to a Custom Forge #
To deploy to your own hosted Forge instance by adding it in the url
key:
You can explicitly set the name via the app option:
deploy:
provider: puppetforge
user: "<Your username>"
password:
secure: "YOUR ENCRYPTED PASSWORD"
url: https://forgeapi.example.com/
Run Commands Before or After Deploy #
Sometimes, you want to run commands before or after deploying. You can use
the before_deploy
and after_deploy
stages for this. These will only be
triggered if Travis CI is actually deploying.
before_deploy: "echo 'ready?'"
deploy:
..
after_deploy:
- ./after_deploy_1.sh
- ./after_deploy_2.sh