mirror of
https://gitlab.com/TECHNOFAB/coder-templates.git
synced 2025-12-12 02:00:11 +01:00
ci: add CI and rename image to nix-coder-image
This commit is contained in:
parent
7cd71e7537
commit
b98a1e728c
3 changed files with 33 additions and 1 deletions
28
flake.nix
28
flake.nix
|
|
@ -82,6 +82,34 @@
|
|||
modules = [./nix-kubernetes];
|
||||
};
|
||||
};
|
||||
|
||||
ci = {
|
||||
stages = ["build" "upload"];
|
||||
jobs = {
|
||||
"build" = {
|
||||
stage = "build";
|
||||
script = [
|
||||
"nix build .#nix-coder-image"
|
||||
];
|
||||
after_script = [
|
||||
"install -D result dist/nix-coder-image.tar.gz"
|
||||
];
|
||||
artifacts.paths = ["dist/"];
|
||||
};
|
||||
"upload" = {
|
||||
stage = "upload";
|
||||
needs = ["build"];
|
||||
deps = [pkgs.skopeo];
|
||||
script = [
|
||||
''
|
||||
skopeo --insecure-policy copy --dest-creds "''${CI_REGISTRY_USER}:''${CI_REGISTRY_PASSWORD}" --tmpdir /tmp \
|
||||
"docker-archive:dist/nix-coder-image.tar.gz" \
|
||||
"docker://''${CI_REGISTRY_IMAGE}/nix-coder-image:''${CI_COMMIT_SHORT_SHA}"
|
||||
''
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue