cleanup and remove debug
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Jeffrey C. Ollie 2023-04-16 01:14:30 -05:00
parent b86e724a62
commit bef4a0aabf
Signed by: jeff
GPG key ID: 6F86035A6D97044E
2 changed files with 7 additions and 16 deletions

View file

@ -156,8 +156,8 @@
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
experimental-features = [
"nix-command"
"flakes"
"nix-command"
];
};

View file

@ -7,8 +7,6 @@ def main [
--no-drone-tag # Don't add tag calculated from DRONE_BUILD_NUMBER and DRONE_COMMIT_SHA
--no-github-tag # Don't add tag calculated from GItHUB_RUN_NUMBER and GITHUB_SHA
] {
env
if not ($input | path exists) {
print $"($input) does not exist!"
exit 1
@ -50,8 +48,6 @@ def main [
$tags
}
print $tags
let auth = {username: null, password: null}
let auth = (
@ -73,8 +69,6 @@ def main [
}
)
print $auth
let registry = (
if ($registry | is-empty) {
if not ($env | get -i PLUGIN_REGISTRY | is-empty) {
@ -101,25 +95,21 @@ def main [
}
)
alias podman = ^podman --log-level error --cgroup-manager=cgroupfs
alias podman = ^podman --log-level error
print "AAA"
$auth.password | podman login --username $auth.username --password-stdin $registry
print "BBB"
let load_result = (do {podman load --input $input} | complete)
let load_result = (do { podman load --input $input } | complete)
if $load_result.exit_code != 0 {
print $load_result.stderr
exit 1
}
print "CCC"
let old_image = ($load_result.stdout | str trim | parse "Loaded image: {image}" | get 0.image)
print $old_image
podman images
$tags | each {
|tag|
let new_image = $"($registry)/($repository):($tag)"
print $new_image
let tag_result = (do { podman tag $old_image $new_image } | complete)
if $tag_result.exit_code != 0 {
print $tag_result.stderr
@ -130,7 +120,8 @@ def main [
print $push_result.stderr
exit 1
}
print $"Pushed $(new_image)"
}
podman images
podman logout $registry
}