Skip to content

Commit

Permalink
Have Docker test build the dev Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Feb 8, 2024
1 parent bd3b563 commit 8e6d4df
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/docker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub fn fresh_logs_folder(first: bool, label: &str) -> String {
logs_path.to_str().unwrap().to_string()
}

// TODO: Merge this with what's in serai-orchestrator/have serai-orchestrator perform building
static BUILT: OnceLock<Mutex<HashMap<String, bool>>> = OnceLock::new();
pub fn build(name: String) {
let built = BUILT.get_or_init(|| Mutex::new(HashMap::new()));
Expand All @@ -48,6 +49,26 @@ pub fn build(name: String) {
.arg("run")
.arg("-p")
.arg("serai-orchestrator")
.arg("--")
.arg("key_gen")
.arg("dev")
.spawn()
.unwrap()
.wait()
.unwrap()
.success()
{
panic!("failed to run the orchestrator");
}

if !Command::new("cargo")
.current_dir(&repo_path)
.arg("run")
.arg("-p")
.arg("serai-orchestrator")
.arg("--")
.arg("setup")
.arg("dev")
.spawn()
.unwrap()
.wait()
Expand Down

0 comments on commit 8e6d4df

Please sign in to comment.