Configuring your pipelines for management with code

To begin managing your existing pipelines with code, or to create new pipelines using a .cd4pe.yaml file, follow the instructions on this page appropriate to your circumstances.

Have you added your control repo or module to Continuous Delivery for PE? Do you have a .cd4pe.yaml file containing the pipeline definitions you want to use? Follow these instructions
yes not yet Convert your existing pipelines to code
yes yes Update your pipelines using a new .cd4pe.yaml file
not yet yes Create new pipelines using a .cd4pe.yaml file

Convert your existing pipelines to code

If you've created pipelines using the Continuous Delivery for PE web UI, but now want to manage those pipelines with code, Continuous Delivery for PE will render your existing pipelines in YAML format.

Before you begin
Add a control repo or module to Continuous Delivery for PE and set up a pipeline. For instructions, see steps 4 and 5 of Getting started with Continuous Delivery for PE.

  1. In the Continuous Delivery for PE web UI, navigate to the control repo or module whose pipelines you want to manage with code.
  2. At the top of the Pipelines section, click Manage pipelines.
  3. Select Manage as code. Continuous Delivery for PE displays your pipelines in YAML format.
  4. Copy the YAML code by scrolling to the bottom of the code block and clicking Copy to clipboard.
  5. Create a new file named .cd4pe.yaml and paste the YAML code into it.
    Important: The file must be named .cd4pe.yaml.
  6. Save the new .cd4pe.yaml file to the root directory of your control repo or module, and commit the change in your source control system.
    You can save the .cd4pe.yaml file to whichever branch you prefer. In the next step, you'll tell Continuous Delivery for PE where to look for the file in your source control system.
  7. In the Continuous Delivery for PE web UI, in the Select branch area, select the branch to which you saved the .cd4pe.yaml file.
  8. Click Save settings.
Results
Continuous Delivery for PE now reads the contents of your .cd4pe.yaml file before every pipeline run, and uses the YAML code to render the pipelines' definitions in the web UI. Because you're managing your pipelines with code, the pipeline controls in the web UI are disabled.

Update your pipelines using a new .cd4pe.yaml file

If you've created pipelines using the Continuous Delivery for PE web UI, but now want to update those pipelines to use new definitions housed in a .cd4pe.yaml file, you can do so by saving the file to your control repo or module.

Before you begin
You'll need a properly formatted .cd4pe.yaml file containing the definitions of the pipelines you want to create. For more on .cd4pe.yaml file syntax, see Structuring a .cd4pe.yaml file.
  1. Add a .cd4pe.yaml file containing the definitions of the pipelines you want to create to the root directory of your control repo or module. Commit the file to your source control system.
    You can save the .cd4pe.yaml file to whichever branch you prefer. Later, you'll tell Continuous Delivery for PE where to look for the file in your source control system.
  2. In the Continuous Delivery for PE web UI, navigate to the control repo or module whose pipelines you want to manage with code.
  3. At the top of the Pipelines section, click Manage pipelines.
  4. Select Manage as code.
  5. In the Select branch area, select the branch to which you saved the .cd4pe.yaml file.
  6. Click Save settings.
Results
Continuous Delivery for PE now reads to contents of your .cd4pe.yaml file before every pipeline run, and uses the YAML code to render the pipelines' definitions in the web UI. Because you're managing your pipelines with code, the pipeline controls in the web UI are disabled.

Create new pipelines using a .cd4pe.yaml file

You can create pipelines with code for a brand-new control repo or module in Continuous Delivery for PE. If a .cd4pe.yaml file exists in your control repo or module when it is first added to Continuous Delivery for PE, the software will detect this file and ask if you want to use it to build and manage your pipelines.

  1. Add a .cd4pe.yaml file to the root directory of your control repo or module on the master branch. Commit the file to your source control system.
  2. Add the control repo or module to Continuous Delivery for PE.
    For instructions, see steps 4 and 5 of Getting started with Continuous Delivery for PE.
  3. When adding the control repo or module, Continuous Delivery for PE will detect the .cd4pe.yaml file and ask if you want to use it to build and manage your pipelines. Click Confirm.
Results
Continuous Delivery for PE now reads to contents of your .cd4pe.yaml file before every pipeline run, and uses the YAML code to render the pipelines' definitions in the web UI. Because you're managing your pipelines with code, the pipeline controls in the web UI are disabled.

Stop managing your pipelines with code

If you want to stop managing your pipelines with a .cd4pe.yaml file, and return to using the pipeline controls in the web UI, use the Manage pipelines control to make the switch.

  1. In the Continuous Delivery for PE web UI, navigate to the control repo or module whose pipelines you are currently managing with a .cd4pe.yaml file.
  2. At the top of the Pipelines section, click Manage pipelines.
  3. Select Manage in the web UI and make any needed adjustments to your pipeline settings.
  4. Click Save settings.
Results
The pipeline controls in the web UI are enabled. Your .cd4pe.yaml file is now ignored by Continuous Delivery for PE, and all pipeline changes must be made in the web UI.
Tip: To avoid confusion, remove the .cd4pe.yaml file from your control repo or module.