kjuulh
762d6c3bdc
Some checks reported errors
continuous-integration/drone/push Build was killed
Signed-off-by: kjuulh <contact@kjuulh.io>
50 lines
1.3 KiB
Rust
50 lines
1.3 KiB
Rust
use std::sync::Arc;
|
|
|
|
use cuddle_ci::rust_service::architecture::{Architecture, Os};
|
|
use cuddle_ci::rust_service::{extensions::*, RustService};
|
|
use cuddle_ci::{drone_templater, CuddleCI};
|
|
use tokio::sync::Mutex;
|
|
|
|
#[tokio::main]
|
|
async fn main() -> eyre::Result<()> {
|
|
let client = dagger_sdk::connect().await?;
|
|
|
|
let service = RustService::from(client.clone())
|
|
.with_arch(Architecture::Amd64)
|
|
.with_os(Os::Linux)
|
|
.with_apt(&[
|
|
"clang",
|
|
"libssl-dev",
|
|
"libz-dev",
|
|
"libgit2-dev",
|
|
"git",
|
|
"openssh-client",
|
|
])
|
|
.with_apt_release(&["git", "openssh-client"])
|
|
.with_docker_cli()
|
|
.with_cuddle_cli()
|
|
.with_kubectl()
|
|
.with_apt_ca_certificates()
|
|
.with_crates(["ci", "crates/*"])
|
|
.with_mold("2.3.3")
|
|
.with_bin_name("cuddle-rust-cli-plan")
|
|
.with_deployment(false)
|
|
.to_owned();
|
|
|
|
let service = Arc::new(Mutex::new(service));
|
|
|
|
let drone_templater = Arc::new(Mutex::new(drone_templater::DroneTemplater::new(
|
|
client,
|
|
"templates/cuddle-rust-cli-plan.yaml",
|
|
)));
|
|
|
|
CuddleCI::default()
|
|
.with_pull_request(service.clone())
|
|
.with_main(service.clone())
|
|
.with_main(drone_templater)
|
|
.execute(std::env::args())
|
|
.await?;
|
|
|
|
Ok(())
|
|
}
|