forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.gradle
More file actions
196 lines (184 loc) · 8.17 KB
/
settings.gradle
File metadata and controls
196 lines (184 loc) · 8.17 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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}
// Resolve Maven repository URLs: legacy single-word properties take precedence for backward
// compatibility, then the new namespaced properties (whose defaults live in gradle.properties).
// Stored in gradle.ext so they're available to buildSrc's buildscript phase, which runs before root
// project properties propagate (buildSrc is a separate standalone build).
def mavenCentralUrl = hasProperty('apacheMavenRepositoryUrl') ? getProperty('apacheMavenRepositoryUrl') :
hasProperty('mavenCentralRepositoryUrl') ? getProperty('mavenCentralRepositoryUrl') :
getProperty('datahub.dependencies.maven.central')
def confluentUrl = hasProperty('confluentMavenRepositoryUrl') ? getProperty('confluentMavenRepositoryUrl') : getProperty('datahub.dependencies.maven.confluent')
def linkedinUrl = hasProperty('linkedinOpenSourceRepositoryUrl') ? getProperty('linkedinOpenSourceRepositoryUrl') : getProperty('datahub.dependencies.maven.linkedinOpenSource')
// node-gradle plugin resolves Node.js binaries from an Ivy repository; Legacy nodeDistBaseUrl takes precedence for
// backward compatibility, then the new namespaced property (default lives in gradle.properties).
def nodeDistUrl = hasProperty('nodeDistBaseUrl') ? getProperty('nodeDistBaseUrl') : getProperty('datahub.dependencies.node.distBaseUrl')
def apkRepoUrl = getProperty('datahub.dependencies.apkrepo.url')
def githubBaseUrl = hasProperty('githubMirrorUrl') ? getProperty('githubMirrorUrl') : getProperty('datahub.dependencies.github.baseURL')
def pipMirrorUrl = hasProperty('pipMirrorUrl') ? getProperty('pipMirrorUrl') : getProperty('datahub.dependencies.python.pipMirrorUrl')
def pipExtraIndexUrl = hasProperty('pipExtraIndexUrls') ? getProperty('pipExtraIndexUrls') : getProperty('datahub.dependencies.python.pipExtraIndexUrl')
gradle.ext['datahub.dependencies.maven.central'] = mavenCentralUrl
gradle.ext['datahub.dependencies.maven.confluent'] = confluentUrl
gradle.ext['datahub.dependencies.maven.linkedinOpenSource'] = linkedinUrl
gradle.ext['datahub.dependencies.node.distBaseUrl'] = nodeDistUrl
gradle.ext['datahub.dependencies.apkrepo.url'] = apkRepoUrl
gradle.ext['datahub.dependencies.github.baseURL'] = githubBaseUrl
gradle.ext['datahub.dependencies.python.pipMirrorUrl'] = pipMirrorUrl
gradle.ext['datahub.dependencies.python.pipExtraIndexUrl'] = pipExtraIndexUrl
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_PROJECT)
repositories {
gradlePluginPortal()
mavenLocal()
maven { url mavenCentralUrl }
maven { url confluentUrl }
maven { url linkedinUrl }
}
}
include 'datahub-web-react'
include 'datahub-frontend'
include 'datahub-graphql-core'
include 'metadata-service:war'
include 'metadata-service:servlet'
include 'metadata-service:factories'
include 'metadata-service:auth-config'
include 'metadata-service:auth-impl'
include 'metadata-service:auth-filter'
include 'metadata-service:auth-servlet-impl'
include 'metadata-service:restli-api'
include 'metadata-service:restli-client-api'
include 'metadata-service:restli-client'
include 'metadata-service:restli-servlet-impl'
include 'metadata-service:graphql-servlet-impl'
include 'metadata-service:openapi-servlet'
include 'metadata-service:openapi-entity-servlet'
include 'metadata-service:openapi-entity-servlet:generators'
include 'metadata-service:openapi-analytics-servlet'
include 'metadata-service:plugin'
include 'metadata-service:plugin:src:test:sample-test-plugins'
include 'metadata-dao-impl:kafka-producer'
include 'metadata-events:mxe-avro'
include 'metadata-events:mxe-registration'
include 'metadata-events:mxe-schemas'
include 'metadata-events:mxe-utils-avro'
include 'metadata-ingestion'
include 'metadata-jobs:mae-consumer'
include 'metadata-jobs:mce-consumer'
include 'metadata-jobs:pe-consumer'
include 'metadata-jobs:mae-consumer-job'
include 'metadata-jobs:mce-consumer-job'
include ':docker'
include ':docker:datahub-ingestion'
include ':docker:datahub-ingestion-base'
include 'metadata-models'
include 'metadata-models-validator'
include 'entity-registry'
include 'metadata-io'
include 'metadata-io:metadata-io-api'
include 'datahub-upgrade'
include 'metadata-utils'
include 'li-utils'
include 'test-models'
include 'docs-website'
include 'metadata-models-custom'
include 'entity-registry:custom-test-model'
include 'metadata-integration:java:datahub-client'
include 'metadata-integration:java:custom-plugin-lib'
include 'metadata-integration:java:datahub-event'
include 'metadata-integration:java:datahub-protobuf'
include 'metadata-integration:java:openlineage-converter'
include 'metadata-integration:java:acryl-spark-lineage'
include 'ingestion-scheduler'
include 'metadata-ingestion-modules:airflow-plugin'
include 'metadata-ingestion-modules:gx-plugin'
include 'metadata-ingestion-modules:dagster-plugin'
include 'metadata-ingestion-modules:prefect-plugin'
include 'python-build'
include 'smoke-test'
include 'scripts:dev'
include 'metadata-auth:auth-api'
include 'metadata-service:schema-registry-api'
include 'metadata-service:schema-registry-servlet'
include 'metadata-integration:java:examples'
include 'mock-entity-registry'
include 'metadata-service:services'
include 'metadata-service:configuration'
include ':metadata-jobs:common'
include ':metadata-operation-context'
include ':metadata-service:openapi-servlet:models'
include ':metadata-integration:java:datahub-schematron:lib'
include ':metadata-integration:java:datahub-schematron:cli'
include ':metadata-service:iceberg-catalog'
include ':metadata-service:events-service'
include ':datahub-actions'
include ':datahub-agent-context'
// CVE-patched fork of com.linkedin.avroutil1:helper-all (in-repo JAR; see build.gradle dependencySubstitution)
include 'vendor:avroutil1-helper-all-fork'
buildCache {
def depotSecret = System.getenv('DEPOT_TOKEN');
def isCi = System.getenv('CI');
remote(HttpBuildCache) {
url = 'https://cache.depot.dev'
enabled = depotSecret != null
push = isCi // Push only on CI. Local development only pulls
credentials {
username = ''
password = depotSecret
}
}
}
def installPreCommitHooks() {
if (System.getenv("CI") == "true") {
println("Skipping pre-commit hooks in CI")
return
}
def preCommitInstalled = false
try {
def process = ["which", "pre-commit"].execute()
def stdout = new StringBuilder()
def stderr = new StringBuilder()
process.waitForProcessOutput(stdout, stderr)
preCommitInstalled = (process.exitValue() == 0)
println "Pre-commit check: ${stdout}"
} catch (Exception e) {
println "Error checking pre-commit: ${e.message}"
return
}
if (!preCommitInstalled) {
try {
def installProcess = ["python", "-m", "pip", "install", "pre-commit"].execute()
def stdout = new StringBuilder()
def stderr = new StringBuilder()
installProcess.waitForProcessOutput(stdout, stderr)
if (installProcess.exitValue() != 0) {
println "Failed to install pre-commit: ${stderr}"
return
}
println "Install output: ${stdout}"
preCommitInstalled = true
} catch (Exception e) {
println "Error installing pre-commit: ${e.message}"
return
}
}
if(preCommitInstalled) {
try {
def installHooksProcess = ["pre-commit", "install"].execute()
def stdout = new StringBuilder()
def stderr = new StringBuilder()
installHooksProcess.waitForProcessOutput(stdout, stderr)
if (installHooksProcess.exitValue() != 0) {
println "Failed to install hooks: ${stdout}"
return
}
println "Hooks output: ${stdout}"
} catch (Exception e) {
println "Error installing hooks: ${e.message}"
return
}
}
}
installPreCommitHooks()