mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
feat(ci): Build Docker image via Nix
Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
This commit is contained in:
parent
3ca49fa591
commit
124e59ecc7
2 changed files with 23 additions and 2 deletions
|
@ -114,8 +114,22 @@ build:nix:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- nix build --print-build-logs .
|
- nix build --print-build-logs .
|
||||||
- nix bundle --out-link villas .
|
|
||||||
- cp -L villas artifacts/villas
|
- | # Build ARX bundle
|
||||||
|
nix bundle --out-link villas .
|
||||||
|
cp -L villas artifacts/villas
|
||||||
|
|
||||||
|
- | # Build Docker image
|
||||||
|
nix run nixpkgs#skopeo -- login \
|
||||||
|
--username ${CI_REGISTRY_USER} \
|
||||||
|
--password ${CI_REGISTRY_PASSWORD} \
|
||||||
|
${CI_REGISTRY}
|
||||||
|
|
||||||
|
nix build '.#dockerImage'
|
||||||
|
|
||||||
|
nix run nixpkgs#skopeo -- copy --insecure-policy \
|
||||||
|
"docker-archive:./result" \
|
||||||
|
"docker://${DOCKER_IMAGE}:${DOCKER_TAG}-nix"
|
||||||
|
|
||||||
# after_script:
|
# after_script:
|
||||||
# - | # Push whole store to cache
|
# - | # Push whole store to cache
|
||||||
|
|
|
@ -63,6 +63,13 @@
|
||||||
withAllHooks = true;
|
withAllHooks = true;
|
||||||
withAllNodes = true;
|
withAllNodes = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dockerImage = pkgs.dockerTools.buildLayeredImage {
|
||||||
|
name = "villas-node";
|
||||||
|
tag = "latest-nix";
|
||||||
|
contents = [ villas-node ];
|
||||||
|
config.ENTRYPOINT = "/bin/villas";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue