Add a pipeline to build the server image.

This commit is contained in:
Tom Alexander
2024-09-29 00:19:22 -04:00
parent a2aca6d2f1
commit 0548571b6b
7 changed files with 263 additions and 31 deletions

View File

@@ -39,7 +39,7 @@ mod kubernetes;
mod remote_config;
mod webhook;
const EXAMPLE_WEBHOOK_PAYLOAD: &'static str = include_str!("../example_webhook_payload.json");
const EXAMPLE_WEBHOOK_PAYLOAD: &'static str = include_str!("../example_tag_webhook_payload.json");
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -69,9 +69,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
)
.await?;
let remote_config = discover_webhook_bridge_config(&gitea, &repo_tree).await?;
let pipelines =
discover_matching_push_triggers(&gitea, &repo_tree, "refs/heads/main", &remote_config)
.await?;
let pipelines = discover_matching_push_triggers(
&gitea,
&repo_tree,
&webhook_payload.ref_field,
&remote_config,
)
.await?;
run_pipelines(webhook_payload, pipelines, kubernetes_client).await?;