CI/CD Best Practices
Continuous Integration and Continuous Deployment (CICD) Best Practices for Pliant
Pliant Workflows and Branch Management
Pliant offers a robust low-code/no-code automation solution that operates through user-defined "workflows". To ensure seamless version control and collaboration, Pliant integrates with Bitbucket, allowing users to store and retrieve workflows as needed. This document outlines the best practices for integrating Pliant workflows with Bitbucket to optimize the development, testing, and deployment processes.
The integration mechanism between Pliant and Bitbucket is comprehensive. When configured at the root directory, the system will push or pull all workflows, including those in sub-directories, irrespective of individual changes. This approach ensures consistency but requires careful management to avoid unintended overwrites.
1. Repository Setup
Initialize a Repository: Begin by creating a new repository in Bitbucket to house your Pliant workflows.
Establish a Main Branch: This branch will serve as the primary source of truth. Initially, push all existing workflows into this branch to establish a baseline.
Develop a Feature/Development Branch: Clone the main branch to create a 'feature/develop' branch. This branch will be used for ongoing development and testing.
2. Pliant Configuration
Creating a Git Authentication in Pliant
For seamless integration with various Git systems like Github, Bitbucket, and Gitlab, Pliant offers a universal "Git" authentication schema. This guide will walk you through setting up this authentication.
Required Fields for Authentication:
URL of the Git system: This is the repository URL.
Username: Your Git system username.
Password/RSA Key/Personal Access Token: Depending on the Git system you use, this could be a password, an RSA key, or a personal access token.
Branch: Essential if you wish to perform merges.
Email Address: This is for additional communication or recovery options.
Instructions for Specific Git Systems:
Generating a Personal Access Token:
Navigate to the top-right corner of any page and click on your profile photo.
From the dropdown, select
In the left sidebar, click on
Personal access tokens.
Tokens (classic)to generate a Personal Access Token.
Note: This token functions as the password for Pliant's authentication. Store it securely, as Github will not redisplay it. If misplaced, you'll need to generate a new token.
Repository URL Structure for Github:
Generating an App Password:
Click on the gear icon situated at the top-right corner.
Personal Bitbucket Settings.
In the left sidebar, opt for
On the main page, click on
Create App Passwordand complete the form.
Note: This password is used in Pliant's authentication. Ensure its safekeeping, as Bitbucket will not redisplay it. A lost password necessitates the creation of a new one.
Repository URL Structure for Bitbucket:
Generating a Personal Access Token:
In the left sidebar, click on your avatar, then choose
On the subsequent sidebar, select
Add new token.
Provide a name and specify an expiry date for the token.
If no expiry date is inputted, it defaults to 365 days from the current date.
Choose the required scopes and then click on
Create personal access token.
Note: This token will serve as the password in Pliant's authentication. Preserve it securely, as Gitlab won't display it again. A mislaid token requires generating a new one.
Repository URL Structure for Gitlab:
3. Workflow Development and Management
Routine Updates: As you modify or create new workflows, regularly push these changes to the 'feature/develop' branch. This practice ensures that your work is consistently backed up and available to other collaborators.
Branching for Testing: If you require separate environments for Quality Assurance (QA) or User Acceptance Testing (UAT), create these branches from the 'feature/develop' branch. This hierarchical structure ensures that all branches have access to the latest development changes.
If and when changes are made to the further sub-branches, such as QA or UAT, test them thoroughly to ensure functionality. When changes are made to these branches on the Pliant system, push the flows back into the QA or UAT branch, then use Bitbucket to merge those changes into the featuare/develop branch.
At this point, again modify your Pliant git integration from the root folder to pull from feature/develop, and pull the flows fresh for further refinement.
4. Finalizing Workflows
Merging Strategy: When you're satisfied with the changes and they've passed all necessary tests, begin the merging process. Start by merging any QA or UAT branches back into 'feature/develop'. Once consolidated, you can then merge 'feature/develop' into the main branch.
Maintain a Clean History: Ensure that commit messages are descriptive and relevant. Before merging, consider squashing multiple commits into a single, comprehensive commit to maintain a clean and interpretable history. It is important to remember the pushing flows to a branch overwrites all flows currently there, whether they have changed or not. It is a good practice to add a message when pushing flows from Pliant to indicate what changes have been made.
Pliant Folder Hierarchy and Branch Management
Pliant's folder hierarchy is designed to mirror the development lifecycle stages, ensuring a clear separation of workflows at each phase. This structure facilitates simultaneous modifications across different stages without interference.
Assume a directory structure organized as follows:
Each of these folders corresponds to a specific phase in the development process:
Development Folder: This is where all new workflows and modifications are initially created and tested. It directly corresponds to the 'feature/develop' branch in Bitbucket.
QA Folder: Workflows that are ready for quality assurance testing are moved to this folder. It is linked to the 'QA' branch in Bitbucket.
UAT Folder: After passing QA, workflows are transitioned to the UAT folder for user acceptance testing. This folder is integrated with the 'UAT' branch in Bitbucket.
Main Folder: This directory houses the finalized workflows that have passed all testing phases. It is a reflection of the 'main' branch in Bitbucket. No direct modifications are made in this folder; it solely serves as a repository for approved workflows.
Each folder in Pliant's hierarchy has its own dedicated Bitbucket integration:
Changes made in the
developmentfolder are pushed to and pulled from the 'feature/develop' branch.
QAfolder synchronizes with the 'QA' branch.
UATfolder is integrated with the 'UAT' branch.
mainfolder aligns with the 'main' branch in Bitbucket.
This compartmentalized approach ensures that:
Workflows in each phase can be modified independently.
Pushing from a specific folder updates only its corresponding branch in Bitbucket.
Pulling into a folder retrieves workflows solely from its linked branch, ensuring no cross-contamination.
Best Practices for Folder Management
Maintain Phase Integrity: Ensure that workflows are modified only in their designated folders. For instance, QA testing should exclusively occur within the
Sequential Advancement: Once workflows pass a particular phase, transition them to the next folder in the sequence. For example, after development, move workflows to the
QAfolder for testing.
Final Approval: Only after a workflow has been vetted in the
UATphase should it be merged into the 'main' branch in Bitbucket. Subsequently, it will reflect in the
mainfolder in Pliant.
Regular Syncing: To maintain consistency, regularly synchronize each folder with its corresponding Bitbucket branch. This practice ensures that all team members have access to the latest version of a workflow at each stage.
Pliant's folder hierarchy, combined with dedicated Bitbucket branch integrations, offers a streamlined and organized approach to workflow development, testing, and deployment. Adhering to the outlined structure and best practices ensures efficient collaboration and minimizes the risk of errors.
Addendum: Multi-Account Development in Pliant with Extended Branching
The primary documentation assumes workflow development is conducted using a singular shared Pliant account. However, in scenarios where multiple Pliant accounts are in use, the folder hierarchy and branch management will differ, introducing a more granular branching structure.
Multi-Account Folder Hierarchy
In a multi-account setup, the directory structure will be organized by individual user accounts and further segmented by the development phase, as illustrated below:
... and so forth for additional users.
Extended Branch Management Options
For this multi-account scenario, the Bitbucket branch hierarchy will be more intricate:
... and so forth for additional users and phases.
Users can opt-out of specific branches if they don't engage in that phase of development. For instance, if
userThreedoesn't participate in QA, then the branch
main->develop->qa->userThreeand the corresponding folder
/Users/userThree/branches/qawill be absent.
This extended branching strategy effectively multiplies the number of required Pliant licenses based on the number of workflows in use across all branches.
The extended branching strategy for multi-account development in Pliant offers a granular approach to workflow management, catering to individual user roles and responsibilities. While it provides flexibility and specificity, teams must be cognizant of the increased licensing requirements and ensure clear communication to navigate the intricate branch hierarchy effectively.