pull deployment repo

This commit is contained in:
mbecker20
2022-12-21 05:10:17 +00:00
parent 3b0f919baa
commit 3a0fa36d19
9 changed files with 178 additions and 21 deletions

View File

@@ -17,6 +17,21 @@ impl PeripheryClient {
.context("failed to clone repo on periphery")
}
pub async fn pull_repo(
&self,
server: &Server,
name: &str,
branch: &Option<String>,
) -> anyhow::Result<Log> {
self.post_json(
server,
"/git/pull",
&json!({ "name": name, "branch": branch }),
)
.await
.context("failed to pull repo on periphery")
}
pub async fn delete_repo(&self, server: &Server, build_name: &str) -> anyhow::Result<Log> {
self.post_json(server, "/git/delete", &json!({ "name": build_name }))
.await