mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Dockerfile Parts (#428)
* De-duplicate Dockerfiles by using a bash file to concatenate common parts Resolves #375. Dockerfiles are still committed to the repo to avoid a dependency on bash. * Add a CI job to confirm the committed dockerfiles are the currently generated ones * Create dedicated Dockerfiles per processor network Ensures the compromising of network-specific dependencies doesn't lead to a compromise of the build process for all processors. * Dockerfile corrections * Correct call to build processor Docker image in tests/processor
This commit is contained in:
@@ -54,7 +54,14 @@ pub fn build(name: String) {
|
||||
if HashSet::from(["bitcoin", "ethereum", "monero"]).contains(name.as_str()) {
|
||||
dockerfile_path = dockerfile_path.join("coins");
|
||||
}
|
||||
dockerfile_path = dockerfile_path.join(&name).join("Dockerfile");
|
||||
if name.contains("-processor") {
|
||||
dockerfile_path = dockerfile_path
|
||||
.join("processor")
|
||||
.join(name.split('-').next().unwrap())
|
||||
.join("Dockerfile");
|
||||
} else {
|
||||
dockerfile_path = dockerfile_path.join(&name).join("Dockerfile");
|
||||
}
|
||||
|
||||
// For all services, if the Dockerfile was edited after the image was built we should rebuild
|
||||
let mut last_modified =
|
||||
@@ -71,7 +78,7 @@ pub fn build(name: String) {
|
||||
meta(repo_path.join("substrate").join("primitives")),
|
||||
meta(repo_path.join("message-queue")),
|
||||
],
|
||||
"processor" => vec![
|
||||
"bitcoin-processor" | "ethereum-processor" | "monero-processor" => vec![
|
||||
meta(repo_path.join("common")),
|
||||
meta(repo_path.join("crypto")),
|
||||
meta(repo_path.join("coins")),
|
||||
|
||||
Reference in New Issue
Block a user