From b879da4d2f08bcf4d20bd23f65ed6da88eb29aaf Mon Sep 17 00:00:00 2001 From: kjuulh Date: Mon, 27 Nov 2023 21:34:23 +0100 Subject: [PATCH] feat: with update deployment Signed-off-by: kjuulh --- crates/cuddle-ci/src/rust_service.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/crates/cuddle-ci/src/rust_service.rs b/crates/cuddle-ci/src/rust_service.rs index b999962..7ea7f9b 100644 --- a/crates/cuddle-ci/src/rust_service.rs +++ b/crates/cuddle-ci/src/rust_service.rs @@ -339,6 +339,28 @@ impl MainAction for RustService { )) .await?; + let update_deployments_docker_image = + "docker.io/kasperhermansen/update-deployment:1690401410"; + self.client + .container() + .from(update_deployments_docker_image) + .with_env_variable("GIT_USERNAME", "kjuulh") + .with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap()) + .with_exec(vec![ + "update-deployment", + "--repo", + &format!( + "https://git.front.kjuulh.io/kjuulh/{}-deployment.git", + self.bin_name + ), + "--service", + &self.bin_name, + "--image", + &format!("kasperhermansen/{}:main-{}", self.bin_name, timestamp), + ]) + .exit_code() + .await?; + Ok(()) } }