Skip to content

Commit

Permalink
docs: slightly buffed (but incomplete) server setup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi committed May 9, 2024
1 parent af9efbf commit c5094ff
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- [deb, rpm and apk packages](#deb-rpm-and-apk-packages)
- [go install](#go-install)
- [Usage](#usage)
- [Webhook Server](#webhook-server)
- [GitLab-CI pipeline](#gitlab-ci-pipeline)
- [Commands](#commands)
- [`evaluate`](#evaluate)
Expand Down Expand Up @@ -113,9 +114,35 @@ go install github.com/jippi/scm-engine/cmd@latest

## Usage

### Webhook Server

Using `scm-engine` as a webhook server allows for richer feature set compared to [GitLab CI pipeline](#gitlab-ci-pipeline) mode

- `+` Reacting to comments
- `+` Access to webhook event data in scripts via `webhook_event.*` (see [server docs](#server) for more information)
- `+` A single `scm-engine` instance (and single token) for your GitLab project, group, or instance depending on where you configure the webhook.
- `+` Each Project still have their own `.scm-engine.yml` file, it's downloaded via the API when the server is processing a webhook event.
- `+` A single "bot" identity across your projects.
- `+` Turn key once configured; if a project want to use `scm-engine` they just need to create the `.scm-engine.yml` file in their project.
- `+` Real-time reactions to changes
- `-` No intuitive access to [`evaluation` logs](#evaluate) within GitLab (you can see them in the server logs or in the webhook failure log)

**Setup**:

1. Deploy `scm-engine` within your infrastructure in an environment that can communicate egress/ingress with GitLab. ([see `server`](#server))
1. Configure your `webhook` at Project, Group, or Server level to hit the `/gitlab` endpoint on the `scm-engine` server endpoint. ([see `server`](#server))

### GitLab-CI pipeline

Using scm-engine within a GitLab CI pipeline is straight forward.
Using `scm-engine` within a GitLab CI pipeline is straight forward - every time a CI pipeline runs, `scm-engine` will [evaluate](#evaluate) the Merge Request.

- `+` Simple & quick installation.
- `+` Limited access token permissions.
- `+` Easy access to [`evaluation` logs](#evaluate) within the GitLab CI job.
- `-` Can't react to comments; only works within a CI pipeline.
- `-` Higher latency for reacting to changes depending on how fast CI jobs run (and where in the pipeline it runs).

**Setup**:

1. Add a `.scm-engine.yml` file in the root of your project.
1. Create a [CI/CD Variable](https://docs.gitlab.com/ee/ci/variables/#for-a-group)
Expand Down

0 comments on commit c5094ff

Please sign in to comment.