feat: without legacy
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2025-08-06 22:50:46 +02:00
parent 370c73f9b0
commit 34a2d46254

View File

@@ -38,88 +38,18 @@ async fn main() -> eyre::Result<()> {
.with_mold("2.3.3")
.to_owned();
let render = &RustServiceRender {
service: cuddle_file.vars.service.clone(),
//registry: "http://127.0.0.1:7900".into(),
//registry: "http://10.0.11.19:7900".into(),
registry: "https://releaser.i.kjuulh.io:443".into(),
};
let deployment = &CuddleReleaser::new(client.clone()).await?;
let mut ci = CuddleCI::default();
ci.with_pull_request(service)
.with_pull_request(render)
.with_main(service)
.with_main(render)
.with_main(deployment)
.with_release(service);
.with_main(deployment);
if cuddle_file.please.is_some() {
ci.with_main(&CuddlePlease::new(client.clone()));
}
let name = cuddle_file.vars.service.clone();
let system_time = SystemTime::now().duration_since(UNIX_EPOCH)?;
let build_notifications = client
.container()
.from("docker.io/kasperhermansen/build-notifications:main-1731768496")
.with_env_variable("TIME", system_time.as_secs().to_string())
.with_env_variable(
"SERVICE_HOST",
"https://build-notifications.prod.internal.kjuulh.app",
)
.with_env_variable(
"SERVICE_GRPC_HOST",
"https://grpc.build-notifications.prod.internal.kjuulh.app",
);
if let Err(e) = build_notifications
.with_exec(vec![
"build-notifications",
"build-started",
"--project-name",
&name,
])
.sync()
.await
{
tracing::warn!("failed to send start notification: {}", e.to_string())
}
match ci.execute(std::env::args()).await {
Ok(()) => {
if let Err(e) = build_notifications
.with_exec(vec![
"build-notifications",
"build-success",
"--project-name",
&name,
])
.sync()
.await
{
tracing::warn!("failed to send success notification: {}", e.to_string())
}
}
Err(e) => {
if let Err(e) = build_notifications
.with_exec(vec![
"build-notifications",
"build-failure",
"--project-name",
&name,
"--error",
&e.to_string(),
])
.sync()
.await
{
tracing::warn!("failed to send failure notification: {}", e.to_string())
}
return Err(e);
}
}
ci.execute(std::env::args()).await?;
Ok(())
})