From 1e90b753e70dbf012df1a8e659f9009fd8a41ca1 Mon Sep 17 00:00:00 2001 From: Rob Rudin Date: Tue, 20 Dec 2022 14:19:29 -0500 Subject: [PATCH] DEVEXP-151: Added task for deploying host certificate templates Verified manually with sample files in ml-app-deployer project --- .../com/marklogic/gradle/MarkLogicPlugin.groovy | 1 + .../DeployHostCertificateTemplatesTask.groovy | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/main/groovy/com/marklogic/gradle/task/security/DeployHostCertificateTemplatesTask.groovy diff --git a/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy b/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy index caf73faef..ae96c7e16 100644 --- a/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy +++ b/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy @@ -274,6 +274,7 @@ class MarkLogicPlugin implements Plugin { project.task("mlDeployCertificateAuthorities", type: DeployCertificateAuthoritiesTask, group: securityGroup, description: "Deploy each certificate authority, updating it if it exists, in the configuration directory") project.task("mlDeployCertificateTemplates", type: DeployCertificateTemplatesTask, group: securityGroup, description: "Deploy each certificate template, updating it if it exists, in the configuration directory") project.task("mlDeployExternalSecurity", type: DeployExternalSecurityTask, group: securityGroup, description: "Deploy external security configurations, updating each if it exists, in the configuration directory") + project.task("mlDeployHostCertificateTemplates", type: DeployHostCertificateTemplatesTask, group: securityGroup, description: "Deploy host certificate templates, updating each if it exists, in the configuration directory") project.task("mlDeploySecureCredentials", type: DeploySecureCredentialsTask, group: securityGroup, description: "Deploy secure credentials configurations, updating each if it exists, in the configuration directory") project.task("mlDeployPrivileges", type: DeployPrivilegesTask, group: securityGroup, description: "Deploy each privilege, updating it if it exists, in the configuration directory") project.task("mlDeployProtectedCollections", type: DeployProtectedCollectionsTask, group: securityGroup, description: "Deploy each protected collection, updating it if it exists, in the configuration directory") diff --git a/src/main/groovy/com/marklogic/gradle/task/security/DeployHostCertificateTemplatesTask.groovy b/src/main/groovy/com/marklogic/gradle/task/security/DeployHostCertificateTemplatesTask.groovy new file mode 100644 index 000000000..2b0ae735d --- /dev/null +++ b/src/main/groovy/com/marklogic/gradle/task/security/DeployHostCertificateTemplatesTask.groovy @@ -0,0 +1,13 @@ +package com.marklogic.gradle.task.security + +import com.marklogic.gradle.task.MarkLogicTask +import org.gradle.api.tasks.TaskAction + +class DeployHostCertificateTemplatesTask extends MarkLogicTask { + + @TaskAction + void deployHostCertificateTemplates() { + invokeDeployerCommandWithClassName("InsertCertificateHostsTemplateCommand") + } + +}