Remove Docker push.

As part of #4, I'm removing all of the OpenShift-ness. While I do that, let's keep Twitterchiver as is.
This commit is contained in:
Luke Granger-Brown 2021-03-30 21:28:43 +01:00
parent 4ab9e1b19e
commit e3b60baa72
3 changed files with 1 additions and 45 deletions

View file

@ -10,8 +10,6 @@ let
ciMachines = prefixAttrs "machine" depot.ops.nixos.systems;
ciPackages = prefixAttrs "pkg" (builtins.removeAttrs depot.nix.pkgs [ "grafana-plugins" "windows" ]);
ciGrafanaPlugins = prefixAttrs "pkg-grafana-plugins" depot.nix.pkgs.grafana-plugins;
#ciWindows = prefixAttrs "pkg-windows" depot.nix.pkgs.windows;
ciDocker = prefixAttrs "docker" ((import ./docker-images.nix).images);
ciWeb = prefixAttrs "web" depot.web;
ciOther = prefixAttrs "other" {
@ -21,4 +19,4 @@ let
systemPathJSON = depot.ops.nixos.systemPathJSON;
};
in
pkgs.linkFarm "ci" (ciMachines ++ ciPackages ++ ciGrafanaPlugins ++ ciDocker ++ ciWeb ++ ciOther)
pkgs.linkFarm "ci" (ciMachines ++ ciPackages ++ ciGrafanaPlugins ++ ciWeb ++ ciOther)

View file

@ -1,35 +0,0 @@
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
let
depot = (import ./default.nix {});
pkgs = depot.third_party.nixpkgs;
lib = pkgs.lib;
images = {
"registry.apps.k8s.lukegb.tech/twitterchiver/archiver:latest" = depot.go.twitterchiver.archiver.dockerImage;
"registry.apps.k8s.lukegb.tech/twitterchiver/viewer:latest" = depot.go.twitterchiver.viewer.dockerImage;
"registry.apps.k8s.lukegb.tech/twitterchiver/relatedfetcher:latest" = depot.go.twitterchiver.relatedfetcher.dockerImage;
"registry.apps.k8s.lukegb.tech/lukegb-openshiftauth-test/example:latest" = depot.go.openshiftauth.example.dockerImage;
"registry.apps.k8s.lukegb.tech/depotcron/update_nixpkgs:latest" = depot.ops.maint.update_nixpkgs;
};
baseName = p: builtins.elemAt (builtins.match "^[a-z0-9]+-([^.]+).*$" (baseNameOf p)) 0;
crane = "${depot.nix.pkgs.crane}/bin/crane";
pushCommands = lib.mapAttrsToList (name: value: ''
${pkgs.gzip}/bin/gunzip -c ${value} > /tmp/push.tar
${crane} push /tmp/push.tar ${name}
'') images;
authCommands = lib.mapAttrsToList (name: value: ''
${crane} auth login ${name} -u "${value.user}" -p "${value.password}"
'') depot.ops.secrets.deployer.dockerRegistryAuth;
in
((pkgs.writeShellScript "push-images" ''
${lib.concatStringsSep "\n" authCommands}
${lib.concatStringsSep "\n" pushCommands}
'') // {
images = images;
})

View file

@ -22,13 +22,6 @@ let
};
tags = [ "cacher" ];
};
docker-push = {
stage = "deploy";
# This requires a sizable amount of temporary disk, so we run it on cacher instead.
tags = [ "cacher" ];
script = "./hack/dockerpush.sh";
};
} // (lib.mapAttrs deployStage deployMachs);
deployMachs = lib.filterAttrs (name: cfg: cfg.config.my.deploy.enable) depot.ops.nixos.systemConfigs;