Skip to content

Commit

Permalink
Fix Dockerfiles with symlinks and fix nodejs-18 test suite
Browse files Browse the repository at this point in the history
Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek committed Aug 13, 2024
1 parent 53172ce commit 0e3cd0a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
5 changes: 4 additions & 1 deletion 22-minimal/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ LABEL summary="$SUMMARY" \
RUN INSTALL_PKGS="nodejs$NODEJS_VERSION nodejs-nodemon nodejs$NODEJS_VERSION-full-i18n nodejs$NODEJS_VERSION-npm findutils tar which nss_wrapper-libs" && \
microdnf -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
microdnf clean all && \
node-22 -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
rm /usr/bin/node && ln -s /usr/bin/node-$NODEJS_VERSION /usr/bin/node && \
ln -s /usr/bin/npm-$NODEJS_VERSION /usr/bin/npm && \
rm /usr/bin/npx && ln -s /usr/bin/npx-$NODEJS_VERSION /usr/bin/npx && \
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*

#
Expand Down
7 changes: 5 additions & 2 deletions 22/Dockerfile.c10s
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@ LABEL summary="$SUMMARY" \
usage="s2i build <SOURCE-REPOSITORY> quay.io/sclorg/$NAME-$NODEJS_VERSION-c10s:latest <APP-NAME>"

# Package libatomic_ops was removed
RUN INSTALL_PKGS="make gcc gcc-c++ libatomic_ops git openssl-devel nodejs$NODEJS_VERSION nodejs-nodemon nodejs$NODEJS_VERSION-npm nss_wrapper-libs which" && \
RUN INSTALL_PKGS="make gcc gcc-c++ git openssl-devel nodejs$NODEJS_VERSION nodejs-nodemon nodejs$NODEJS_VERSION-npm nss_wrapper-libs which" && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
node-22 -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
rm /usr/bin/node && ln -s /usr/bin/node-$NODEJS_VERSION /usr/bin/node && \
rm /usr/bin/npm && ln -s /usr/bin/npm-$NODEJS_VERSION /usr/bin/npm && \
rm /usr/bin/npx && ln -s /usr/bin/npx-$NODEJS_VERSION /usr/bin/npx && \
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
dnf -y clean all --enablerepo='*'

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
Expand Down
5 changes: 4 additions & 1 deletion 22/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ LABEL summary="$SUMMARY" \
RUN INSTALL_PKGS="make gcc gcc-c++ libatomic_ops git openssl-devel nodejs$NODEJS_VERSION nodejs-nodemon nodejs$NODEJS_VERSION-npm nss_wrapper-libs which" && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
node-22 -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
rm /usr/bin/node && ln -s /usr/bin/node-$NODEJS_VERSION /usr/bin/node && \
rm /usr/bin/npm && ln -s /usr/bin/npm-$NODEJS_VERSION /usr/bin/npm && \
rm /usr/bin/npx && ln -s /usr/bin/npx-$NODEJS_VERSION /usr/bin/npx && \
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
dnf -y clean all --enablerepo='*'

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
Expand Down
12 changes: 11 additions & 1 deletion test/run
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,14 @@ ct_check_testcase_result $?

TEST_SET=${TESTS:-$TEST_LIST_HW} ct_run_tests_from_testset "hw"

TEST_SET=${TESTS:-$TEST_LIST_BINARY} ct_run_tests_from_testset "binary"
if [[ "$VERSION" != "18" ]]; then
# This test is not available for NodeJS-18
# There is a traceback in NodeJS. It reached EOL support.
#npm ERR! gyp ERR! System Linux 6.9.12-200.fc40.x86_64
#npm ERR! gyp ERR! command "/usr/bin/node-18" "/usr/lib/node_modules_18/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#npm ERR! gyp ERR! cwd /opt/app-root/src/node_modules/node-rdkafka
#npm ERR! gyp ERR! node -v v18.19.0
#npm ERR! gyp ERR! node-gyp -v v10.0.1
#npm ERR! gyp ERR! not ok
TEST_SET=${TESTS:-$TEST_LIST_BINARY} ct_run_tests_from_testset "binary"
fi

0 comments on commit 0e3cd0a

Please sign in to comment.