Configuration reference¶
colophon's own configuration, as against the per-repository release manifest.
Config files¶
Read in order, later files overriding earlier ones:
Override the list with --config, which may be repeated.
colophon init writes a starting file; colophon config inspects the resolved
result.
Keys¶
| Key | Type | Default | Meaning |
|---|---|---|---|
log.level |
string | info |
Log verbosity. --debug forces debug regardless. |
server.grpc.reflection |
boolean | true |
gRPC server reflection, for the framework's server mode. |
update.policy |
string | empty | disabled (log only), prompt (ask; declining continues), or enabled (block until updated). Empty uses the compiled-in baseline. |
update.check_interval |
duration | empty | Any Go duration, e.g. 24h, 168h. 0 checks on every invocation. Empty uses the baseline, 24h. |
update.require_signature |
boolean | true |
colophon update installs only a release whose checksums.txt carries a valid signature from colophon's release key. update --from-file can't check a signature, so it is refused unless this is false. Set it to false only to install an archive you have verified yourself. |
Environment variables¶
Configuration keys map to environment variables under the COLOPHON
prefix, so log.level is COLOPHON_LOG_LEVEL.
Forge credentials do not use that prefix. The token is read from
<FORGE>_TOKEN, upper-cased from the forge name derived from the git remote,
or from forge in .colophon.yaml (or --forge) when the remote's host is a
self-hosted instance:
| Forge | Variable | Git basic-auth user |
|---|---|---|
| GitLab | GITLAB_TOKEN |
oauth2 |
| GitHub | GITHUB_TOKEN |
x-access-token |
| Bitbucket | BITBUCKET_TOKEN |
x-token-auth |
| Gitea, Codeberg | GITEA_TOKEN, CODEBERG_TOKEN |
x-access-token |
A self-hosted GitLab reads GITLAB_TOKEN and a GitHub Enterprise Server reads
GITHUB_TOKEN: the variable follows the forge named, not the host.
The username column is go/repo v0.6.0's basicAuthUsername: GitLab is
oauth2, Bitbucket is x-token-auth, and everything else is x-access-token.
Bitbucket's API reads two more variables, because it authenticates with the account rather than the token alone:
| Variable | Holds |
|---|---|
BITBUCKET_USERNAME |
the Atlassian account's email, not the Bitbucket username |
BITBUCKET_APP_PASSWORD |
an Atlassian API token, the same one as BITBUCKET_TOKEN |
The names come from app passwords, which Atlassian no longer issues. The token
must be made with Create API token with scopes, choosing Bitbucket. A token
from the plain Create API token is accepted at sign-in and then refused on
every call with API Token provided has no Bitbucket scopes.
The token is resolved lazily, so only the commands that authenticate need one.
plan never does.
A release push always needs a credential, whatever the repository's visibility, so an absent token fails fast with a hint rather than being attempted unauthenticated. An unauthenticated attempt surfaces as a rejected push, which reads as a permissions problem rather than a missing variable.
In CI, the token must not be CI_JOB_TOKEN: a tag pushed with it does not
fire downstream tag pipelines. See
Run it in GitLab CI.
Global flags¶
Available on every command.
| Flag | Default | Meaning |
|---|---|---|
--ci |
false |
Indicates the tool is running in a CI environment. |
--config |
[/etc/colophon/config.yaml, ~/.colophon/config.yaml] |
Config files to use. Repeatable. |
--debug |
false |
Force debug log output. |
--output |
text |
Output format: text or json. |
announce¶
The operator's settings for the announce adapters, in the manifest's own shape and read by the manifest's own parser, so a literal secret or an unknown field is refused for the same reasons:
announce:
file:
repo: phpboyscout/blog
token: $GITLAB_TOKEN
path: data/releases/{path_dashed}.yaml
list: releases
key: url
entry:
name: "{name}"
tag: "{tag}"
date: "{released_at}"
url: "{url}"
Settings only. An adapter here does nothing until a project's .colophon.yaml
names it (file: {}), and a project's own fields lay over these. An operator
can hold the Discord bot token and guild here for every project. Discord
channels are matched to a project's by name, so a project can take one of
the channels here with discord: {channels: {releases: {}}}; see
more than one channel. A CI
component that ships this block for every project is the intended reader.
Every COLOPHON_* environment variable is bound to a configuration key, so a
shell variable that happens to share the prefix (COLOPHON_ANNOUNCE_FLAGS,
say) lands in this block. A refusal names such a variable when one is present;
a CI job keeps its own state under another prefix.