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