Files
sigma/docs
Tosone 642b2d576c feat(config): add scm provider configuration and credential master key
The source-code providers a deployment can use were implied by
auth.oauth2.*, so disabling OAuth login also disabled code repository sync
and every build that clones source code, and there was nowhere to configure
a self-hosted GitLab or Gitea at all: the gitea client was created with an
empty base URL.

Make provider capability explicit and independent from login:

- add scm.providers[] with provider and baseUrl; github and gitlab default
  to their hosted endpoints, gitea and other self-hosted instances require
  a base URL and are skipped with a warning when it is missing
- derive the provider list from the enabled OAuth2 providers when
  scm.providers is empty, so existing configurations keep working
- expose Configuration.ResolveScmProviders and Configuration.ScmProvider
- add auth.credentialKey for the master key that encrypts SCM credentials
  at rest, plus the credential.master_key settings key used as fallback

conf/config.yaml, both configuration docs and the Helm chart (values and
configmap) document the two new sections.

Verification:
- go test -run "TestConfigurationScm|TestConfigurationResolveScm" -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/config/...
- helm template test ./deploy/sigma
2026-10-27 21:07:20 +08:00
..
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00