Skip to content

Commit

Permalink
updated gcpDeployKubernetesPipeline.groovy
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Jul 5, 2023
1 parent 5c615c9 commit 8535b99
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vars/gcpDeployKubernetesPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 8535b99

Please sign in to comment.