mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-03 19:28:47 +00:00
Add support sub-settings and secrets in sub-settings (#1221)
This commit is contained in:
@@ -25,6 +25,7 @@ const (
|
||||
namePipeline = "pipeline"
|
||||
)
|
||||
|
||||
// Registry represents registry credentials
|
||||
type Registry struct {
|
||||
Hostname string
|
||||
Username string
|
||||
@@ -39,6 +40,16 @@ type Secret struct {
|
||||
Match []string
|
||||
}
|
||||
|
||||
type secretMap map[string]Secret
|
||||
|
||||
func (sm secretMap) toStringMap() map[string]string {
|
||||
m := make(map[string]string, len(sm))
|
||||
for k, v := range sm {
|
||||
m[k] = v.Value
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
type ResourceLimit struct {
|
||||
MemSwapLimit int64
|
||||
MemLimit int64
|
||||
@@ -61,7 +72,7 @@ type Compiler struct {
|
||||
path string
|
||||
metadata frontend.Metadata
|
||||
registries []Registry
|
||||
secrets map[string]Secret
|
||||
secrets secretMap
|
||||
cacher Cacher
|
||||
reslimit ResourceLimit
|
||||
defaultCloneImage string
|
||||
|
||||
Reference in New Issue
Block a user