-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathbuild.gradle
More file actions
77 lines (69 loc) · 2.21 KB
/
build.gradle
File metadata and controls
77 lines (69 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
buildscript {
repositories {
mavenCentral()
// Needed for ml-gradle 6.2-SNAPSHOT
maven {
url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
}
}
dependencies {
classpath "com.marklogic:ml-gradle:6.2-SNAPSHOT"
}
}
plugins {
id "net.saliman.properties" version "1.6.0"
}
apply plugin: "com.marklogic.ml-gradle"
// Using longer values as MarkLogic seems to take much longer to initialize with the Jenkins nodeclientpool.
mlWaitTillReady {
waitInterval = 3000
maxAttempts = 40
}
tasks.register("addMarkLogic12SchemasIfNecessary", com.marklogic.gradle.task.MarkLogicTask) {
description = "If testing against MarkLogic 12, include schemas that will not work on MarkLogic 11 or earlier."
doLast {
def version = new com.marklogic.mgmt.resource.clusters.ClusterManager(getManageClient()).getVersion()
if (version.startsWith("12.")) {
mlAppConfig.getSchemaPaths().add(new File(getProjectDir(), "src/main/ml-schemas-12").getAbsolutePath())
}
}
}
mlDeploy.dependsOn addMarkLogic12SchemasIfNecessary
mlLoadSchemas.dependsOn addMarkLogic12SchemasIfNecessary
/*
* Required for forcing MarkLogic to generate a temporary certificate for the app server
* that requires SSL.
*/
ext {
def command = new com.marklogic.appdeployer.command.security.GenerateTemporaryCertificateCommand()
command.setTemplateIdOrName("node-client-ssl-template")
command.setCommonName("localhost")
command.setValidFor(365)
mlAppDeployer.commands.add(command)
}
tasks.register("curlPeople", Exec) {
commandLine = [
'curl',
'--fail',
'--anyauth', '--user', 'admin:admin',
'-i',
'-X', 'POST',
'--data-binary', '@./src/main/turtle/people/people.ttl',
'-H', 'Content-type: text/turtle',
"http://${mlHost}:8079/v1/graphs?graph=/people"
]
}
tasks.register("curlCompanies", Exec) {
commandLine = [
'curl',
'--fail',
'--anyauth', '--user', 'admin:admin',
'-i',
'-X', 'POST',
'--data-binary', '@./src/main/turtle/companies/companies_100.ttl',
'-H', 'Content-type: text/turtle',
"http://${mlHost}:8079/v1/graphs?graph=/optic/sparql/test/companies.ttl"
]
}
mlDeploy.finalizedBy curlPeople
mlDeploy.finalizedBy curlCompanies