Skip to content

Commit ac835e6

Browse files
authored
Merge pull request #691 from BillFarber/feature/deployCredentials
Can now deploy/undeploy credentials
2 parents 3d55ee3 + 085620f commit ac835e6

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ class MarkLogicPlugin implements Plugin<Project> {
295295
project.task("mlDeployExternalSecurity", type: DeployExternalSecurityTask, group: securityGroup, description: "Deploy external security configurations, updating each if it exists, in the configuration directory")
296296
project.task("mlDeployHostCertificateTemplates", type: DeployHostCertificateTemplatesTask, group: securityGroup, description: "Deploy host certificate templates, updating each if it exists, in the configuration directory")
297297
project.task("mlDeploySecureCredentials", type: DeploySecureCredentialsTask, group: securityGroup, description: "Deploy secure credentials configurations, updating each if it exists, in the configuration directory")
298+
project.task("mlDeployCredentials", type: DeployCredentialsTask, group: securityGroup, description: "Deploy AWS or Azure credentials configurations, updating each if it exists, in the configuration directory")
298299
project.task("mlDeployPrivileges", type: DeployPrivilegesTask, group: securityGroup, description: "Deploy each privilege, updating it if it exists, in the configuration directory")
299300
project.task("mlDeployProtectedCollections", type: DeployProtectedCollectionsTask, group: securityGroup, description: "Deploy each protected collection, updating it if it exists, in the configuration directory")
300301
project.task("mlDeployProtectedPaths", type: DeployProtectedPathsTask, group: securityGroup, description: "Deploy each protected path, updating it if it exists, in the configuration directory")
@@ -306,6 +307,7 @@ class MarkLogicPlugin implements Plugin<Project> {
306307
project.task("mlUndeployCertificateTemplates", type: UndeployCertificateTemplatesTask, group: securityGroup, description: "Undeploy (delete) each certificate template in the configuration directory")
307308
project.task("mlUndeployExternalSecurity", type: UndeployExternalSecurityTask, group: securityGroup, description: "Undeploy (delete) each external security configuration in the configuration directory")
308309
project.task("mlUndeploySecureCredentials", type: UndeploySecureCredentialsTask, group: securityGroup, description: "Undeploy (delete) each secure credentials configuration in the configuration directory")
310+
project.task("mlUndeployCredentials", type: UndeployCredentialsTask, group: securityGroup, description: "Undeploy (delete) each AWS or Azure credentials configuration in the configuration directory")
309311
project.task("mlUndeployPrivileges", type: UndeployPrivilegesTask, group: securityGroup, description: "Undeploy (delete) each privilege in the configuration directory")
310312
project.task("mlUndeployProtectedCollections", type: UndeployProtectedCollectionsTask, group: securityGroup, description: "Undeploy (delete) each protected collection in the configuration directory")
311313
project.task("mlUndeployProtectedPaths", type: UndeployProtectedPathsTask, group: securityGroup, description: "Undeploy (delete) each protected path in the configuration directory")
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2023 MarkLogic Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.marklogic.gradle.task.security
17+
18+
import com.marklogic.gradle.task.MarkLogicTask
19+
import org.gradle.api.tasks.TaskAction
20+
21+
class DeployCredentialsTask extends MarkLogicTask {
22+
23+
@TaskAction
24+
void deployCredentials() {
25+
invokeDeployerCommandWithClassName("DeployCredentialsCommand")
26+
}
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2023 MarkLogic Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.marklogic.gradle.task.security
17+
18+
import com.marklogic.gradle.task.MarkLogicTask
19+
import org.gradle.api.tasks.TaskAction
20+
21+
class UndeployCredentialsTask extends MarkLogicTask {
22+
23+
@TaskAction
24+
void undeployCredentialsSecurity() {
25+
undeployWithCommandWithClassName("DeployCredentialsCommand")
26+
}
27+
}

0 commit comments

Comments
 (0)