Custom deployment policies
If the built-in deployment policies included with Continuous Delivery for Puppet Enterprise (PE) don't align with how your organization uses PE, you can write custom deployment policies tailored to your needs.
- Include Git processes in your chosen source control provider.
- Use Puppet orchestrator to make changes to your node groups.
- Run Bolt tasks and plans
- Issue automatic notifications via the third-party services, such as Slack and ServiceNow
Custom deployment policies use the puppetlabs-cd4pe_deployments
module, which is built into Continuous Delivery for PE. This means you don't need to download or install
anything in order to use custom deployment policies. For a full list of functions and
variables you can use in your custom deployment policies, refer to the puppetlabs-cd4pe_deployments
module's README and REFERENCE on GitHub. Also in the module's GitHub repository, we've rewritten the built-in deployment policies as custom
policies so you can use these examples when writing your own policies.
Warnings and restrictions
Add a custom deployment policy to your control repo
Each custom deployment policy file must be stored in a module, named deployments
, in the control repo that uses the policy.
production
branch. If your control repo
doesn't have a production
branch, or you want to store
custom deployment policies on a different branch, you must manage your pipelines as
code and tell Continuous Delivery for PE where to find your custom
deployment policy files.production
:- Open the pipeline's
.cd4pe.yaml
file. - Locate the
config
section. - Set
deployment_policy_branch
to the branch where the custom deployment policy files are stored.
For information about pipelines-as-code and .cd4pe.yaml
files, refer to Construct pipelines from code and
.cd4pe.yaml file structure.
production
branch, or you want to store custom deployment policies on
a different branch, you must use pipelines-as-code and specify the deployment_policy_branch
setting, as explained
above.These requirements don't apply if your control repo has aproduction
branch and you'll store your
custom deployment policy files on that branch.