Skip to content

Commit

Permalink
ci: fix broken nightly (again)
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha committed Feb 2, 2025
1 parent 50d5bdc commit 1712a95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion test/convert.bats
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ EOF
@test "python" {
skip_slow_test
git clone https://github.com/docker-library/python.git
cd python/3.11/alpine3.19
cd python/3.11/alpine3.21
chmod -R a+rw .
stacker convert --docker-file Dockerfile --output-file stacker.yaml --substitute-file stacker-subs.yaml
stacker build -f stacker.yaml --substitute-file stacker-subs.yaml --substitute IMAGE=python
Expand Down
22 changes: 11 additions & 11 deletions test/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi

function give_user_ownership() {
if [ "$PRIVILEGE_LEVEL" = "priv" ]; then
return
fi
if [ -z "$SUDO_UID" ]; then
echo "PRIVILEGE_LEVEL=$PRIVILEGE_LEVEL but empty SUDO_USER"
exit 1
fi
chown -R "$SUDO_USER:$SUDO_USER" "$@"
}

function skip_if_no_unpriv_overlay {
local wdir=""
# use a workdir to ensure no side effects to the caller
Expand Down Expand Up @@ -80,17 +91,6 @@ function stacker_setup() {
chown -R $SUDO_USER:$SUDO_USER .
}

function give_user_ownership() {
if [ "$PRIVILEGE_LEVEL" = "priv" ]; then
return
fi
if [ -z "$SUDO_UID" ]; then
echo "PRIVILEGE_LEVEL=$PRIVILEGE_LEVEL but empty SUDO_USER"
exit 1
fi
chown -R "$SUDO_USER:$SUDO_USER" "$@"
}

function cleanup() {
cd "$ROOT_DIR/test"
umount_under "$TEST_TMPDIR"
Expand Down

0 comments on commit 1712a95

Please sign in to comment.