Compare commits

..

9 Commits

Author SHA1 Message Date
2dcf0215fb chore(deps): update rust crate tracing to v0.1.44 2025-12-19 01:23:18 +00:00
b08c0bfe35 chore(deps): update tokio-tracing monorepo 2025-11-29 01:22:07 +00:00
9b0ac9b142 chore(deps): update rust crate tracing-subscriber to v0.3.20 2025-11-13 01:45:26 +00:00
8d4e4cc214 chore(deps): update all dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-01-21 01:28:25 +00:00
8d263832f7 chore(deps): update all dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-01-10 01:24:53 +00:00
aa29cab36d chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-09 01:26:44 +00:00
b1e116604a fix(deps): update rust crate async-trait to v0.1.85
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-07 01:26:16 +00:00
ab61a5b89f feat: use new dagger connect closure
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-12-26 22:55:14 +01:00
027e375baa feat: update dagger
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-12-26 22:53:13 +01:00
7 changed files with 655 additions and 418 deletions

View File

@@ -68,7 +68,7 @@ steps:
from_secret: docker_password from_secret: docker_password
DOCKER_USERNAME: DOCKER_USERNAME:
from_secret: docker_username from_secret: docker_username
DOCKER_HOST: "tcp://192.168.1.233:2376" DOCKER_HOST: "tcp://192.168.1.155:2376"
CUDDLE_SECRETS_PROVIDER: 1password CUDDLE_SECRETS_PROVIDER: 1password
CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci" CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci"
CUDDLE_SSH_AGENT: "true" CUDDLE_SSH_AGENT: "true"
@@ -128,7 +128,7 @@ steps:
GIT_PASSWORD: GIT_PASSWORD:
from_secret: git_password from_secret: git_password
CI_PREFIX: "/mnt/ci/ci" CI_PREFIX: "/mnt/ci/ci"
DOCKER_HOST: "tcp://192.168.1.233:2376" DOCKER_HOST: "tcp://192.168.1.155:2376"
CUDDLE_PLEASE_TOKEN: CUDDLE_PLEASE_TOKEN:
from_secret: cuddle_please_token from_secret: cuddle_please_token
OP_SERVICE_ACCOUNT_TOKEN: OP_SERVICE_ACCOUNT_TOKEN:

969
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.13.7"
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

@@ -7,40 +7,44 @@ const BIN_NAME: &str = "cuddle-node-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())
.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(BIN_NAME)
.with_deployment(false)
.to_owned();
let service = &RustService::from(client.clone()) let drone_templater =
.with_arch(Architecture::Amd64) &DroneTemplater::new(client, "templates/cuddle-node-service-plan.yaml")
.with_os(Os::Linux) .with_variable("bin_name", BIN_NAME)
.with_apt(&[ .to_owned();
"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(BIN_NAME)
.with_deployment(false)
.to_owned();
let drone_templater = &DroneTemplater::new(client, "templates/cuddle-node-service-plan.yaml") CuddleCI::default()
.with_variable("bin_name", BIN_NAME) .with_pull_request(service)
.to_owned(); .with_main(service)
.with_main(drone_templater)
.execute(std::env::args())
.await?;
CuddleCI::default() Ok(())
.with_pull_request(service) })
.with_main(service) .await?;
.with_main(drone_templater)
.execute(std::env::args())
.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.13.7"
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

@@ -5,19 +5,23 @@ use cuddle_ci::CuddleCI;
#[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 cuddle_file = CuddleFile::from_cuddle_file().await?; let cuddle_file = CuddleFile::from_cuddle_file().await?;
let service = &NodeService::new(client.clone(), &cuddle_file.vars.service) let service = &NodeService::new(client.clone(), &cuddle_file.vars.service)
.with_arch(Architecture::Amd64) .with_arch(Architecture::Amd64)
.with_os(Os::Linux) .with_os(Os::Linux)
.to_owned(); .to_owned();
CuddleCI::default() CuddleCI::default()
.with_pull_request(service) .with_pull_request(service)
.with_main(service) .with_main(service)
.execute(std::env::args()) .execute(std::env::args())
.await?; .await?;
Ok(())
})
.await?;
Ok(()) Ok(())
} }

View File

@@ -63,7 +63,7 @@ steps:
GIT_PASSWORD: GIT_PASSWORD:
from_secret: git_password from_secret: git_password
CI_PREFIX: "/mnt/ci/ci" CI_PREFIX: "/mnt/ci/ci"
DOCKER_HOST: "tcp://192.168.1.233:2376" DOCKER_HOST: "tcp://192.168.1.155:2376"
CUDDLE_PLEASE_TOKEN: CUDDLE_PLEASE_TOKEN:
from_secret: cuddle_please_token from_secret: cuddle_please_token
OP_SERVICE_ACCOUNT_TOKEN: OP_SERVICE_ACCOUNT_TOKEN:
@@ -112,7 +112,7 @@ steps:
GIT_PASSWORD: GIT_PASSWORD:
from_secret: git_password from_secret: git_password
CI_PREFIX: "/mnt/ci/ci" CI_PREFIX: "/mnt/ci/ci"
DOCKER_HOST: "tcp://192.168.1.233:2376" DOCKER_HOST: "tcp://192.168.1.155:2376"
CUDDLE_PLEASE_TOKEN: CUDDLE_PLEASE_TOKEN:
from_secret: cuddle_please_token from_secret: cuddle_please_token
OP_SERVICE_ACCOUNT_TOKEN: OP_SERVICE_ACCOUNT_TOKEN: