-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathregistration.gradle
More file actions
38 lines (33 loc) · 1.15 KB
/
registration.gradle
File metadata and controls
38 lines (33 loc) · 1.15 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
tasks.register('consulRegistration', Exec) {
group = 'consul'
description = 'Registers the service in Consul'
workingDir = file('consul')
commandLine 'node', 'registration.js', '-c', 'register', '-f', 'config.json'
}
tasks.register('consulDeregistration', Exec) {
group = 'consul'
description = 'Deregisters the service from Consul'
workingDir = file('consul')
commandLine 'node', 'registration.js', '-c', 'deregister', '-f', 'config.json'
}
tasks.register('copyRegistrationToConsulBuild', Copy) {
from 'consul'
into 'build/consul'
include 'package.json', 'registration.js', 'config.json'
}
tasks.register('copyRamlToConsulBuild', Copy) {
from 'src/main/resources'
into 'build/consul'
include 'api-definition.yaml'
}
tasks.register('copyRamlSchemasToConsulBuild', Copy) {
from 'src/main/resources/schemas'
into 'build/consul/schemas'
}
tasks.register('prepareConsulBuild') {
group = 'build'
description = 'Prepares all Consul configuration files for the Docker build'
dependsOn 'copyRegistrationToConsulBuild'
dependsOn 'copyRamlSchemasToConsulBuild'
dependsOn 'copyRamlToConsulBuild'
}