From 8535b99caa11990053e621dc0ba9014d695ab69e Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 5 Jul 2023 17:51:26 +0100 Subject: [PATCH] updated gcpDeployKubernetesPipeline.groovy --- vars/gcpDeployKubernetesPipeline.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/vars/gcpDeployKubernetesPipeline.groovy b/vars/gcpDeployKubernetesPipeline.groovy index c60132ab..a01a5991 100644 --- a/vars/gcpDeployKubernetesPipeline.groovy +++ b/vars/gcpDeployKubernetesPipeline.groovy @@ -141,6 +141,7 @@ def call (Map args = [ echo "Approval required set = '$APPROVAL_REQUIRED' } else { env.APPROVAL_REQUIRED = false + // in boolean context =~ works as expected rather than returning a matcher, don't use ==~ as it is anchored and breaks matching without surrounding .* if ( env.APPROVERS && env.ENVIRONMENT =~ /prod$|production/ ) { env.APPROVAL_REQUIRED = true }