Add support sub-settings and secrets in sub-settings (#1221)

This commit is contained in:
6543
2022-10-03 19:25:43 +02:00
committed by GitHub
parent 00898cb6be
commit da997fa34a
5 changed files with 280 additions and 124 deletions

View File

@@ -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