GitOps Gerrit Git provider integration
Codefresh supports integration with Gerrit, the open-source web-based code review tool for Git repositories. Configure Gerrit as the primary Git provider for Codefresh GitOps. Codefresh can fetch the approved changes from Gerrit and build, test, and deploy the application based on your predefined workflows.
NOTE
Currently, Gerrit is supported as a Git provider for only Hosted GitOps Runtimes.
By integrating Gerrit with Codefresh GitOps, when you set up your Hosted GitOps Runtime, you can select Gerrit as your Git provider.
You can then create and manage GitOps applications in the Gerrit Git repo.
If you have third-party CI tools/platforms such as Codefresh pipelines, GitHub Actions, or Jenkins for example, you can add Gerrit-specific arguments in your pipelines/workflows for image enrichment and reporting. See CI integration flow for image enrichment.
Gerrit-Codefresh GitOps integration in Gerrit
A GitOps integration with Gerrit requires:
Required permissions in Gerrit
Permissions are required for creating projects and managing repositories.
There are two options for user roles: admin user or a user with the following permissions.
Repositories | Access |
---|---|
All Projects | Global Capabilities
|
Reference: ref/heads/
|
HTTP password for authentication
The HTTP Password in Gerrit is required as an access token to authenticate HTTP requests.
NOTE
Regenerating the HTTP Password automatically revokes the current password.
Gerrit-Codefresh GitOps integration in Codefresh
Once you have a user with the required permissions, you are all set to use Gerrit as your Git provider in Codefresh:
Connect to Gerrit as Git provider
During the setup of your Hosted GitOps Runtime, choose Gerrit as the Git provider and provide the required credentials.
See Connect to Git provider for Hosted Runtime.
Enrich image information
To enrich images with relevant information from Gerrit, incorporate Codefresh’s image reporting step into your pipelines/workflows, providing relevant Gerrit arguments.
Look for CF_GERRIT_
in CI integration argument reference.
Related articles
Shared Configuration Repo
Image enrichment with GitOps integrations
CI GitOps integrations