Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
aade9764ed
commit
9d47c90df3
@ -6,7 +6,7 @@ use cuddle_ci::cuddle_releaser::CuddleReleaser;
|
|||||||
use cuddle_ci::rust_service::architecture::{Architecture, Os};
|
use cuddle_ci::rust_service::architecture::{Architecture, Os};
|
||||||
use cuddle_ci::rust_service::RustService;
|
use cuddle_ci::rust_service::RustService;
|
||||||
use cuddle_ci::rust_service::{extensions::*, RustServiceContext};
|
use cuddle_ci::rust_service::{extensions::*, RustServiceContext};
|
||||||
use cuddle_ci::{Context, CuddleCI, MainAction};
|
use cuddle_ci::{Context, CuddleCI, MainAction, PullRequestAction};
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
@ -32,6 +32,9 @@ async fn main() -> eyre::Result<()> {
|
|||||||
|
|
||||||
let deployment = Arc::new(Mutex::new(CuddleReleaser::new(client).await?));
|
let deployment = Arc::new(Mutex::new(CuddleReleaser::new(client).await?));
|
||||||
CuddleCI::default()
|
CuddleCI::default()
|
||||||
|
.with_pull_request(service.clone())
|
||||||
|
//.with_pull_request(render.clone())
|
||||||
|
//.with_pull_request(deployment.clone())
|
||||||
.with_main(service.clone())
|
.with_main(service.clone())
|
||||||
.with_main(render.clone())
|
.with_main(render.clone())
|
||||||
.with_main(deployment.clone())
|
.with_main(deployment.clone())
|
||||||
@ -62,3 +65,22 @@ impl MainAction for RustServiceRender {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[async_trait]
|
||||||
|
impl PullRequestAction for RustServiceRender {
|
||||||
|
async fn execute_pull_request(&self, ctx: &mut Context) -> eyre::Result<()> {
|
||||||
|
let image_tag = ctx
|
||||||
|
.get_image_tag()?
|
||||||
|
.ok_or(eyre::anyhow!("failed to find image_tag"))?;
|
||||||
|
|
||||||
|
cuddle_ci::cuddle_x::well_known::render(vec![
|
||||||
|
"--cluster",
|
||||||
|
"clank-dev",
|
||||||
|
"--image_tag",
|
||||||
|
&image_tag,
|
||||||
|
])
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user