This document outlines the CI/CD pipeline setup configured for Bitbucket. For other repositories, the associated `.yml` file should be adapted accordingly.
Pre-requisites
1)Install & Understand what is Fluent CLI Follow the steps in the official Fluent CLI documentation to install the CLI tool: Getting Started with the Fluent CLI
Note
The CLI is not used for retailer creation in the deployment process. Additionally, the installation and upgrades of the reference modules are not part of this pipeline and are expected to be handled separately.
2) Migrate from ES Template to Module Template Use Fluent CLI command to create a module: Fluent CLI - command
3)Download Sample B2C Data To understand the required format for retailer-specific data: B2C Sample Data (Latest) 4) Understand Module Lifecycle Refer to the following documentation to understand module structure and lifecycle: About Reference and Extension Modules
CI/CD Pipeline Overview
The CI/CD pipeline is structured into three main steps:1. Run Unit Tests (Plugin)
Ensures all unit tests pass successfully.
If this step fails, the pipeline will stop.
If successful, it proceeds to plugin and data deployment.
2. Deploy Plugin & Data for RetailerThis step allows manual selection of the retailer. You can deploy:
Plugin only
Data only (Includes all the assets in the module)
Both plugin and data
Note:
Plugins are deployed at the account level.
Retailer data is deployed at the retailer level, and the current configuration supports only one retailer at a time.
Structure:
`resources/` – The root folder containing all module assets.
Key Files & Folders
`module.config.json` Contains token definitions required during deployment. If no tokens are needed, use an empty object: `{}` Note: This file serves as a configuration template and will be used by Fluent Module Config to generate the actual configuration file for a specific account and retailer.
`module.json` Contains module metadata like name, version, dependencies(Fluent Reference Modules) and author details.
Retailer Data Folders (inside `resources/`) Examples: `accountSettings`, `accountUsers`, `carriers`, etc. Only include folders relevant to the specific retailer during deployment process.
Deployment Flow:
Prepare your `resources` folder and Json files(module.config.json , module.json) under the resources .
Push changes to the configured branch in your repository.
This triggers the unit test stage.
Manually select the retailer for deploying the assets, which may include data, configurations, and workflows that utilise rules defined in the plugin.
3. Run End-to-End (E2E) Tests
Manually trigger E2E tests by selecting the desired retailer. Note: The E2E plugin must be manually placed inside the `plugins` folder before the pipeline is started. This step is not handled by the pipeline and should be completed in advance. Get in touch with the ES team to get E2E test plugin