ci(makefile): use BuildKit plain output when CI
env var is defined
#8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Force BuildKit to output in a text log friendly format when running in CI.
Note: due to #3, changes introduced in this PR won't be taken into account until they reach
dev
ormain
branches. 馃し馃挭 My Motivation:
BuildKit should automatically adapt progress output format based on environment.
Unfortunately something doesn't play well with CircleCI and the produced output - while great for TTY - is terrible for text logs, leading to thousands of garbage lines in CircleCI's job logs. We want CI job logs to be usable, not filled with garbage.
馃 My Solution:
Based on Docker CLI doc and CircleCI built-in env variables doc, use
BUILDKIT_PROGRESS=plain
env variable whenCI
variable is set in the environment to force BuildKit output in a text log friendly format.CI
seems to be an env variable commonly set by other CI providers (ex: GitLab, GitHub, Travis) for portability.