From 1f71f056bd37413212700afe64ab087aea6e6a25 Mon Sep 17 00:00:00 2001 From: "sebastien.heurtematte" Date: Thu, 7 Nov 2024 17:43:55 +0100 Subject: [PATCH] fix: condition on mountPrivateKey existance Signed-off-by: sebastien.heurtematte --- templates/config.libsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/config.libsonnet b/templates/config.libsonnet index dad15f0e8..5b86b4486 100644 --- a/templates/config.libsonnet +++ b/templates/config.libsonnet @@ -206,7 +206,7 @@ local clouds = import "clouds.libsonnet"; } }, secrets: ( - if std.member($.jenkins.plugins, "gerrit-trigger") || $.jenkins.mountPrivateKey then { + if std.member($.jenkins.plugins, "gerrit-trigger") || (std.objectHas($.jenkins, 'mountPrivateKey') && $.jenkins.mountPrivateKey) then { "gerrit-trigger-plugin": { username: "genie." + $.project.shortName, identityFile: "/run/secrets/jenkins/ssh/id_rsa",