Table of Contents

Best practices for using branches with Deployment Manager

Follow these best practices when you use branches in your Deployment Manager pipelines. The specific practices depend on whether you have a single development team or multiple development teams in a distributed environment.

If you use branches for application development in a non-distributed environment, developers work on branches and merge them on the development system, after which the continuous delivery pipeline is started automatically or manually.

In a distributed branch-based environment, you can have multiple development systems, and developers author and test the application on a remote development system. They then merge their changes on a main development system, from which the changes are merged and moved in the Deployment Manager workflow.

For more information about best practices to follow in the DevOps pipeline, see Development workflow in the DevOps pipeline.

In general, perform the following steps:

  1. In Deployment Manager, create a pipeline for the target application. If your application consists of multiple built-on applications, it is recommended that you create separate pipelines for each application. By using separate pipelines for built-on applications, you can perform targeted testing of each built-on application, and other developers can independently contribute to application development. For more information about multiple built-on applications, see Using multiple built-on applications.
In Deployment Manager 4.1 (for Pega Platform™ 8.1) and Deployment Manager 3.3.1 and earlier (for Pega 7.4), you must create separate pipelines and branches for each application.
  1. Ensure that the target application is password-protected on all your systems in the pipeline.
    1. Optional: In Designer Studio (if you are using Deployment Manager 3.4.x) or Dev Studio (if you are using Deployment Manager 4.1.x or later), switch to the target application by clicking the name of the application in the header, clicking Switch Application, and then clicking the target application.
    2. In the Designer Studio or Dev Studio header, click the name of the target application, and then click Definition.
    3. Click Integration & Security.
    4. In the Edit Application form, click the Require password to update application checkbox.
    5. Click Update password.
    6. In the Update password dialog box, enter a password, reenter it to confirm it, and click Submit.
    7. Save the rule form.
  2. Optional: If you want to create a separate product rule for a test application, create a test application that is built on top of the main target application. For more information, see Managing test cases separately in Deployment Manager.
  3. On the main development system (in a distributed environment) or development system (in a nondistributed environment), create a development application that is built on top of the either the target application (if you are not using a test application) or the test application.
  4. Include the PegaDevOpsFoundation application as a built-on application for either the team application or the target application.
    1. In either the development application or target application, in the header, click the application, and then click Definition.
    2. In the Edit Application form, on the Definition tab, in the Built on applications section, click Add application.
    3. In the Name field, press the Down Arrow key and select PegaDevOpsFoundation.
    4. In the Version field, press the Down Arrow key and select the version for the Deployment Manager version that you are using.
    5. Save the rule form.
  5. If you are using a distributed environment, import the application package, including the target, development , and test (if applicable) applications, into the remote development system.
  6. Do one of the following actions:
    • If you are using a distributed environment, add branches to the team application on the remote development system. For more information, see Adding branches to your application. If you are using multiple built-on applications, maintain separate branches for each target application. For more information, see Using multiple built-on applications.
    • If you are using a non-distributed environment, create a branch of your production rulesets in the team application. For more information, see Adding branches to your application. You should create separate branches for each target pipeline.
  7. Perform all development work in the branch.
  8. To merge branches, do one of the following actions:
    • If you are using either a non-distributed network (in any version of Deployment Manager) or a distributed network (in Deployment Manager 4.4.x or later), first lock the branches that you want to validate and merge in the application pipeline and then submit the branches in the Merge Branches wizard. For more information, see Starting a deployment in a branch-based or distributed, branch-based environment by using the Merge Branches wizard.
    • If you are using a distributed network and Deployment Manager 4.4.x or and are publishing branches to a main development system to start a build, do the following actions:
      1. On the remote development system, publish the branch to the repository on the main development system to start the pipeline. For more information, see Publishing a branch to a repository.
      2. If there are merge conflicts, log in to the team application on the main development system, add the branch to the application, resolve the conflict, and then merge the branch.
    • If you using a distributed network and versions of Deployment Manager earlier than 4.4.x, or are do one of the following actions so that you can merge branches onto the main development system:
      • If you are using one pipeline per application and application version:
        1. On the remote development system, create a Pega repository that points to the target application on the main development system. For more information, see Creating a repository for file storage and knowledge management.
        2. On the remote development system, publish the branch to the repository on the main development system to start the pipeline. For more information, see Publishing a branch to a repository.
        3. If there are merge conflicts, log in to the team application on the main development system, add the branch to the application, resolve the conflict, and then merge the branch.
      • If you are using multiple pipelines per application and application version:
        1. Package the branch on the remote development system. For more information, see Packaging a branch.
        2. Export the branch.
        3. Import the branch to the main development system and add it to the team application. For more information, see Import wizard landing page.
        4. Merge branches into the target application to start the pipeline by using the Merge Branches wizard. For more information, see Submitting a branch into a pipeline.

100% found this useful


Related Content

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.