Fluent Commerce Logo
Docs
Sign In

CI/CD Pipeline Configuration Using Fluent CLI

How-to Guide

Author:

Nandha Balaguru

Changed on:

16 May 2025

Key Points

  • The CI/CD pipeline is configured for Bitbucket and requires changes for other repositories
  • The CLI is not used for retailer creation in the deployment process
  •  One retailer's assets can be deployed at a time through manual selection.
  • The E2E plugin must be manually placed in the
    `plugins/`
    folder before starting the pipeline.

Steps

Step arrow right iconOverview

This document outlines the CI/CD pipeline setup configured for Bitbucket. For other repositories, the associated

`.yml`
file should be adapted accordingly.

Step arrow right iconPre-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 


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

Step arrow right iconCI/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 Retailer

This 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

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

Pipeline Variable Configuration

Account-Level Variables

1dev_fluentApiHost  
2dev_fluentUserName  
3dev_fluentPassword  
4dev_fluentAccountId  
5dev_fluentClientSecret  
6dev_fluentClientSecret_integration
7

Language: plain_text

Name: Account-Level Variables

Description:

Replace

`dev`
with
`uat`
or
`prod`
as per the target environment.


Retailer-Level Variables

1dev_retailer_<retailer_ref_in_lowercase>_id  
2dev_retailer_<retailer_ref_in_lowercase>_username  
3dev_retailer_<retailer_ref_in_lowercase>_password  
4dev_retailer_<retailer_ref_in_lowercase>
5

Language: json

Name: Retailer-Level Variables

Description:

Replace

`dev`
with
`uat`
or
`prod`
depending on the instance.


Step arrow right iconRelated Sources