Skip to main content

flowey_lib_hvlite/_jobs/
check_distro_build_from_checkout.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! Assemble the OpenVMM vendor archive and run the distribution-build gate in
5//! a single job.
6//!
7//! The release pipeline assembles the archive in a dedicated job and hands it
8//! to the gate as an artifact. PR CI has no such job, so it assembles its own
9//! snapshot of the commit under test. A pipeline job can only name root nodes,
10//! not wire variables between them, so that hand-off lives here.
11
12use flowey::node::prelude::*;
13
14flowey_request! {
15    pub struct Request {
16        pub done: WriteVar<SideEffect>,
17    }
18}
19
20new_simple_flow_node!(struct Node);
21
22impl SimpleFlowNode for Node {
23    type Request = Request;
24
25    fn imports(ctx: &mut ImportCtx<'_>) {
26        ctx.import::<crate::assemble_openvmm_vendor_release::Node>();
27        ctx.import::<crate::_jobs::check_distro_build::Node>();
28    }
29
30    fn process_request(request: Self::Request, ctx: &mut NodeCtx<'_>) -> anyhow::Result<()> {
31        let Request { done } = request;
32
33        let release =
34            ctx.reqv(|release| crate::assemble_openvmm_vendor_release::Request { release });
35
36        ctx.req(crate::_jobs::check_distro_build::Request { release, done });
37
38        Ok(())
39    }
40}