Harness integration
Harness is a CI/CD service platform that provides a simple and secure way for engineering and DevOps teams to release applications faster, safer, and more secure. Harness automates the entire CI/CD process, which helps build, test, and deploy improved features more quickly. To learn more about key concepts of Harness, you can refer to this Harness document: Harness Key Concepts.
If you are an automation tester and using Harness CI, you might want to integrate Katalon Runtime Engine (KRE) and create a CI/CI pipeline to execute your tests.
This tutorial shows you how to set up a Workflow with Harness to build your Katalon tests with the Katalon Docker image, which contains KRE, and execute the tests in a Kubernetes cluster farm.
The integration in this tutorial is performed on Harness FirstGen.
Requirements
With the proposed scenario, you need to first configure the following components to work with Harness:
An active Katalon Runtime Engine license.
A Harness account.
Docker is installed and running.
Kubernetes is installed and running.
Kubernetes manifest files to configure the build for your Katalon Docker image. You can refer to the sample manifest files in our GitHub repository: Sample manifests.
Set up your Harness Account
Before creating a Workflow in Harness, you need to set up your Account.
Follow these steps:
Set up a Harness Application
A Harness Application represents a group of microservices, their deployment pipelines, and all the building blocks for those pipelines. Harness represents your microservice using a logical group of one or more entities: Services, Environments, Workflows, Pipelines, Triggers, and Infrastructure Provisioners.
Here we set up an Application with the necessary configurations to create Workflow for our pipeline.
Add a Harness Application
Add a Service to the Application
Services represent your microservices/apps. You define where the artifacts for those microservices come from, and the container specs, configuration variables, and files for those microservices.
Here we add a Service and configure it with the defined Artifact Server and manifest files.
Follow these steps:
The Service is then configured with an Artifact Source, Kubernetes manifests stored in our GitHub repository, and a variable representing the Katalon API Key.
Add an Environment to the Application
You define your target deployment infrastructure using a Harness Environment. Environments represent your deployment infrastructures, such as Dev, QA, Stage, Production, etc.
In our case, we add an Environment that uses the Kubernetes Cloud Provider.
Follow these steps:
Create a Harness Workflow
Workflows define the deployment orchestration steps, including how a Service is deployed, verified, rolled back, and more.
Here we create a Workflow that includes steps to build, execute our tests, and finally clean up the deployed workload.
Add a Workflow Variable
In the sample manifest files, we create a Job named test
, so we need to add a Workflow Variable to help Harness Workflow identify the Job that needs executing.
To add a Workflow Variable, follow these steps:
Configure the Workflow
After setting up the Workflow Variable, we configure the Workflow to deploy the test build with the included Kubernetes manifests.
Follow these steps:
Your Workflow is now configured with an Apply step, a Delete step, and Rollback steps.
Add a Workflow
Add a Workflow Variable
In the sample manifest files, we create a Job named test
, so we need to add a Workflow Variable to help Harness Workflow identify the Job that needs executing.
To add a Workflow Variable, follow these steps:
Configure the Workflow
After setting up the Workflow Variable, we configure the Workflow to deploy the test build with the included Kubernetes manifests.
Follow these steps:
Your Workflow is now configured with an Apply step, a Delete step, and Rollback steps.