This commit is contained in:
parent
72c63f3508
commit
80686523f5
@ -78,7 +78,7 @@ func CreateNewAgent(cfg *config.Config) (*hcloud.Server, error) {
|
||||
labels["ControledBy"] = "WoodpeckerAutoscaler"
|
||||
|
||||
if err != nil {
|
||||
return nil, errors.New(fmt.Sprintf("Could not create new Agent: %s", err.Error()))
|
||||
return nil, errors.New(fmt.Sprintf("Could not parse agent spec: %s", err.Error()))
|
||||
}
|
||||
|
||||
res, _, err := client.Server.Create(context.Background(), hcloud.ServerCreateOpts{
|
||||
@ -93,6 +93,10 @@ func CreateNewAgent(cfg *config.Config) (*hcloud.Server, error) {
|
||||
Labels: labels,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, errors.New(fmt.Sprintf("Could not create new Agent: %s", err.Error()))
|
||||
}
|
||||
|
||||
log.WithFields(log.Fields{
|
||||
"Caller": "CreateNewAgent",
|
||||
}).Infof("Created new Build Agent %s", res.Server.Name)
|
||||
|
Loading…
Reference in New Issue
Block a user