Harness Git Experience overview
Harness Git Experience allows you to store your resource configurations, such as pipelines and input sets, in Git. You can use Git as the single source of truth and modify your configurations using your Git credentials.
With Harness Git Experience, you can easily select the repository and branch from which to execute your pipelines. This provides seamless access to your Harness resources and their configurations stored in Git, simplifying your pipeline execution.
Before you begin
- Make sure you have a Git repo with at least one branch.
- Make sure you have a Harness Git connector with a Personal Access Token (PAT) for your Git account.
Supported Git providers
The following Git providers are supported for Harness Git Sync:
- GitHub
- Bitbucket Cloud
- Bitbucket Server
- Azure Repos
- GitLab
Make sure feature.file.editor
is not set to false
in the bitbucket.properties
file if you are using Bitbucket on-prem.
Git Sync may be noticeably delayed if your delegate is in a cloud provider (GCP, AWS, Azure, Physical Data Center) rather than Harness Cloud because of encryption and decryption across two connections.
Supported Harness entities
You can save the following Harness resources in Git using Harness Git Experience:
- Pipelines
- Input sets
- Templates
- Services
- Environment
- Infrastructure Definitions
Artifact Source templates are not supported with Git Experience.
What is Harness Git Experience?
Harness Git Experience lets you choose a Git-First approach for managing Harness configurations as code, using Git as the source of truth.
You can do this by creating a resource with the Remote option and specifying the Git repo and branch where you want to save your configurations.
For example, you can create a pipeline by choosing the Remote option and save it in Git by providing the repo name and branch name along with the file path.
Harness Git Experience lets you modify the configurations stored in Git through the Harness UI and save it back to Git.
You can save the modifications in the existing branch or a new branch through a PR.
Harness Git Experience workflow
-
When you create a Remote resource in Harness, the configurations are stored in Git.
-
You can select the branch from which you want to run the pipeline.
You can also select the branch in the Run Pipeline settings.
-
During pipeline execution, the configurations of the required resources and any referenced entities like input sets, are fetched from Git.
- If the referenced entities exist in the same repo, they are fetched from the same branch that you have selected for pipeline execution.
- If the referenced entities exist in a different repo, they are fetched from the default branch of the repo where the entities are stored.
-
Harness resolves all the dependencies and then proceeds with the pipeline execution.
Key features
Here are the key features of Harness Git Experience: