mirror of
https://github.com/go-sigma/sigma.git
synced 2026-10-28 18:04:33 +08:00
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