Skip to content

Commit 4366484

Browse files
committed
xtask: download and unpack Linux agent executable
1 parent 109e9a9 commit 4366484

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

xtask/src/main.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
* Copyright 2025 Oxide Computer Company
3+
*/
4+
15
use std::cmp::Ordering;
26
use std::io::{Seek, Write};
37
use std::path::PathBuf;
@@ -172,6 +176,30 @@ fn build_linux_agent() -> Result<()> {
172176
.stderr(Stdio::inherit())
173177
.status()?;
174178

179+
println!("downloading built agent...");
180+
181+
Command::new("buildomat")
182+
.arg("job")
183+
.arg("copy")
184+
.arg(&jid)
185+
.arg("/out/buildomat-agent-linux.gz")
186+
.arg("./buildomat-agent-linux.gz")
187+
.stdin(Stdio::inherit())
188+
.stdout(Stdio::inherit())
189+
.stderr(Stdio::inherit())
190+
.status()?;
191+
192+
println!("unpacking agent...");
193+
194+
Command::new("gunzip")
195+
.arg("./buildomat-agent-linux.gz")
196+
.stdin(Stdio::inherit())
197+
.stdout(Stdio::inherit())
198+
.stderr(Stdio::inherit())
199+
.status()?;
200+
201+
println!("ok");
202+
175203
Ok(())
176204
}
177205

0 commit comments

Comments
 (0)