Build in parallel, add sword builder
This commit is contained in:
+9
-7
@@ -3,15 +3,17 @@ stages:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
parallel:
|
||||||
|
matrix:
|
||||||
|
- IMG:
|
||||||
|
- vm-test
|
||||||
|
- sword-container-builder
|
||||||
tags:
|
tags:
|
||||||
- nix
|
- nix
|
||||||
- podman
|
- podman
|
||||||
script:
|
script:
|
||||||
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
- |-
|
- nix build ".#${IMG}"
|
||||||
for img in vm-test; do
|
- podman load -i result
|
||||||
nix build ".#${img}"
|
- podman tag "localhost/${IMG}:latest" $CI_REGISTRY/greg/ci-images/${IMG}:latest
|
||||||
podman load -i result
|
- podman push "$CI_REGISTRY/greg/ci-images/${IMG}:latest"
|
||||||
podman tag "localhost/${img}:latest" $CI_REGISTRY/greg/ci-images/${img}:latest
|
|
||||||
podman push "$CI_REGISTRY/greg/ci-images/${img}:latest"
|
|
||||||
done
|
|
||||||
|
|||||||
@@ -22,6 +22,22 @@
|
|||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
packages = {
|
packages = {
|
||||||
|
sword-container-builder = pkgs.dockerTools.buildLayeredImage {
|
||||||
|
name = "sword-container-builder";
|
||||||
|
tag = "latest";
|
||||||
|
contents = with pkgs; [
|
||||||
|
podman
|
||||||
|
dockerTools.binSh
|
||||||
|
dockerTools.caCertificates
|
||||||
|
coreutils
|
||||||
|
gnugrep
|
||||||
|
sword
|
||||||
|
dockerTools.usrBinEnv
|
||||||
|
];
|
||||||
|
config.Env = [
|
||||||
|
"CURL_CA_BUNDLE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||||
|
];
|
||||||
|
};
|
||||||
vm-test = let
|
vm-test = let
|
||||||
basicPython = (pkgs.python3.withPackages (p: with p; [ pyyaml ]));
|
basicPython = (pkgs.python3.withPackages (p: with p; [ pyyaml ]));
|
||||||
in pkgs.dockerTools.buildLayeredImage {
|
in pkgs.dockerTools.buildLayeredImage {
|
||||||
|
|||||||
Reference in New Issue
Block a user