Skip to content

Commit

Permalink
Ensure zsh and oh-my-zsh are installed on both images
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jan 26, 2025
1 parent 451e940 commit 6808918
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 0 additions & 3 deletions final/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ chsh -s "$(which zsh)" root
python3 -m pip install argcomplete
activate-global-python-argcomplete

# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# shellcheck disable=SC1091
source "$DIR/setup-image.sh"

Expand Down
2 changes: 1 addition & 1 deletion tools/ee.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fi
python -m build --outdir "$REPO_DIR/final/dist/" --wheel "$REPO_DIR"
ansible-builder create -f execution-environment.yml --output-filename Containerfile -v3
$BUILD_CMD -f context/Containerfile context/ --tag "${TAG_BASE}"
cp tools/setup-image.sh final/
ln -f tools/setup-image.sh final/
$BUILD_CMD -f final/Containerfile final/ --tag "${IMAGE_NAME}"

# We save local image in order to import it inside the container later for c-in-c testing
Expand Down
8 changes: 8 additions & 0 deletions tools/setup-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ OC_VERSION=4.15
curl -s -L "https://mirror.openshift.com/pub/openshift-v4/$(arch)/clients/ocp/stable-${OC_VERSION}/openshift-client-linux.tar.gz" | tar -C /usr/local/bin -xz --no-same-owner
chmod +x /usr/local/bin/oc
oc version --client=true

# Ensure that we have a ~/.zshrc file as otherwise zsh will start its first run
# wizard which will cause the container to hang. This was seen as happening on
# ubi9 image but not on fedora one.
touch ~/.zshrc

# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended

0 comments on commit 6808918

Please sign in to comment.