From 792a93a5e3643b9c5a8084687075a2e588687b6f Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Mon, 11 Jul 2022 15:09:56 -0600 Subject: [PATCH] Do not write build-results file outside GitHub Actions context The init-scripts added to Gradle User Home were assuming the presence of certain GitHub Actions environment variables. With this fix, these init scripts behave better without these env vars. Fixes #350 --- .../build-result-capture-service.plugin.groovy | 10 ++++++++-- .../init-scripts/build-result-capture.init.gradle | 10 ++++++++-- .../gradlebuildaction/BaseInitScriptTest.groovy | 9 +++------ .../TestBuildResultRecorder.groovy | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/resources/init-scripts/build-result-capture-service.plugin.groovy b/src/resources/init-scripts/build-result-capture-service.plugin.groovy index e8ea40c..8eaf7fa 100644 --- a/src/resources/init-scripts/build-result-capture-service.plugin.groovy +++ b/src/resources/init-scripts/build-result-capture-service.plugin.groovy @@ -45,9 +45,15 @@ abstract class BuildResultsRecorder implements BuildService