mirror of
https://gitlab.com/TECHNOFAB/coder-templates.git
synced 2025-12-12 02:00:11 +01:00
ci: also build tf.json and tar file for each template
This commit is contained in:
parent
09000ada9b
commit
5441a6284a
1 changed files with 14 additions and 1 deletions
15
flake.nix
15
flake.nix
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue