Plan a CI/CD pipeline
Since the WebSphere Commerce runtime environment is run on Docker containers, take advantage of containerization and implement a continuous integration and continuous deployment (CI/CD) pipeline, which helps automate processes in the development life cycle, from when a developer checks in code, to deploying the code to the production environment.
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.
We can implement using Jenkins, IBM Urban Code Deploy, or a combination of both.
Pipeline overview
Pipeline scenario:
- Developer creates code in the development environment (WebSphere 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, 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, define a Dockerfile. In this step, we 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 the database.
- Deployment administrator can deploy new test/QA environments with these Docker images. We 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 running in the container platform.
Note: This step is dependent on the container platform. Determine how to configure the pipeline to integrate with the container platform. Consider creating a deployment template to integrate into the pipeline to specify which environment to update. For example, create a pipeline where a parameter specifies where to deploy the updates.
For a sample implementation of a container platform setup and a CI/CD pipeline, see Implement a continuous deployment pipeline for WebSphere Commerce Version 9.