Edit a CI Pipeline Codebase Configuration

Updated 3 days ago by Manish Jaiswal

This topic provides settings for codebase configuration at the beginning of setting up a new pipeline in the Overview.

The following steps help you modify the codebase of your source codes.

In this topic:

Before You Begin

Step 1: Configure Codebase

Connectors allow Harness to connect to your Git Repos to clone your Codebase. 

In the CI Overview, click Codebase

You can either add a new connector or select or modify an existing connector.

Option 1: Add a New Connector

To create a new Connector, see Connect to Code Repo.

Option 2: Select or Modify an Existing Connector

You can select any available Connectors under your role group, Projects and Organizations, or in your Account.

To modify an existing connector, select any Connector listed in Projects and Organizations, or in your Account, and follow the steps in Add a new Connector. 

Step 2: Enter Repository Name

Enter the complete Git Repository URL for your Git Project, such as https://github.com/account-name/repo-name.git.

Advanced (Optional)

Depth

Depth is the number of commits you want to grab when you clone. For manual triggers, depth is set to 1 by default. For other triggers, depth is not set, and hence, it will download complete commit history by default (e.g. pull request/push request). See https://git-scm.com/docs/git-clone.

SSL Verify

Verifies your git SSL certificate verification if set True. Skips your git SSL certificate if set False. 

Set Container Resources

Maximum resources limit values for the resources used by the container at runtime.

Pull Request Clone Strategy

Select a pull request clone strategy.

Merge Commit

Merges the source branch of the pull request to the target branch.

Source Branch

Clones only the source branch of the pull request.

If cloning codebase takes more time than expected, try these configurations for cloning your codebase:
1. Increase memory of git clone to 1 Gi.
2. Use Source Branch clone strategy instead of Merge Commit. Source branch clones only the pull request branch.
3. Specify Depth to 1.
     ci:
codebase:
resources:
limits:
memory: 1Gi
prCloneStrategy: SourceBranch
depth: 1
Limit Memory

Maximum memory that the container can use.

You can express memory as an integer value with one of these suffixes: G, M, Gi, Mi.

Limit CPU

See Resource units in Kubernetes.

Limit the number of cores that the container can use.

Limits for CPU resources are measured in CPU units.

Fractional requests are allowed. The expression 0.1 is equivalent to the expression 100m, which can be read as one hundred millicpu.

Step 3: Save and View Your Connector

Click Save to use the connector in your Pipeline. You can also view the list of your saved connectors in Connectors under Project Setup.

See Also


Please Provide Feedback