21 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
277c09d490 chore(deps): update all dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-02-25 01:32:24 +00:00
5f522e314b chore(deps): update all dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-02-20 05:31:25 +00:00
e1f1d2429e chore(deps): update rust crate clap to v4.5.30
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-02-18 01:32:41 +00:00
24722e1550 fix(deps): update rust crate dagger-sdk to v0.15.4
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-02-13 01:31:03 +00:00
b21a5d8647 chore(deps): update rust crate clap to v4.5.29
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-02-12 01:34:01 +00:00
730ae66c2b chore(deps): update rust crate clap to v4.5.28
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-02-04 01:32:13 +00:00
6f0f60286d fix(deps): update rust crate async-trait to v0.1.86
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-02-01 05:31:49 +00:00
87e3256660 fix(deps): update rust crate dagger-sdk to v0.15.3
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-01-30 01:35:53 +00:00
1c6198b97a chore(deps): update rust crate clap to v4.5.27
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-01-21 01:30:09 +00:00
f3aef000ef fix(deps): update rust crate dagger-sdk to v0.15.2
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-01-15 01:35:03 +00:00
b6b608ca1f feat: update
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-12 23:10:13 +01:00
cce311cfa3 chore: update packages
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2025-01-12 22:56:09 +01:00
d6cc3ae5c5 feat: just use configmap values
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-12 22:30:53 +01:00
9a9734b2d7 fix: invalid name for vault_postgres
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-12 22:20:37 +01:00
2712707da8 feat: add postgres setup
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-12 22:18:05 +01:00
0c6ba3d630 chore: add release action"
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-11 15:30:19 +01:00
227bbcef8e chore: update deps
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-11 15:15:32 +01:00
ac3c5d3672 chore: update dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-10 00:03:51 +01:00
4c3c67c84d 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:27:36 +00:00
9 changed files with 1177 additions and 1008 deletions

View File

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

2047
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,11 +4,12 @@ resolver = "2"
[workspace.dependencies]
anyhow = { version = "1.0.86" }
anyhow = { version = "1" }
tokio = { version = "1", features = ["full"] }
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"] }
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]
tokio.workspace = true
dagger-sdk.workspace = true
dagger-sdk = "0.13.7"
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" }
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" }

View File

@@ -5,15 +5,14 @@ edition = "2021"
[dependencies]
tokio.workspace = true
dagger-sdk = "0.13.7"
eyre = { version = "0.6.12" }
dagger-sdk.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
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" }
eyre = { version = "0.6" }
async-trait = "0.1"
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
async-trait = "0.1.80"

View File

@@ -14,6 +14,7 @@ use cuddle_clusters::catalog::cluster_vars::ClusterVars;
use cuddle_clusters::catalog::crdb_database::CockroachDB;
use cuddle_clusters::catalog::cuddle_vars::CuddleVars;
use cuddle_clusters::catalog::ingress::Ingress;
use cuddle_clusters::catalog::postgres_database::PostgresDatabase;
use cuddle_clusters::catalog::vault_secret::VaultSecret;
use cuddle_clusters::releaser::Releaser;
use cuddle_clusters::IntoComponent;
@@ -37,89 +38,18 @@ async fn main() -> eyre::Result<()> {
.with_mold("2.3.3")
.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 mut ci = CuddleCI::default();
ci.with_pull_request(service)
.with_pull_request(render)
//.with_pull_request(deployment.clone())
.with_main(service)
.with_main(render)
.with_main(deployment);
if cuddle_file.please.is_some() {
ci.with_main(&CuddlePlease::new(client.clone()));
}
let name = cuddle_file.vars.service.clone();
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);
}
}
ci.execute(std::env::args()).await?;
Ok(())
})
@@ -154,6 +84,10 @@ impl RustServiceRender {
.await
.map_err(|e| eyre::anyhow!("failed to get cuddle vars: {}", e.to_string()))?
.into_component(),
PostgresDatabase::new(&std::env::current_dir()?)
.await
.map_err(|e| eyre::anyhow!("failed to get cuddle vars: {}", e.to_string()))?
.into_component(),
Ingress::new(&std::env::current_dir()?)
.await
.map_err(|e| eyre::anyhow!("failed to get cuddle vars: {}", e.to_string()))?

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:
service: "cuddle-rust-service-plan"

View File

@@ -36,8 +36,13 @@ spec:
- configMapRef:
name: {{ vars.cuddle_crdb.file_name(service_name) }}
{%- endif %}
{%- if vars.vault_secret.has_values or vars.cuddle_crdb.has_values %}
{%- if vars.cuddle_postgres.has_values %}
- configMapRef:
name: {{ vars.cuddle_postgres.file_name(service_name) }}
{%- endif %}
{%- if vars.vault_secret.has_values or vars.cuddle_crdb.has_values or vars.cuddle_postgres.has_values %}
env:
{%- if vars.vault_secret.has_values %}
{%- for secret in vars.vault_secret.secrets %}
- name: {{secret | upper | replace(".", "_") | replace("-", "_") }}
@@ -47,6 +52,19 @@ spec:
key: {{ secret }}
{%- endfor %}
{%- endif %}
{#
{%- if vars.cuddle_postgres.has_values %}
{%- for env in vars.cuddle_postgres.env %}
- name: {{ env | upper | replace(".", "_") | replace("-", "_") }}
valueFrom:
secretKeyRef:
name: {{ vars.cuddle_postgres.file_name(service_name) }}
key: {{ env }}
{%- endfor %}
{%- endif %}
#}
{#
{%- if vars.cuddle_crdb.has_values %}
- name: {{vars.cuddle_crdb.env }}

View File

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