Skip to content

Commit a245138

Browse files
committed
add secrets for docker registry to cicero job
1 parent e27f4fd commit a245138

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

nix/cloud/nomadEnvs/cicero/default.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@
117117
# go-getter reads from the NETRC env var or $HOME/.netrc
118118
# https://github.com/hashicorp/go-getter/blob/4553965d9c4a8d99bd0d381c1180c08e07eff5fd/netrc.go#L24
119119
NETRC = "/secrets/netrc";
120+
121+
CICERO_EVALUATOR_NIX_OCI_REGISTRY = "docker://registry.ci.iog.io";
122+
REGISTRY_AUTH_FILE = "/secrets/docker";
120123
};
121124

122125
template =
@@ -152,6 +155,17 @@
152155
'';
153156
env = true;
154157
}
158+
159+
{
160+
destination = "/secrets/docker";
161+
data = ''{
162+
"auths": {
163+
"registry.ci.iog.io": {
164+
"auth": "{{with secret "kv/data/cicero/docker"}}{{with .Data.data}}{{print .user ":" .password | base64Encode}}{{end}}{{end}}"
165+
}
166+
}
167+
}'';
168+
}
155169
];
156170
};
157171
};

0 commit comments

Comments
 (0)