jenkins-lib

Jenkins shared library
git clone https://git.in0rdr.ch/jenkins-lib.git
Log | Files | Refs | README

commit c4ecae0852e791c0e3323c10e9f36e54ee36e5d1
parent 4bd08edc73a3a56fc65b3eb0fda39cc4ef660118
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Tue,  4 Jun 2024 17:20:01 +0200

fix: missing script step

Diffstat:
Mvars/gitleaks.groovy | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/vars/gitleaks.groovy b/vars/gitleaks.groovy @@ -17,9 +17,11 @@ def call() { --report-path gitleaks-report.json \ ''' sh 'ls' - def report = readJSON file: 'gitleaks-report.json' - if (report.isEmpty) { - unstable(message: "${STAGE_NAME} is unstable") + script { + def report = readJSON file: 'gitleaks-report.json' + if (!report.isEmpty) { + unstable(message: "${STAGE_NAME} is unstable") + } } } }