2 Commits

Author SHA1 Message Date
34a2d46254 feat: without legacy
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2025-08-06 22:50:46 +02:00
370c73f9b0 feat: update dagger sdk
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2025-08-06 22:03:39 +02:00
8 changed files with 1005 additions and 910 deletions

View File

@@ -33,7 +33,7 @@ steps:
- chmod -R 600 ~/.ssh - chmod -R 600 ~/.ssh
- | - |
cat >$HOME/.ssh/config <<EOL cat >$HOME/.ssh/config <<EOL
Host git.front.kjuulh.io Host git.kjuulh.io
IdentityFile $HOME/.ssh/id_ed25519 IdentityFile $HOME/.ssh/id_ed25519
IdentitiesOnly yes IdentitiesOnly yes
UserKnownHostsFile=/dev/null UserKnownHostsFile=/dev/null

1801
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,11 +4,12 @@ resolver = "2"
[workspace.dependencies] [workspace.dependencies]
anyhow = { version = "1.0.86" } anyhow = { version = "1" }
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
tracing = { version = "0.1", features = ["log"] } tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3.18" } tracing-subscriber = { version = "0.3" }
clap = { version = "4.5.4", features = ["derive", "env"] } clap = { version = "4.5.4", features = ["derive", "env"] }
dotenv = { version = "0.15.0" } dotenv = { version = "0.15" }
dagger-sdk = "0.18.3"
cuddle-clusters = { git = "https://git.front.kjuulh.io/kjuulh/cuddle-clusters", branch = "main" } #tag = "v0.1.1" } cuddle-clusters = { git = "https://git.kjuulh.io/kjuulh/cuddle-clusters", branch = "main" } #tag = "v0.1.1" }

View File

@@ -7,10 +7,10 @@ edition = "2021"
[dependencies] [dependencies]
tokio.workspace = true tokio.workspace = true
dagger-sdk.workspace = true
dagger-sdk = "0.18.0"
eyre = { version = "0.6.12" } eyre = { version = "0.6.12" }
dagger-components = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" } dagger-components = { git = "https://git.kjuulh.io/kjuulh/dagger-components", branch = "main" }
dagger-rust = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" } dagger-rust = { git = "https://git.kjuulh.io/kjuulh/dagger-components", branch = "main" }
cuddle-ci = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" } cuddle-ci = { git = "https://git.kjuulh.io/kjuulh/dagger-components", branch = "main" }

View File

@@ -5,15 +5,14 @@ edition = "2021"
[dependencies] [dependencies]
tokio.workspace = true tokio.workspace = true
dagger-sdk.workspace = true
dagger-sdk = "0.18.0"
eyre = { version = "0.6.12" }
tracing.workspace = true tracing.workspace = true
tracing-subscriber.workspace = true tracing-subscriber.workspace = true
dagger-components = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" } eyre = { version = "0.6" }
dagger-rust = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" } async-trait = "0.1"
cuddle-ci = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" }
dagger-components = { git = "https://git.kjuulh.io/kjuulh/dagger-components", branch = "main" }
dagger-rust = { git = "https://git.kjuulh.io/kjuulh/dagger-components", branch = "main" }
cuddle-ci = { git = "https://git.kjuulh.io/kjuulh/dagger-components", branch = "main" }
cuddle-clusters.workspace = true cuddle-clusters.workspace = true
async-trait = "0.1.80"

View File

@@ -38,88 +38,18 @@ async fn main() -> eyre::Result<()> {
.with_mold("2.3.3") .with_mold("2.3.3")
.to_owned(); .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 deployment = &CuddleReleaser::new(client.clone()).await?;
let mut ci = CuddleCI::default(); let mut ci = CuddleCI::default();
ci.with_pull_request(service) ci.with_pull_request(service)
.with_pull_request(render)
.with_main(service) .with_main(service)
.with_main(render) .with_main(deployment);
.with_main(deployment)
.with_release(service);
if cuddle_file.please.is_some() { if cuddle_file.please.is_some() {
ci.with_main(&CuddlePlease::new(client.clone())); ci.with_main(&CuddlePlease::new(client.clone()));
} }
let name = cuddle_file.vars.service.clone(); ci.execute(std::env::args()).await?;
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);
}
}
Ok(()) Ok(())
}) })

View File

@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://git.front.kjuulh.io/kjuulh/cuddle/raw/branch/main/schemas/base.json # yaml-language-server: $schema=https://git.kjuulh.io/kjuulh/cuddle/raw/branch/main/schemas/base.json
base: "git@git.front.kjuulh.io:kjuulh/cuddle-base.git" base: "git@git.kjuulh.io:kjuulh/cuddle-base.git"
vars: vars:
service: "cuddle-rust-service-plan" service: "cuddle-rust-service-plan"

View File

@@ -17,7 +17,7 @@ steps:
- chmod -R 600 ~/.ssh - chmod -R 600 ~/.ssh
- | - |
cat >$HOME/.ssh/config <<EOL cat >$HOME/.ssh/config <<EOL
Host git.front.kjuulh.io Host git.kjuulh.io
IdentityFile $HOME/.ssh/id_ed25519 IdentityFile $HOME/.ssh/id_ed25519
IdentitiesOnly yes IdentitiesOnly yes
UserKnownHostsFile=/dev/null UserKnownHostsFile=/dev/null