feat: update service
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-08-01 23:04:53 +02:00
parent 56c01088b8
commit e9abbfb266
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394
5 changed files with 388 additions and 368 deletions

617
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ edition = "2021"
[dependencies] [dependencies]
tokio.workspace = true tokio.workspace = true
dagger-sdk = "0.9.8" dagger-sdk = "0.11.10"
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.front.kjuulh.io/kjuulh/dagger-components", branch = "main" }

View File

@ -10,8 +10,7 @@ const BIN_NAME: &str = "cuddle-rust-service-plan";
#[tokio::main] #[tokio::main]
async fn main() -> eyre::Result<()> { async fn main() -> eyre::Result<()> {
let client = dagger_sdk::connect().await?; dagger_sdk::connect(|client| async move {
let service = &RustService::from(client.clone()) let service = &RustService::from(client.clone())
.with_arch(Architecture::Amd64) .with_arch(Architecture::Amd64)
.with_os(Os::Linux) .with_os(Os::Linux)
@ -35,7 +34,8 @@ async fn main() -> eyre::Result<()> {
.with_deployment(false) .with_deployment(false)
.to_owned(); .to_owned();
let drone_templater = &DroneTemplater::new(client, "templates/cuddle-rust-service-plan.yaml") let drone_templater =
&DroneTemplater::new(client, "templates/cuddle-rust-service-plan.yaml")
.with_variable("bin_name", BIN_NAME) .with_variable("bin_name", BIN_NAME)
.to_owned(); .to_owned();
@ -45,6 +45,9 @@ async fn main() -> eyre::Result<()> {
.with_main(drone_templater) .with_main(drone_templater)
.execute(std::env::args()) .execute(std::env::args())
.await?; .await?;
Ok(())
})
.await?;
Ok(()) Ok(())
} }

View File

@ -6,7 +6,7 @@ edition = "2021"
[dependencies] [dependencies]
tokio.workspace = true tokio.workspace = true
dagger-sdk = "0.9.8" dagger-sdk = "0.11.10"
eyre = { version = "0.6.12" } eyre = { version = "0.6.12" }
tracing.workspace = true tracing.workspace = true

View File

@ -21,7 +21,7 @@ use cuddle_clusters::IntoComponent;
async fn main() -> eyre::Result<()> { async fn main() -> eyre::Result<()> {
tracing_subscriber::fmt::init(); tracing_subscriber::fmt::init();
let client = dagger_sdk::connect().await?; dagger_sdk::connect(|client| async move {
let cuddle_file = CuddleFile::from_cuddle_file().await?; let cuddle_file = CuddleFile::from_cuddle_file().await?;
let service = &RustService::from(client.clone()) let service = &RustService::from(client.clone())
@ -59,6 +59,10 @@ async fn main() -> eyre::Result<()> {
ci.execute(std::env::args()).await?; ci.execute(std::env::args()).await?;
Ok(())
})
.await?;
Ok(()) Ok(())
} }