Configuration¶
Configuration is stored in the YAML format.
# yaml-language-server: $schema=https://saturn-bot.readthedocs.io/en/latest/schemas/config.schema.json
dataDir: /tmp/saturn
logFormat: console
githubToken: xxxxx
dataDir¶
Path to directory to store files and repository clones.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_DATADIR |
| Type | string |
dryRun¶
Toggle dry-run mode. No pull requests will be created or merged when enabled.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_DRYRUN |
| Type | bool |
logFormat¶
Format of log messages.
| Name | Value |
|---|---|
| Default | auto |
| Env Var | SATURN_LOGFORMAT |
| Type | string |
| Values | auto, console, json |
logLevel¶
Log level of the application.
| Name | Value |
|---|---|
| Default | info |
| Env Var | SATURN_LOGLEVEL |
| Type | string |
| Values | debug, error, info, warn |
forgejoAddress¶
Address of the Forgejo instance. For example, http://forgejo.local/api/v1.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_FORGEJOADDRESS |
| Type | string |
forgejoToken¶
Token to authenticate at the the Forgejo instance.
Generate an access token for Forgejo describes how to generate a token.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_FORGEJOTOKEN |
| Type | string |
gitAuthor¶
Author to use for git commits. Global git configuration applies if not set. Must conform to RFC5322: User Name <user@name.local>.
If not set, Saturn tries to discover the author via the host of the repository.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITAUTHOR |
| Type | string |
gitCloneOptions¶
Command-line options to pass to git clone.
| Name | Value |
|---|---|
| Default | ["--filter", "blob:none"] |
| Env Var | SATURN_GITCLONEOPTIONS |
| Type | [string] |
gitCommitMessage¶
Default commit message to use if a task does not define a custom one.
| Name | Value |
|---|---|
| Default | changes by Saturn |
| Env Var | SATURN_GITCOMMITMESSAGE |
| Type | string |
gitLogLevel¶
Level for logs sent by the git sub-system. These logs can be very verbose and can make it tricky to find logs of other sub-systems.
| Name | Value |
|---|---|
| Default | changes by Saturn |
| Env Var | SATURN_GITCOMMITMESSAGE |
| Type | string |
| Values | debug, error, info, warn |
gitPath¶
Path to git executable. PATH will be searched if not set.
| Name | Value |
|---|---|
| Default | git |
| Env Var | SATURN_GITPATH |
| Type | string |
gitUrl¶
Configure how to clone git repositories.
Set to ssh to clone repositories via SSH.
| Name | Value |
|---|---|
| Default | https |
| Env Var | SATURN_GITURL |
| Type | string |
| Values | https, ssh |
Warning
If set to ssh, git and ssh need to be configured.
Follow instructions for your platform:
githubAddress¶
Address of GitHub server to use.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITHUBADDRESS |
| Type | string |
githubCacheDisabled¶
If true, disables caching of HTTP responses received from the GitHub API.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_GITHUBCACHEDISABLED |
| Type | bool |
githubToken¶
Token to use for authentication at the GitHub API.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITHUBTOKEN |
| Type | string |
gitlabAddress¶
Address of GitLab server to use.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITLABADDRESS |
| Type | string |
gitlabToken¶
Token to use for authentication at the GitLab API.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITLABTOKEN |
| Type | string |
goProfiling¶
Activate Go profiling endpoints for server or worker. The endpoints are available at /debug/pprof/. See https://go.dev/blog/pprof.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_GOPROFILING |
| Type | bool |
javaPath¶
Path to the Java binary to execute plugins. If not set explicitly, then Saturn searches for the binary in $PATH.
| Name | Value |
|---|---|
| Default | java |
| Env Var | SATURN_JAVAPATH |
| Type | string |
labels¶
List of labels to add to each pull request created by Saturn. Allows an operator of Saturn to ensure that specific labels are always added without relying on the authors of tasks to set them.
Labels specified here are merged with the labels of a task.
| Name | Value |
|---|---|
| Default | [] |
| Env Var | SATURN_LABELS |
| Type | [string] |
pluginLogLevel¶
Level of logs sent by plugins. Set this to the same value as logLevel in order to display the logs of a plugin.
| Name | Value |
|---|---|
| Default | debug |
| Env Var | SATURN_PLUGINLOGLEVEL |
| Type | string |
| Values | debug, error, info, warn |
prometheusPushgatewayUrl¶
Address of a Prometheus Pushgateway to send metrics to.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_PROMETHEUSPUSHGATEWAYURL |
| Type | string |
pythonPath¶
Path to the Python binary to execute plugins. If not set explicitly, then Saturn searches for the binary in $PATH.
| Name | Value |
|---|---|
| Default | python |
| Env Var | SATURN_PYTHONPATH |
| Type | string |
repositoryCacheTtl¶
Time-to-live of all items in the repository file cache. Saturn performs a full update of the cache once the TTL has expired. The format is a Go duration, like 30m or 12h.
| Name | Value |
|---|---|
| Default | 6h |
| Env Var | SATURN_REPOSITORYCACHETTL |
| Type | string |
serverAccessLog¶
Turn HTTP access log of server on or off.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_SERVERACCESSLOGS |
| Type | bool |
serverAddr¶
Address of the server in the format <host>:<port>.
| Name | Value |
|---|---|
| Default | :3035 |
| Env Var | SATURN_SERVERADDR |
| Type | string |
serverApiKey¶
Secret required to authenticate at the API. Clients set the key as the value of the HTTP header X-API-KEY. Required if Saturn runs in server mode.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_SERVERAPIKEY |
| Type | string |
serverBaseUrl¶
URL of the API server. The value is used to populate the servers array in the OpenAPI definition.
| Name | Value |
|---|---|
| Default | http://localhost:3035 |
| Env Var | SATURN_SERVERBASEURL |
| Type | string |
serverCompress¶
Turn compression of responses on or off.
| Name | Value |
|---|---|
| Default | true |
| Env Var | SATURN_SERVERCOMPRESS |
| Type | bool |
serverDatabaseLog¶
If true, display executed SQL queries and errors of the database. Useful for debugging.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_SERVERDATABASEPATH |
| Type | bool |
serverDatabasePath¶
Path to the sqlite database of the server. If unset, defaults to <dataDir>/db/Saturn.db.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_SERVERDATABASEPATH |
| Type | string |
serverShutdownTimeout¶
Duration to wait for active runs to finish before stopping the server.
Note
When running the server component in Kubernetes, set terminationGracePeriodSeconds of
the PodSpec
to a value slightly higher than this value.
| Name | Value |
|---|---|
| Default | 5m |
| Env Var | SATURN_SERVERSHUTDOWNTIMEOUT |
| Type | string |
serverWebhookSecretGithub¶
Secret to authenticate webhook requests sent by GitHub.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_SERVERWEBHOOKSECRETGITHUB |
| Type | string |
serverWebhookSecretGitlab¶
Secret to authenticate webhook requests sent by GitLab. See https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#create-a-webhook for how to set up the token.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_SERVERWEBHOOKSECRETGITLAB |
| Type | string |
serverServeUi¶
If true, serves the user interface.
| Name | Value |
|---|---|
| Default | true |
| Env Var | SATURN_SERVERSERVEUI |
| Type | bool |
workerLoopInterval¶
Interval at which a worker queries the server to receive new tasks to execute.
| Name | Value |
|---|---|
| Default | 10s |
| Env Var | SATURN_WORKERLOOPINTERVAL |
| Type | string |
workerParallelExecutions¶
Number of parallel executions of tasks per worker.
| Name | Value |
|---|---|
| Default | 1 |
| Env Var | SATURN_WORKERPARALLELEXECUTIONS |
| Type | integer |
workerServerAPIBaseURL¶
Base URL of the server API to query for new tasks to execute.
| Name | Value |
|---|---|
| Default | http://localhost:3035 |
| Env Var | SATURN_WORKERSERVERAPIBASEURL |
| Type | string |