fix datatype in compose
All checks were successful
Pipeline was successful

This commit is contained in:
Tobias Trabelsi 2023-11-05 20:39:13 +01:00
parent 6b6aa0ad69
commit e9cd1521fb
Signed by: lerentis
GPG Key ID: FF0C2839718CAF2E

View File

@ -20,9 +20,7 @@ write_files:
- content: |
# docker-compose.yml
version: '3'
services:
woodpecker-agent:
image: {{ .Image }}
command: agent
@ -40,16 +38,17 @@ runcmd:
type UserDataConfig struct {
Image string
EnvConfig map[string]string
EnvConfig map[string]interface{}
}
func generateConfig(cfg *config.Config, name string) (string, error) {
envConfig := map[string]string{}
envConfig["WOODPECKER_SERVER"] = cfg.WoodpeckerGrpc
envConfig["WOODPECKER_GRPC_SECURE"] = "true" // TODO: should probably made configurable
envConfig["WOODPECKER_AGENT_SECRET"] = cfg.WoodpeckerAgentSecret
envConfig["WOODPECKER_FILTER_LABELS"] = cfg.WoodpeckerLabelSelector
envConfig["WOODPECKER_HOSTNAME"] = name
envConfig := map[string]interface{}{
"WOODPECKER_SERVER": cfg.WoodpeckerGrpc,
"WOODPECKER_GRPC_SECURE": true,
"WOODPECKER_AGENT_SECRET": cfg.WoodpeckerAgentSecret,
"WOODPECKER_FILTER_LABELS": cfg.WoodpeckerLabelSelector,
"WOODPECKER_HOSTNAME": name,
}
config := UserDataConfig{
Image: "woodpeckerci/woodpecker-agent:latest",
EnvConfig: envConfig,