Compare commits

..

No commits in common. "663feba85dc05f2a2cecadb593ca498c96e97250" and "0f7ed2b6f474ea84ed7505798384ada204321442" have entirely different histories.

View File

@ -341,36 +341,28 @@ impl MainAction for RustService {
let update_deployments_docker_image = let update_deployments_docker_image =
"docker.io/kasperhermansen/update-deployment:1690401410"; "docker.io/kasperhermansen/update-deployment:1690401410";
let dep = self self.client
.client
.container() .container()
.from(update_deployments_docker_image); .from(update_deployments_docker_image)
.with_env_variable("GIT_USERNAME", "git")
let dep = if let Some(sock) = std::env::var("SSH_AUTH_SOCK").ok() { .with_env_variable(
dep.with_unix_socket("/tmp/ssh_sock", self.client.host().unix_socket(sock)) "GIT_PASSWORD",
.with_env_variable("SSH_AUTH_SOCK", "/tmp/ssh_sock") std::env::var("GIT_PASSWORD").expect("GIT_PASSWORD to be set"),
} else { )
dep.with_env_variable("GIT_USERNAME", "kjuulh") .with_exec(vec![
.with_env_variable( "update-deployment",
"GIT_PASSWORD", "--repo",
std::env::var("GIT_PASSWORD").expect("GIT_PASSWORD to be set"), &format!(
) "https://git.front.kjuulh.io/kjuulh/{}-deployment.git",
}; self.bin_name
),
dep.with_exec(vec![ "--service",
"update-deployment", &self.bin_name,
"--repo", "--image",
&format!( &format!("kasperhermansen/{}:main-{}", self.bin_name, timestamp),
"https://git.front.kjuulh.io/kjuulh/{}-deployment.git", ])
self.bin_name .sync()
), .await?;
"--service",
&self.bin_name,
"--image",
&format!("kasperhermansen/{}:main-{}", self.bin_name, timestamp),
])
.sync()
.await?;
Ok(()) Ok(())
} }