1
crates/cuddle-empty-plan/.gitignore
vendored
Normal file
1
crates/cuddle-empty-plan/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target
|
15
crates/cuddle-empty-plan/Cargo.toml
Normal file
15
crates/cuddle-empty-plan/Cargo.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "cuddle-empty-plan"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
tokio.workspace = true
|
||||
|
||||
dagger-sdk = "0.9.8"
|
||||
eyre = { version = "0.6.12" }
|
||||
|
||||
dagger-components = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" }
|
||||
dagger-rust = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" }
|
||||
cuddle-ci = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" }
|
||||
async-trait = "0.1.79"
|
34
crates/cuddle-empty-plan/src/main.rs
Normal file
34
crates/cuddle-empty-plan/src/main.rs
Normal file
@@ -0,0 +1,34 @@
|
||||
use cuddle_ci::cuddle_file::CuddleFile;
|
||||
use cuddle_ci::rust_service::architecture::{Architecture, Os};
|
||||
use cuddle_ci::rust_service::extensions::*;
|
||||
use cuddle_ci::rust_service::RustService;
|
||||
use cuddle_ci::{cuddle_please, CuddleCI};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> eyre::Result<()> {
|
||||
let client = dagger_sdk::connect().await?;
|
||||
let cuddle_file = CuddleFile::from_cuddle_file().await?;
|
||||
|
||||
let service = &RustService::from(client.clone())
|
||||
.with_arch(Architecture::Amd64)
|
||||
.with_os(Os::Linux)
|
||||
.with_apt(&["libssl-dev", "libz-dev", "libpq-dev", "protobuf-compiler"])
|
||||
.with_apt_release(&["libssl-dev", "libz-dev", "libpq-dev"])
|
||||
.with_cuddle_file(&cuddle_file)
|
||||
.with_apt_ca_certificates()
|
||||
.with_workspace_crates()
|
||||
.await
|
||||
.with_mold("2.3.3")
|
||||
.to_owned();
|
||||
|
||||
let cuddle_please = &cuddle_please::CuddlePlease::new(client.clone());
|
||||
|
||||
CuddleCI::default()
|
||||
.with_pull_request(service)
|
||||
.with_main(service)
|
||||
.with_main(cuddle_please)
|
||||
.execute(std::env::args())
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
Reference in New Issue
Block a user