Skip to content

Commit ae892e5

Browse files
authored
Add debug logging for the artifact build output (#4208)
## Changes Print the output of the artifact build scripts, if `--debug` is enabled ## Why For debugging more complex build scripts it helpful to see the output. Currently it is only printed when the scripts fails. ## Tests - Ran `make test` - Build the cli, ran it with a real life bundle with a complex build script. closes #4205
1 parent 03820cc commit ae892e5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
## Release v0.289.0
44

55
### Bundles
6+
* Log artifact build output in debug mode ([#4208](https://github.com/databricks/cli/pull/4208))
67

78
### Dependency updates

bundle/artifacts/build.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ func doBuild(ctx context.Context, artifactName string, a *config.Artifact) error
101101
return fmt.Errorf("build failed %s, error: %v, output: %s", artifactName, err, out)
102102
}
103103

104+
log.Debugf(ctx, "build output for %s:\n%s", artifactName, out)
105+
104106
return nil
105107
}
106108

0 commit comments

Comments
 (0)