Creating custom deployment policies
If the built-in deployment policies included in Continuous Delivery for PE don't align with the way your organization works with Puppet Enterprise, you can write a custom deployment policy tailored to your needs.
- Git processes in your source control provider of choice
- Changes to your node groups with Puppet orchestrator
- Bolt tasks and plans
- Automatic notifications via the third-party services you use daily, such as Slack and ServiceNow
The puppetlabs-cd4pe_deployments
module is built into Continuous Delivery for PE, so you don't need to download or install anything in
order to use custom deployment policies. To see the full list of what's available for
inclusion in your custom deployment policy, see the documentation for the puppetlabs-cd4pe_deployments
module.
If you need some inspiration, see how the deployment policies built into Continuous Delivery for PE look when written in custom deployment policy format.
Custom deployment policy prerequisites and cautions
- In order for your custom deployment policies to be available for use in the web UI, you must have webhooks enabled between Continuous Delivery for PE and your source control system.
- Do not include sensitive parameters in your custom deployment policy if you use the custom deployment policy in a pipeline managed with code.
Add a custom deployment policy to your control repo
Each custom deployment policy file you create must be stored in a module named
deployments
in the control repo that will utilize the
policy.
production
branch.If your control repo doesn't
have a production
branch, or if you prefer to store
custom deployment policies on a different branch, tell Continuous Delivery for PE where to look for your custom deployment policies
by using the deployment_policy_branch
setting of the
config
section of .cd4pe.yaml
file. For details, see Structuring a .cd4pe.yaml file.
production
branch, you must manage your control repo's pipelines with
a .cd4pe.yaml
file in order to use
them.