Skip to main content

Overview & Key Concepts

Last updated on

The Harness Code Repository module (Code) is a source code management (SCM) tool that fosters developer collaboration and accelerates innovation while keeping security and compliance in mind. Harness Code seamlessly integrates Git-based repositories across your software delivery processes in Harness.

Harness Code provides Git-based repositories with collaborative code reviews, checks, and rules enforcement to maintain code quality while reducing risk. It integrates seamlessly with other Harness modules to provide an end-to-end software delivery platform.

Whether you're new to Git-based version control or experienced with other SCM tools, this guide will help you understand the core concepts and capabilities of Harness Code.

Source code management

Harness Code is a source code management (SCM) tool. SCM tools are used for version control or source control, which is a software engineering practice that facilitates collaboration and maintenance of code bases. Version control practices help maintain change history, resolve conflicts when multiple people work on the same file, and stage changes for future releases or separate projects. SCM tools often provide mechanism to facilitate peer reviews, approvals, and rollbacks.

Git: Clone, branch, merge, commit, tag, and more

Harness Code provides Git-based repositories. Git is a version control tool characterized by concepts such as cloning, branching, committing, and merging. If you aren't familiar with these concepts, there are many tutorials, courses, and videos online that can introduce you to the basics of Git-based version control, in addition to the complete Git SCM documentation.

Pull requests

While pull requests (PRs) aren't a feature of Git itself, they are often, if not always, a feature of SCM tools. Pull requests facilitate reviews by gathering a series of commits into a package that can be reviewed, approved, and then merged into the base branch.

You can assign reviewers to pull requests and configure mandatory requirements or checks that must pass before the PR can be merged.

Harness Platform integration

Harness Code integrates with other Harness modules and uses components that are common to the Harness Platform. For more information about Harness Platform terminology and concepts, go to Harness key concepts.

Pipelines

You can use triggers to run Harness pipelines in response to push events in your Harness Code repositories.

A pipeline is an end-to-end workflow that, for example, pulls code from a codebase, builds an artifact, runs tests or other actions on the artifact or code, and then uploads or deploys the artifact to storage or a container registry.

To learn more about CI and CD pipelines go to:

Projects

Repositories you create in Harness Code each belong to a Harness project. This provides a measure of access control for your repositories.

Access control

Access control for Harness Code is part of the Harness Platform RBAC. Permissions for Harness Code include the ability to view, create/edit, delete, and push to repositories.

Harness Code includes one built-in role, which is the Code Admin role.

Next steps

Now that you understand the key concepts, you're ready to start using Harness Code.