Using the feature branch workflow
Use the feature branch workflow to safely and efficiently move new code from an isolated development environment through initial testing and validation and then into your organization's staging, review, and promotion to production process. This guide provides an outline of this core Continuous Delivery for PE workflow; adapt the steps as needed to meet your team's requirements and best practices.
Part 1: Develop and test code changes
The first phase of the feature branch workflow focuses on writing new code in a feature branch, then testing and validating that code.
- Use commits as a pipeline trigger
- Contain a deployment using the feature branch deployment policy

pipelines:
/feature_.*/:
triggers:
- "PULL_REQUEST"
- "COMMIT"
stages:
- name: "Lint/Parser validation"
steps:
- type: "JOB"
name: "control-repo-puppetfile-syntax-validate"
concurrent_compilations: 0
all_deployments: false
- type: "JOB"
name: "control-repo-template-syntax-validate"
concurrent_compilations: 0
all_deployments: false
auto_promote: "all_succeeded"
- name: "Deploy feature environment"
steps:
- type: "DEPLOYMENT"
name: "Feature branch deployment on cdpe-delivery"
policy:
name: "cd4pe_deployments::feature_branch"
concurrent_compilations: 0
all_deployments: false
pe_server: "cdpe-delivery"
auto_promote: false
Part 2: Review and merge to production
In the second phase of the feature branch workflow, the new code is reviewed and merged to the master branch, then deployed to production. Along the way, Continuous Delivery for PE provides checks and safeguards to ensure new code is only sent to production nodes when it has been fully vetted.