forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (91 loc) · 3.85 KB
/
build.gradle
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
plugins {
id 'java' // required by versioning
}
apply from: "../gradle/versioning/versioning.gradle"
ext {
quickstart_modules = [
':docker:elasticsearch-setup',
':docker:mysql-setup',
':docker:kafka-setup',
':datahub-upgrade',
':metadata-jobs:mce-consumer-job',
':metadata-jobs:mae-consumer-job',
':metadata-service:war',
':datahub-frontend',
]
debug_modules = quickstart_modules - [':metadata-jobs:mce-consumer-job',
':metadata-jobs:mae-consumer-job']
debug_compose_args = [
'-f', 'docker-compose-without-neo4j.yml',
'-f', 'docker-compose-without-neo4j.override.yml',
'-f', 'docker-compose-without-neo4j.m1.yml', // updates to mariadb
'-f', 'docker-compose.dev.yml'
]
debug_reloadable = [
'datahub-gms',
'datahub-frontend-react'
]
}
task quickstart(type: Exec, dependsOn: ':metadata-ingestion:install') {
dependsOn(quickstart_modules.collect { it + ':dockerTag' })
shouldRunAfter ':metadata-ingestion:clean', 'quickstartNuke'
environment "DATAHUB_TELEMETRY_ENABLED", "false"
environment "DOCKER_COMPOSE_BASE", "file://${rootProject.projectDir}"
// environment "ACTIONS_VERSION", 'alpine3.17-slim'
// environment "DATAHUB_ACTIONS_IMAGE", 'nginx'
def cmd = [
'source ../metadata-ingestion/venv/bin/activate && ',
'datahub docker quickstart',
'--no-pull-images',
'--standalone_consumers',
'--version', "v${version}",
'--dump-logs-on-failure'
]
commandLine 'bash', '-c', cmd.join(" ")
}
task quickstartSlim(type: Exec, dependsOn: ':metadata-ingestion:install') {
dependsOn(([':docker:datahub-ingestion'] + quickstart_modules).collect { it + ':dockerTag' })
shouldRunAfter ':metadata-ingestion:clean', 'quickstartNuke'
environment "DATAHUB_TELEMETRY_ENABLED", "false"
environment "DOCKER_COMPOSE_BASE", "file://${rootProject.projectDir}"
environment "DATAHUB_ACTIONS_IMAGE", "acryldata/datahub-ingestion"
environment "ACTIONS_VERSION", "v${version}-slim"
environment "ACTIONS_EXTRA_PACKAGES", 'acryl-datahub-actions[executor] acryl-datahub-actions'
environment "ACTIONS_CONFIG", 'https://raw.githubusercontent.com/acryldata/datahub-actions/main/docker/config/executor.yaml'
def cmd = [
'source ../metadata-ingestion/venv/bin/activate && ',
'datahub docker quickstart',
'--no-pull-images',
'--standalone_consumers',
'--version', "v${version}",
'--dump-logs-on-failure'
]
commandLine 'bash', '-c', cmd.join(" ")
}
task quickstartNuke(type: Exec, dependsOn: ":metadata-ingestion:install") {
shouldRunAfter(':metadata-ingestion:clean')
def cmd = [
'source ../metadata-ingestion/venv/bin/activate && ',
'datahub docker nuke'
]
commandLine 'bash', '-c', cmd.join(" ")
}
task quickstartDebug(type: Exec, dependsOn: ':metadata-ingestion:install') {
dependsOn(debug_modules.collect { it + ':dockerTagDebug' })
shouldRunAfter ':metadata-ingestion:clean', 'quickstartNuke'
environment "DATAHUB_PRECREATE_TOPICS", "true"
environment "DATAHUB_TELEMETRY_ENABLED", "false"
environment "DOCKER_COMPOSE_BASE", "file://${rootProject.projectDir}"
def cmd = [
'source ../metadata-ingestion/venv/bin/activate && ',
'datahub docker quickstart',
'--no-pull-images',
'--version', "debug",
'--dump-logs-on-failure'
] + debug_compose_args
commandLine 'bash', '-c', cmd.join(" ")
}
task debugReload(type: Exec) {
def cmd = ['docker compose -p datahub'] + debug_compose_args + ['restart'] + debug_reloadable
commandLine 'bash', '-c', cmd.join(" ")
}