the meta flake takes docs from the pinned hyperhive input
This commit is contained in:
parent
bb13909d8e
commit
daf38e4c55
16 changed files with 29 additions and 197 deletions
|
|
@ -12,9 +12,8 @@ the answer into a `swarm-builder` commit status on the PR's head.
|
|||
|
||||
## What a build is
|
||||
|
||||
- `nix build` of `nix/builder/check-flake`'s `check` output, with its four
|
||||
- `nix build` of `nix/builder/check-flake`'s `check` output, with its three
|
||||
inputs overridden: `hyperhive` and `nixpkgs` to this host's own sources,
|
||||
`hyperhive-docs` to the `docs/` source its hives use (`c0re.hyperhiveDocs`),
|
||||
and `agent` to `git+https://<forge>/agent-configs/<agent>?ref=refs/pull/<pr>/head&rev=<rev>`.
|
||||
- The evaluation runs here, pure; the builds run in the host daemon's sandbox
|
||||
as an untrusted client, so a config can neither set daemon options nor read
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ async fn main() -> Result<()> {
|
|||
check_flake: var("CHECK_FLAKE")?,
|
||||
hyperhive: var("HYPERHIVE_FLAKE")?,
|
||||
nixpkgs: var("NIXPKGS_FLAKE")?,
|
||||
hyperhive_docs: var("HYPERHIVE_DOCS_FLAKE")?,
|
||||
forge_url: forge_url()?,
|
||||
config_org: var("CONFIG_ORG")?,
|
||||
deadline: BUILD_DEADLINE,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//! One build: `nix build` of the check flake with its four inputs pointed at
|
||||
//! this host's hyperhive, hyperhive docs and nixpkgs and at the agent's config
|
||||
//! One build: `nix build` of the check flake with its three inputs pointed at
|
||||
//! this host's hyperhive and nixpkgs and at the agent's config
|
||||
//! commit.
|
||||
//!
|
||||
//! The config repo is private, so `git` fetches it with the builder's forge
|
||||
|
|
@ -45,8 +45,6 @@ pub struct Builder {
|
|||
pub hyperhive: String,
|
||||
/// The nixpkgs source this host was deployed from.
|
||||
pub nixpkgs: String,
|
||||
/// The hyperhive `docs/` source this host was deployed from.
|
||||
pub hyperhive_docs: String,
|
||||
/// `https://<forge>`, with no trailing slash and no path.
|
||||
pub forge_url: String,
|
||||
/// The org the config repos are in.
|
||||
|
|
@ -102,9 +100,6 @@ impl Builder {
|
|||
"nixpkgs".to_owned(),
|
||||
self.nixpkgs.clone(),
|
||||
"--override-input".to_owned(),
|
||||
"hyperhive-docs".to_owned(),
|
||||
self.hyperhive_docs.clone(),
|
||||
"--override-input".to_owned(),
|
||||
"agent".to_owned(),
|
||||
self.agent_url(job),
|
||||
])
|
||||
|
|
@ -308,7 +303,6 @@ mod tests {
|
|||
check_flake: "/nix/store/c-check".to_owned(),
|
||||
hyperhive: "/nix/store/h-source".to_owned(),
|
||||
nixpkgs: "/nix/store/n-source".to_owned(),
|
||||
hyperhive_docs: "/nix/store/d-docs-source".to_owned(),
|
||||
forge_url: "https://forge.example".to_owned(),
|
||||
config_org: "agent-configs".to_owned(),
|
||||
nix: PathBuf::from("nix"),
|
||||
|
|
@ -333,14 +327,7 @@ mod tests {
|
|||
.filter(|w| w[0] == "--override-input")
|
||||
.map(|w| w[1].as_str())
|
||||
.collect();
|
||||
assert_eq!(
|
||||
overridden,
|
||||
["hyperhive", "nixpkgs", "hyperhive-docs", "agent"]
|
||||
);
|
||||
assert!(
|
||||
args.windows(2)
|
||||
.any(|w| w[0] == "hyperhive-docs" && w[1] == "/nix/store/d-docs-source")
|
||||
);
|
||||
assert_eq!(overridden, ["hyperhive", "nixpkgs", "agent"]);
|
||||
assert!(args.iter().any(|a| a == "/nix/store/c-check#check"));
|
||||
assert!(args.iter().any(|a| a == "--no-write-lock-file"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue