From 6b84fe71f722af8a8ff94d2268dcbb4a8820e3ca Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 10 Oct 2020 21:02:23 +0000 Subject: [PATCH] ci-root: add docker images to ci-root --- ci-root.nix | 3 ++- docker-images.nix | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ci-root.nix b/ci-root.nix index 6c481f01e0..b0d9a808f4 100644 --- a/ci-root.nix +++ b/ci-root.nix @@ -9,11 +9,12 @@ let prefixAttrs = prefix: lib.mapAttrsToList (name: value: { name = "${prefix}-${name}"; path = value; }); ciMachines = prefixAttrs "machine" depot.ops.nixos; ciPackages = prefixAttrs "pkg" depot.nix.pkgs; + ciDocker = prefixAttrs "docker" ((import ./docker-images.nix).images); ciOther = prefixAttrs "other" { twitterchiver-archiver = depot.go.twitterchiver.archiver; twitterchiver-archiver-docker = depot.go.twitterchiver.archiver.dockerImage; }; in -pkgs.linkFarm "ci" (ciMachines ++ ciPackages ++ ciOther) +pkgs.linkFarm "ci" (ciMachines ++ ciPackages ++ ciDocker ++ ciOther) diff --git a/docker-images.nix b/docker-images.nix index e814db6b3e..59ef0d59c3 100644 --- a/docker-images.nix +++ b/docker-images.nix @@ -24,8 +24,10 @@ let ${crane} auth login ${name} -u "${value.user}" -p "${value.password}" '') depot.ops.secrets.deployer.dockerRegistryAuth; in -pkgs.writeShellScript "push-images" '' +((pkgs.writeShellScript "push-images" '' ${lib.concatStringsSep "\n" authCommands} ${lib.concatStringsSep "\n" pushCommands} -'' +'') // { + images = images; +})