Skip to content

Commit 87b15f7

Browse files
authored
Only set --stacktrace --info if verbose logging is enabled (#1557)
This is a quality-of-life improvement; make our build logs more easy to read through for the default case. If we need more information, we can click on the "Enable debug logging" checkbox when re-running a job, which then populates the `runner.debug` context variable.
1 parent e07ff96 commit 87b15f7

6 files changed

Lines changed: 172 additions & 86 deletions

File tree

.github/jobs/GradleJob.pkl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ fetchDepth: Int?
2929

3030
fixed gradleArgs =
3131
new Listing {
32-
"--info"
33-
"--stacktrace"
32+
"$DEBUG_ARGS"
3433
"--no-daemon"
3534
"-DpklMultiJdkTesting=true"
3635
when (isRelease) {
@@ -45,6 +44,9 @@ fixed job {
4544
when (os == "windows") {
4645
["JAVA_HOME"] = "/jdk"
4746
}
47+
["DEBUG_ARGS"] =
48+
// language=GithubExpressionLanguage
49+
"${{ case(runner.debug == '1', '--info --stacktrace', '') }}"
4850
}
4951
when (os == "macOS") {
5052
`if` =

.github/workflows/build.yml

Lines changed: 34 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)