Skip to content

Commit

Permalink
fix(kaniko): Use log-format=text for kaniko to avoid bash colors in l…
Browse files Browse the repository at this point in the history
…og output
  • Loading branch information
julienvey committed Mar 4, 2022
1 parent f5350f7 commit c508856
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions kaniko/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func (b Builder) Build(opts types.ImageBuilderOpts) error {
kanikoArgs := []string{
"--context=" + contextPath,
"--destination=" + opts.Tag,
"--log-format=text",
"--snapshotMode=redo",
"--single-snapshot",
}
Expand Down
2 changes: 2 additions & 0 deletions kaniko/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func Test_Build_Executes(t *testing.T) {
expectedArgs := []string{
"--context=dir:///tmp/kaniko-context",
"--destination=gcr.io/project-id/image:version",
"--log-format=text",
"--snapshotMode=redo",
"--single-snapshot",
"--build-arg=someArg=someValue",
Expand All @@ -101,6 +102,7 @@ func Test_Build_ExecutesDisablesPush(t *testing.T) {
expectedArgs := []string{
"--context=dir:///tmp/kaniko-context",
"--destination=gcr.io/project-id/image:version",
"--log-format=text",
"--snapshotMode=redo",
"--single-snapshot",
"--build-arg=someArg=someValue",
Expand Down

0 comments on commit c508856

Please sign in to comment.