Skip to content

Commit 9ffedf5

Browse files
committed
fix: Handle login for skopeo during rechunk flow
1 parent 4b15468 commit 9ffedf5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Earthfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ SAVE_IMAGE:
303303
END
304304
ELSE
305305
ARG EARTHLY_GIT_BRANCH
306-
SAVE IMAGE --push "${IMAGE}:${EARTHLY_GIT_BRANCH}${SUFFIX}"
306+
ARG IMAGE_TAG="$(echo "${EARTHLY_GIT_BRANCH}" | sed 's|/|_|g')"
307+
SAVE IMAGE --push "${IMAGE}:${IMAGE_TAG}${SUFFIX}"
307308
END
308309
ARG EARTHLY_GIT_HASH
309310
SAVE IMAGE --push "${IMAGE}:${EARTHLY_GIT_HASH}${SUFFIX}"

process/drivers/skopeo_driver.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::{process::Stdio, time::Duration};
22

3-
use blue_build_utils::constants::SUDO_ASKPASS;
43
use cached::proc_macro::cached;
54
use colored::Colorize;
65
use comlexr::cmd;
@@ -77,7 +76,7 @@ impl super::OciCopy for SkopeoDriver {
7776
} else {
7877
"skopeo"
7978
},
80-
if use_sudo && blue_build_utils::has_env_var(SUDO_ASKPASS) => [
79+
if use_sudo && blue_build_utils::has_env_var(blue_build_utils::constants::SUDO_ASKPASS) => [
8180
"-A",
8281
"-p",
8382
format!(

process/drivers/traits.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ pub trait RechunkDriver: RunDriver + BuildDriver + ContainerMountDriver {
287287
))
288288
.into_diagnostic()?;
289289

290+
Self::login()?;
291+
290292
Self::build(
291293
&BuildOpts::builder()
292294
.image(raw_image.to_string())

0 commit comments

Comments
 (0)