use git version of regclient for compressed tar support
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing

This commit is contained in:
Jeffrey C. Ollie 2023-08-28 19:28:34 -05:00
parent c5402555a4
commit d944f3e18e
Signed by: jeff
GPG key ID: 6F86035A6D97044E
2 changed files with 36 additions and 4 deletions

View file

@ -19,6 +19,38 @@
config.permittedInsecurePackages = [ config.permittedInsecurePackages = [
"nodejs-16.20.2" "nodejs-16.20.2"
]; ];
overlays = [
(
self: super: {
regclient =
let
pname = "regclient";
version = "0.5.1+";
src = pkgs.fetchFromGitHub {
owner = "regclient";
repo = "regclient";
rev = "72df49963a17092138854c5d9d7943deac1dde6b";
hash = "sha256-9k1VXtaHTF1GMIDs5qGzJkqPZa+ZKrWes+LakVKaQ38=";
};
vendorHash = "sha256-j+XidIgjJ5uw1d4OXRl3pjiW5Hvy7WqNM0KdVWMvWls=";
in
super.buildGoModule {
inherit pname version src vendorHash;
inherit (super.regclient) meta outputs postInstall;
ldflags = [
"-s"
"-w"
"-X main.VCSTag=v${version}"
];
};
# super.regclient.overrideAttrs (
# old: {
# inherit pname version src vendorHash;
# }
# );
}
)
];
}; };
lib = pkgs.lib; lib = pkgs.lib;
docker-client = pkgs.docker_24.override { docker-client = pkgs.docker_24.override {

View file

@ -125,11 +125,11 @@ def main [
regctl registry login $registry --user $auth.username --pass $auth.password regctl registry login $registry --user $auth.username --pass $auth.password
print "decompressing image: start" # print "decompressing image: start"
open $input | gzip --decompress | save --force --progress $"($input).tar" # open $input | gzip --decompress | save --force --progress $"($input).tar"
print "decompressing image: stop" # print "decompressing image: stop"
# let load_result = (do { regctl load --input $input } | complete) # let load_result = (do { regctl load --input $input } | complete)
# if $load_result.exit_code != 0 { # if $load_result.exit_code != 0 {
@ -144,7 +144,7 @@ def main [
if $item.index == 0 { if $item.index == 0 {
let new_image = $"($registry)/($repository):($item.item)" let new_image = $"($registry)/($repository):($item.item)"
print $"Pushing ($new_image)" print $"Pushing ($new_image)"
regctl image import $new_image $"($input).tar" regctl image import $new_image $input
# let tag_result = (do { regctl image import $new_image $"($input).tar" } | complete) # let tag_result = (do { regctl image import $new_image $"($input).tar" } | complete)
# if $tag_result.exit_code != 0 { # if $tag_result.exit_code != 0 {
# print $tag_result.stderr # print $tag_result.stderr