Skip to content

Commit e97e50b

Browse files
authored
Ensure zsh and oh-my-zsh are installed on both images (#530)
1 parent 451e940 commit e97e50b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

final/setup.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ chsh -s "$(which zsh)" root
113113
python3 -m pip install argcomplete
114114
activate-global-python-argcomplete
115115

116-
# Install oh-my-zsh
117-
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
118-
119116
# shellcheck disable=SC1091
120117
source "$DIR/setup-image.sh"
121118

tools/ee.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fi
6363
python -m build --outdir "$REPO_DIR/final/dist/" --wheel "$REPO_DIR"
6464
ansible-builder create -f execution-environment.yml --output-filename Containerfile -v3
6565
$BUILD_CMD -f context/Containerfile context/ --tag "${TAG_BASE}"
66-
cp tools/setup-image.sh final/
66+
ln -f tools/setup-image.sh final/
6767
$BUILD_CMD -f final/Containerfile final/ --tag "${IMAGE_NAME}"
6868

6969
# We save local image in order to import it inside the container later for c-in-c testing

tools/setup-image.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ OC_VERSION=4.15
99
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
1010
chmod +x /usr/local/bin/oc
1111
oc version --client=true
12+
13+
# Ensure that we have a ~/.zshrc file as otherwise zsh will start its first run
14+
# wizard which will cause the container to hang. This was seen as happening on
15+
# ubi9 image but not on fedora one.
16+
touch ~/.zshrc
17+
18+
# Install oh-my-zsh
19+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended

0 commit comments

Comments
 (0)