This topic describes a few of the cross-module use cases in the Harness platform.
Harness Continuous Integration
You can couple Harness Continuous Integration (CI) and Continuous Delivery (CD) in a single pipeline.
You can use Harness CI as the first stage in the pipeline to build, test, and push your app to a repo, and then have a subsequent CD stage pull that app version from the repo and deploy it to a dev, QA, or prod environment.
Here's the YAML for a simple example that builds and pushes an app in the CI stage and then pulls and deploys the app in the CD stage.
name: Build Tweet App
name: deploy tweety
- identifier: Tweety
name: Rollout Deployment
name: Rollback Rollout Deployment
Here's what the pipeline looks like in pipeline studio:
- CI stage
- CD stage
Here's the push step from the CI stage:
<+pipeline.sequenceId> expression. This is used to tag the artifact pushed to Docker Hub. You can tag your artifact versions in a number of ways. The expression
<+pipeline.sequenceId> is incremented each time the pipeline is run.
<+pipeline.sequenceId> will be used in the subsequent CD stage to fetch the app version.
Here's the Kubernetes Rollout Deployment step from the CD stage.
In the stage's service, the expression
<+pipeline.sequenceId> is used pull the the app version.
It's that simple to integrate Harness CI and CD.
This was just a simple introduction to the integration.
For a longer tutorial of Harness CI and CD integration, go to Build and Deploy a NodeJS App to Kubernetes.
Harness Chaos Engineering
The Harness Chaos Engineering (HCE) integration with Harness CD allows chaos experiments to be executed as part of a Harness CD pipeline.
For a tutorial of this integration, go to Integration with Harness CD.