Planning a CI/CD pipeline

You need to have a strategy for frequently deploying new features, updates, or fixes to your production environment. Since the HCL Commerce runtime environment is run on Docker containers, take advantage of containerization and implement a continuous integration and continuous deployment (CI/CD) pipeline. A CI/CD pipeline helps you automate processes in your development life cycle, from when a developer checks in code, to deploying the code to your production environment. Properly configuring a pipeline can help you seamlessly release updates more frequently; either with incremental changes or full releases.

The CI portion of the pipeline facilitates packaging custom code and building custom Docker images. The CD portion of the pipeline facilitates deploying the custom images to new or existing environments.

Ensure that you research and plan accordingly before deciding which tools you want to implement to facilitate your CI/CD pipeline. Think about which software work best for your business. For example, you might want to implement by using Jenkins, UrbanCode Deploy, or a combination of both.

Note: HCL is not responsible for your pipeline configuration. Use the following high-level information as a guide to decide how you want to build your pipeline to suit your unique business requirements.

Pipeline overview

Depending on your development practices, you might consider a pipeline that follows this scenario:

Developer creates code in the development environment (HCL Commerce Developer).
Developer pushes code to a source code repository. For example, Git.
Implement scripts (such as python or groovy scripts) so that when code is integrated, the pipeline can automatically call the WCB utility to pull code from the source repository and build a customization package, and then push the package to an artifact repository. For example, you might want to use an artifact repository like Nexus.
Implement scripts so that the pipeline pulls the customization package from the repository, creates new Docker images and then pushes the images to a Docker repository. To create new images, you need to define a Dockerfile. In this step, you can also use Run Engine commands to configure the application within the Docker images. For example, to configure a data source for the application to connect to your database.
Deployment administrator can deploy new test/QA environments with these Docker images. You can run automated unit tests or functional tests on the new environments.
Deployment administrator can deploy initial authoring and production environments or update existing authoring and production environments that are running in your container platform.
Note: This step is the most challenging part to configure since it is dependent on your container platform. It is your responsibility to determine how to configure your pipeline to integrate with your container platform. Consider creating a deployment template to integrate into your pipeline so that you can specify which environment to update. For example, you can create a pipeline where you specify a parameter to determine where to deploy the updates.