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",