-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sbt
195 lines (171 loc) · 5.54 KB
/
build.sbt
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
import java.io.File
import java.util.UUID
def setupProject(
project: Project,
folder: String,
localDependencies: Seq[Project] = Seq(),
externalDependencies: Seq[ModuleID] = Seq(),
description: String
): Project = {
val dependsOn = localDependencies
.map { project: Project =>
ClasspathDependency(
project = project,
configuration = Some("compile->compile;test->test")
)
}
project
.in(new File(folder))
.settings(Common.settings: _*)
.enablePlugins(DockerComposePlugin)
.enablePlugins(JavaAppPackaging)
.dependsOn(dependsOn: _*)
.settings(libraryDependencies ++= externalDependencies)
}
lazy val common = setupProject(
project = project,
folder = "common",
externalDependencies = StorageDependencies.commonDependencies,
description = "Common utilities shared throughout the storage-service"
)
lazy val replica_aggregator = setupProject(
project,
folder = "replica_aggregator",
localDependencies = Seq(common),
description =
"Checks a bag has enough successful replicas before allowing it to continue"
)
lazy val bag_versioner = setupProject(
project,
folder = "bag_versioner",
localDependencies = Seq(common),
description = "Assigns a version to a bag as it's being ingested"
)
lazy val bag_root_finder = setupProject(
project,
folder = "bag_root_finder",
localDependencies = Seq(common),
description =
"Finds the root of an unpacked bag (was it compressed top-level or in a directory?)"
)
lazy val bag_register = setupProject(
project,
folder = "bag_register",
localDependencies = Seq(common, bag_tracker),
description =
"Creates a storage manifest for a bag once ingested, so the bag can be retrieved from the bags API"
)
lazy val bag_replicator = setupProject(
project,
folder = "bag_replicator",
localDependencies = Seq(common),
externalDependencies = StorageDependencies.bagReplicatorDependencies,
description = "Replicates the bag to one or more permanent storage locations"
)
lazy val bag_tracker = setupProject(
project,
folder = "bag_tracker",
localDependencies = Seq(common),
description =
"Internal app: controls access to the database of storage manifests (i.e. metadata descriptions of bags)"
)
lazy val bag_tagger = setupProject(
project,
folder = "bag_tagger",
localDependencies = Seq(bag_tracker),
description =
"Adds tags to bags in permanent storage after they've been successfully stored"
)
lazy val bag_verifier = setupProject(
project,
folder = "bag_verifier",
localDependencies = Seq(common),
externalDependencies = ExternalDependencies.mockitoDependencies,
description =
"Runs checks and rules against a bag: fixity information, file sizes, no missing files, and so on"
)
lazy val bag_unpacker = setupProject(
project,
"bag_unpacker",
localDependencies = Seq(common),
externalDependencies =
ExternalDependencies.commonsCompressDependencies ++
ExternalDependencies.commonsIODependencies,
description =
"Unpacks a bag that's compressed as a tar.gz into individual files"
)
lazy val ingests_tracker = setupProject(
project,
folder = "ingests/ingests_tracker",
localDependencies = Seq(common),
description = "Internal app: controls access to the ingests database"
)
lazy val ingests_worker = setupProject(
project,
folder = "ingests/ingests_worker",
localDependencies = Seq(ingests_tracker),
description = "Records ingest updates sent by other services in the pipeline"
)
lazy val display = setupProject(
project,
folder = "display",
localDependencies = Seq(common),
description = "Models used in the user-facing APIs (ingests and bags APIs)"
)
lazy val notifier = setupProject(
project,
folder = "notifier",
localDependencies = Seq(display),
description =
"Sends a callback notification to an external service after an ingest completes"
)
lazy val ingests_api = setupProject(
project,
folder = "ingests/ingests_api",
localDependencies = Seq(display, ingests_tracker),
externalDependencies = ExternalDependencies.circeOpticsDependencies,
description = "User-facing ingests API"
)
lazy val bags_api = setupProject(
project,
folder = "bags_api",
localDependencies = Seq(display, bag_tracker),
externalDependencies = ExternalDependencies.circeOpticsDependencies,
description = "User-facing bags API"
)
lazy val indexer_common = setupProject(
project,
folder = "indexer/common",
localDependencies = Seq(common),
externalDependencies =
ExternalDependencies.circeOpticsDependencies ++
WellcomeDependencies.elasticsearchLibrary ++
WellcomeDependencies.elasticsearchTypesafeLibrary,
description = "Common utilities shared among the indexer applications"
)
lazy val bag_indexer = setupProject(
project,
folder = "indexer/bag_indexer",
localDependencies = Seq(display, indexer_common, bag_tracker),
description =
"Indexes top-level information about bags in an Elasticsearch cluster"
)
lazy val file_finder = setupProject(
project,
folder = "indexer/file_finder",
localDependencies = Seq(bag_tracker, indexer_common),
description =
"Finds new files that need indexing after a bag is successfully stored"
)
lazy val file_indexer = setupProject(
project,
folder = "indexer/file_indexer",
localDependencies = Seq(indexer_common),
description = "Indexes information about files in an Elasticsearch cluster"
)
lazy val ingests_indexer = setupProject(
project,
folder = "indexer/ingests_indexer",
localDependencies = Seq(display, indexer_common),
description = "Indexes information about ingests in an Elasticsearch cluster"
)