V2 Pipelines Overview
CloudOps for Kubernetes now provides a V2 set of Jenkins jobs for building, testing, configuring, and destroying Self-Managed Commerce environments.
The V2 model improves on the older Jenkins workflows in several important ways:
- The Elastic Path Docker project is no longer needed or used, simplifying maintenance and upgrades. The Self-Managed Commerce Build Tools are used in-place of the legacy Elastic Path Docker project.
- Compute and network resources are used more efficiently; fewer build agent pods and fewer image pulls from ECR are required.
- Environment configuration is described in files and templates instead of being reconstructed from large sets of Jenkins parameters on every run.
- The configuration of your Commerce environments, including temporary branch-validation environments, is easier to inspect and customize.
- Deployment logic is centered in Ansible playbooks and roles, making the implementation less tightly coupled to Jenkins.
What V2 Pipelines Are
The V2 Pipelines are a new set of Jenkins jobs that use:
- The Self-Managed Commerce Build Tools instead of the Elastic Path Docker project.
- Reusable build images instead of rebuilding Maven artifacts in multiple jobs.
- Environment files under
environments/<kubernetesNickname>/to describe and track each Commerce environment's configuration. - Ansible playbooks and roles to orchestrate the same Terraform modules already used by CloudOps for Kubernetes.
Advantages of the V2 Pipelines
Simpler Maintenance and Upgrades
Once you have switched to the V2 pipelines you no longer use or need to upgrade the Elastic Path Docker project. The Self-Managed Commerce Build Tools, which are included in the ep-commerce Git project, are used in place of the legacy Elastic Path Docker project.
Build Maven artifacts once per commit
The V2 build flow creates a reusable commerce-maven-artifacts image for a specific Self-Managed Commerce commit. Downstream jobs reuse that built output instead of rebuilding the source tree again.
This means:
- Maven artifacts are built once for a given commit.
- Test jobs reuse the same built artifacts as the image-build jobs.
- Pipeline behavior is more consistent across build, test, and deployment steps.
For more information, see V2 Builds and Artifacts.
Define environment configuration in files
The V2 deployment jobs use YAML files that describe a Commerce environment's configuration instead of filling out large sets of Jenkins job parameters.
Each long-lived Commerce environment is described by files in a directory in the CloudOps for Kubernetes Git project, under environments/<kubernetesNickname>/. The directory will typically contain the following:
commerce-values.yamldescribing the Self-Managed Commerce configuration.activemq-values.yamldescribing the ActiveMQ configuration.- At most one database file:
mysql-container.yaml,aurora-mysql-80.yaml,postgres-rds.yaml, orexisting-database.yaml, describing the database configuration.
This makes environment configuration easier to:
- Review.
- Store in source control.
- Update over time.
- Reuse safely between runs.
For more information, see Configuring Environments with V2 Pipelines and Environment Files Reference.
Make ephemeral environments easier to customize
The v2-commerce-branch-validation job uses component templates in environments/branch-validation-template/ to describe the temporary environment it creates.
Customer teams can update those templates if they want their ephemeral environments configured differently, for example to add SMTP settings or change feature flags. In the legacy commerce-branch-validation flow, comparable environment behavior was embedded in shared Groovy logic and was harder to inspect and customize.
Reduce Jenkins-specific coupling
Jenkins is still the entry point for the V2 jobs, but the deployment and configuration logic now lives in Ansible playbooks and roles. This makes it easier for teams to replace Jenkins with another CI system if needed.
Keep the same Terraform backend and resources
V2 Pipelines do not introduce a new Terraform backend or a separate infrastructure model. Under the covers, the V2 jobs still call the same CloudOps for Kubernetes Terraform modules and back end for all components.
V2 Jobs
The new V2 jobs are organized under a new V2 Jobs view (tab). Within that view jobs are grouped by topic such as Config, Build, Operate, Test and CI Pipelines.
The currently implemented V2 jobs are:
Config
v2-configure-commerce-environment: Applies changes to a Commerce environment configuration or creates a new Commerce environment.v2-destroy-commerce-environment: Destroys or deletes an existing Commerce environment.v2-generate-env-files-for-existing-environment: Generates YAML files that capture the configuration of an existing Commerce environment.
Build
v2-build-commerce-maven-artifacts: Builds thecommerce-maven-artifactsimage for the specifiedep-commercebranch commit.v2-build-commerce-images: Builds the Commerce application images, base images, and the third-party images.
Operate
v2-deploy-commerce-images: Updates an existing Commerce environment to use newly built Commerce images.v2-set-commerce-service-replicas: Scales a specified Commerce service to a specific number of replicas.v2-stop-start-commerce-environment: Stops all of the Commerce services in a specific Commerce environment. Use the same job to start them back up.
Test
v2-run-extensions-tests: Runs the<ep-commerce>/devops/build_tools/run_extensions_tests.shscript to run Maven tests in the Commerce extensions project.v2-run-cortex-system-tests: Runs the<ep-commerce>/devops/build_tools/run_cortex_system_tests.shscript to run Cucumber tests against a running Commerce environment. This is often used to validate basic Commerce functionality of that environment.
CI Pipelines
v2-commerce-branch-validation: Can be used by your team's Commerce application developers to validate that theirep-commercebranch can be successfully built, deployed, and tested.
Like all Jenkins jobs, you can also find the new V2 jobs in Jenkins under the All view.
Common V2 Workflows
Build and deploy code changes
Running builds and deploying changes is the most common workflow for Self-Managed Commerce teams. Below is an overview of the basic workflow to build new Commerce images and to update an existing Commerce environment to use the new images.
- Run the
v2-build-commerce-imagesjob to build the Commerce images from yourep-commercebranch. We recommend also building theamazonlinux-java,tomcat, and ActiveMQ images, so that they include the updates from Self-Managed Commerce patches. For more information, see Update Self-Managed Commerce Images.- This will automatically call the
v2-build-commerce-maven-artifactsjob when thecommerce-maven-artifactsimage for theep-commercecommit does not yet exist.
- This will automatically call the
- Run the desired test jobs, such as extension tests and Cortex system tests. They will also find and reuse the compiled artifacts
commerce-maven-artifactsimage. - Run the
v2-deploy-commerce-imagesjob to deploy the new Commerce images to an existing Commerce environment. Optionally set parameternewImageTagto re-tag the images before deploying, per your tagging strategy. Optionally set parameterdataPopCommandtoupdate-dbif data-pop is required.
Do not use the v2-configure-commerce-environment job to deploy code changes. It is possible to use it for that purpose, but it is not recommended because it takes longer and also runs a terraform apply. The v2-deploy-commerce-images job does not do Terraform operations or affect Commerce deployment configuration.
Adopt an existing V1-managed environment into V2
Use v2-generate-env-files-for-existing-environment when an environment was previously created and managed with V1 legacy jobs and you want to bring it under V2 management.
The job inspects the running environment and generates component YAML files that capture the actual configuration of the running Commerce environment.
Commit the generated YAML files in the CloudOps for Kubernetes Git project under path environments/<kubernetesNickname>/. Over time you update those files in Git to make and track configuration changes, and use the v2-configure-commerce-environment job to apply the changes to the Commerce environment.
For step-by-step guidance, see Migrate from Legacy Jobs.
Configure or update an environment from environment files
Use v2-configure-commerce-environment when you want to:
- Create a new Commerce environment, including the ActiveMQ deployment and database.
- Update the Commerce application configuration of an existing environment, including:
- Update service allow lists.
- Enable or disable Commerce features.
- Tune CPU or memory requests or limits for any of the deployed services.
- Tune Java heap size for any of the deployed services.
- Update the ActiveMQ image tag or configuration.
- Update the database server configuration.
- Update the database JDBC secret configuration.
To update the configuration of an existing environment, first update the YAML files that describe the required configuration, then run the v2-configure-commerce-environment job.
Ensure parameter commerceImageTagSource is set to fromCluster (the default value) if the running Commerce applications are or might be using image tags that differ from the tags written in the YAML configuration files. When commerceImageTagSource is set to fromCluster, the job first reads the in-use image tags from the Commerce deployments in the cluster and ensures that the tags are not changed when the job is run.
Use v2-destroy-commerce-environment with the same environment definition when you want to remove that environment.
Validate a branch in a temporary environment
Commerce developers can use v2-commerce-branch-validation to test their ep-commerce branch. The job will:
- Build artifacts and images for a specific Self-Managed Commerce commit.
- Run extension tests.
- Deploy a temporary environment.
- Run Cortex system tests.
- Automatically destroy the temporary environment after validation.
Relationship to Legacy Jobs
The V2 Pipelines are the recommended replacement for several older build, test, and deployment jobs. All legacy jobs remain available during the transition, but new automation should prefer the V2 approach.
The V2 build jobs and V2 deployment jobs are independent — teams can adopt them separately, in whichever order makes sense. There is no requirement to switch builds and environment configuration at the same time, and no need to rebuild or recreate existing environments before adopting V2.
For a mapping and migration guidance, see Migrate from Legacy Jobs.