This post introduces Lighthouse, a ChatOps tool; the content comes mainly from the official documentation. The Kubernetes community uses Prow to drive its collaboration on GitHub, but Prow does not work for other repositories. Lighthouse is broadly applicable to more types of Git repositories.
1. What Is Lighthouse
Lighthouse is a lightweight ChatOps tool built on webhooks. Webhooks from a Git repository can trigger Jenkins X pipelines, Tekton pipelines, and Jenkins jobs, and it supports GitHub, GitHub Enterprise, BitBucket Server, and GitLab.
2. The Relationship Between Lighthouse and Prow
Lighthouse originated as a fork of Prow and copied some of its foundational code. Today, Lighthouse supports the standard Prow plugins and can process branch-push webhooks to trigger the execution of a specified pipeline. Like Prow, Lighthouse is configured using config.yaml and plugins.yaml.
The difference is that Lighthouse uses jenkins-x/go-scm, which supports more types of Git repositories rather than being limited to GitHub. Lighthouse does not use the ProwJob CRD; instead it uses its own LighthouseJob CRD.
3. Installation
Lighthouse is distributed as a Helm Chart.
The installation commands are below:
- Add the repository
| |
- Install or upgrade
| |
- Uninstall
| |
Lighthouse also provides dedicated installation and configuration documentation for Jenkins and Tekton.
4. How to Port a Prow Plugin
If there is a plugin you want to use that has not been ported to Lighthouse, you can port it following the steps below:
Lighthouse reuses Prow’s plugin code and configuration files. The main work is therefore to import the contents of k8s.io/test-infra/prow into github.com/jenkins-x/lighthouse/pkg/prow, and then modify the structure of the GitHub Client, for example changing github.PullRequest to scm.PullRequest.
Most structures in the GitHub Client can be mapped one-to-one to those in jenkins-x/go-scm. However, go-scm returns slices of pointers to resources by default. There are also some naming differences in the API portion. For example, when implementing lgtm, the githubClient APIs of Prow and Lighthouse differ.
Original: https://github.com/jenkins-x/lighthouse
