Return the created env on create req
ci/woodpecker/push/build Pipeline was successful Details

This commit is contained in:
Nikolai Rodionov 2024-04-30 10:12:41 +02:00
parent a2496757fa
commit 99ee44b431
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
1 changed files with 15 additions and 5 deletions

View File

@ -201,12 +201,22 @@ func (env *Environemnt) Get(ctx context.Context) error {
if err != nil {
return err
}
if val, ok := res["SP_DESCRIPTION"]; ok {
env.Data.Description = val
}
env.Data.Description = res["SP_DESCRIPTION"]
env.Data.Provider = res["SP_PROVIDER"]
env.Data.Kubernetes = res["SP_KUBERNETES"]
env.Data.ServerType = res["SP_SERVER_TYPE"]
env.Data.Location = res["SP_SERVER_LOCATION"]
if val, ok := res["SP_PROVIDER"]; ok {
env.Data.Provider = val
}
if val, ok := res["SP_KUBERNETES"]; ok {
env.Data.Kubernetes = val
}
if val, ok := res["SP_SERVER_TYPE"]; ok {
env.Data.ServerType = val
}
if val, ok := res["SP_SERVER_LOCATION"]; ok {
env.Data.Location = val
}
return nil
}