ci: also build tf.json and tar file for each template

This commit is contained in:
technofab 2024-04-24 21:41:43 +02:00
parent 09000ada9b
commit 5441a6284a

View file

@ -87,6 +87,19 @@
stages = ["build" "upload"];
jobs = {
"build" = {
stage = "build";
parallel.matrix = [
{TEMPLATE = ["nix-kubernetes"];}
];
deps = [pkgs.gnutar];
script = [
"nix build .#\${TEMPLATE}"
"install result templates/\${TEMPLATE}.tf.json"
"tar -cf templates/\${TEMPLATE}.tar -C templates \${TEMPLATE}.tf.json"
];
artifacts.paths = ["templates/"];
};
"build:image" = {
stage = "build";
script = [
"nix build .#nix-coder-image"
@ -98,8 +111,8 @@
};
"upload" = {
stage = "upload";
needs = ["build"];
deps = [pkgs.skopeo];
needs = ["build:image"];
script = [
''
skopeo --insecure-policy copy --dest-creds "''${CI_REGISTRY_USER}:''${CI_REGISTRY_PASSWORD}" --tmpdir /tmp \