Skip to content

Commit 15772db

Browse files
committed
fix cicero version from fact not used in cicero/cd prepare step
1 parent 2a480b2 commit 15772db

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

nix/cloud/actions.nix

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,24 @@
1212
ci = "ci";
1313
push = "push";
1414
};
15+
16+
newArgs = {
17+
inputs =
18+
inputs
19+
// inputs.std.deSystemize inputs.cicero.defaultPackage.system {
20+
cicero = builtins.getFlake "github:input-output-hk/cicero/${config.run.facts.${factNames.ci}.value.revision}";
21+
};
22+
23+
cell =
24+
cell
25+
// {
26+
oci-images = import ./oci-images.nix newArgs;
27+
entrypoints = import ./entrypoints newArgs;
28+
};
29+
};
30+
1531
pushBody = config.run.facts.${factNames.push}.value.github_body;
32+
1633
branch = lib.removePrefix "refs/heads/" pushBody.ref;
1734
in {
1835
io = ''
@@ -41,7 +58,7 @@
4158
}
4259
'';
4360

44-
prepare = with cell.oci-images.cicero; [
61+
prepare = with newArgs.cell.oci-images.cicero; [
4562
{
4663
type = "nix2container";
4764
name = "${ociRegistry}/${lib.removePrefix "registry.ci.iog.io/" imageName}:${branch}";
@@ -53,25 +70,10 @@
5370
inherit (pushBody.repository) default_branch;
5471

5572
hcl =
56-
(
57-
let
58-
additionalInputs = {cicero = builtins.getFlake "github:input-output-hk/cicero/${config.run.facts.${factNames.ci}.value.revision}";};
59-
additionalDesystemizedInputs = inputs.std.deSystemize inputs.cicero.defaultPackage.system additionalInputs;
60-
newInputs = inputs // additionalDesystemizedInputs;
61-
in
62-
lib.callPackageWith cell.constants.args.prod ./nomadEnvs/cicero {
63-
inherit branch default_branch;
64-
inputs = newInputs;
65-
cell =
66-
cell
67-
// {
68-
entrypoints = import ./entrypoints {
69-
inherit cell;
70-
inputs = newInputs;
71-
};
72-
};
73-
}
74-
)
73+
(lib.callPackageWith cell.constants.args.prod ./nomadEnvs/cicero {
74+
inherit (newArgs) inputs cell;
75+
inherit branch default_branch;
76+
})
7577
.job;
7678

7779
hclFile = __toFile "job.hcl" (builtins.unsafeDiscardStringContext (__toJSON {job = hcl;}));

0 commit comments

Comments
 (0)