Skip to content

Commit f04f6b5

Browse files
author
Aaron Schlesinger
committed
feat(controller.go): add debug logs for workflow request logs
1 parent cb0f92e commit f04f6b5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/gitreceive/controller.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"strings"
1010

1111
"github.com/deis/builder/pkg"
12+
"github.com/deis/builder/pkg/log"
1213
)
1314

1415
var (
@@ -60,6 +61,7 @@ func getAppConfig(conf *Config, builderKey, userName, appName string) (*pkg.Conf
6061

6162
setReqHeaders(builderKey, req)
6263

64+
log.Debug("Workflow request POST /v2/hooks/config\n%s", string(data))
6365
res, err := http.DefaultClient.Do(req)
6466
if err != nil {
6567
return nil, err
@@ -89,6 +91,7 @@ func publishRelease(conf *Config, builderKey string, buildHook *pkg.BuildHook) (
8991
}
9092

9193
url := controllerURLStr(conf, "v2", "hooks", "build")
94+
log.Debug("Workflow request POST /v2/hooks/build\n%s", postBody)
9295
req, err := http.NewRequest("POST", url, strings.NewReader(postBody))
9396
if err != nil {
9497
return nil, err
@@ -128,6 +131,8 @@ func receive(conf *Config, builderKey, gitSha string) error {
128131
if err := json.NewEncoder(&body).Encode(bodyMap); err != nil {
129132
return err
130133
}
134+
135+
log.Debug("Workflow request /v2/hooks/push (body elided)")
131136
req, err := http.NewRequest("POST", urlStr, &body)
132137
if err != nil {
133138
return err

0 commit comments

Comments
 (0)