Commit 39c213ee authored by Raphael Defosseux's avatar Raphael Defosseux

fix(build): no test-builds on cpp-jwt

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent 9c5df62c
...@@ -275,41 +275,10 @@ install_cpp_jwt_from_git() { ...@@ -275,41 +275,10 @@ install_cpp_jwt_from_git() {
prompt='y' prompt='y'
OPTION="-y" OPTION="-y"
fi fi
if [ $2 -eq 0 ]; then
debug=0
else
debug=1
fi
if [[ $prompt =~ [yY](es)* ]] if [[ $prompt =~ [yY](es)* ]]
then then
if [[ $OS_DISTRO == "ubuntu" ]]; then
PACKAGE_LIST="\
libgtest-dev \
libssl-dev"
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
PACKAGE_LIST="\
gtest-devel \
openssl-devel"
else
echo_fatal "$OS_DISTRO is not a supported distribution."
fi
$SUDO $INSTALLER install $OPTION $PACKAGE_LIST
ret=$?;[[ $ret -ne 0 ]] && return $ret
#install libgtest
if [[ $OS_DISTRO == "ubuntu" ]]; then
echo "Building the gtest library"
pushd $OPENAIRCN_DIR/build/ext
cd /usr/src/gtest
$SUDO $CMAKE CMakeLists.txt
$SUDO make
$SUDO cp *.a /usr/lib
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
GIT_URL=https://github.com/arun11299/cpp-jwt.git GIT_URL=https://github.com/arun11299/cpp-jwt.git
echo "Install Cpp-jwt from $GIT_URL" echo "Install Cpp-jwt from $GIT_URL"
pushd $OPENAIRCN_DIR/build/ext pushd $OPENAIRCN_DIR/build/ext
...@@ -324,7 +293,9 @@ install_cpp_jwt_from_git() { ...@@ -324,7 +293,9 @@ install_cpp_jwt_from_git() {
cd cpp-jwt && git checkout -f v1.4 cd cpp-jwt && git checkout -f v1.4
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
mkdir _build && cd _build mkdir _build && cd _build
$CMAKE .. $CMAKE \
-DCPP_JWT_BUILD_TESTS=OFF \
-DCPP_JWT_BUILD_EXAMPLES=OFF ..
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
make make
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
...@@ -444,6 +415,7 @@ check_install_nrf_deps() { ...@@ -444,6 +415,7 @@ check_install_nrf_deps() {
python2 \ python2 \
pkgconfig \ pkgconfig \
ninja-build \ ninja-build \
boost-devel \
libasan" libasan"
else else
echo_fatal "$OS_DISTRO is not a supported distribution." echo_fatal "$OS_DISTRO is not a supported distribution."
......
...@@ -559,9 +559,9 @@ class HtmlReport(): ...@@ -559,9 +559,9 @@ class HtmlReport():
else: else:
cell_msg += ' ** Nlohmann Json Installation: KO\n' cell_msg += ' ** Nlohmann Json Installation: KO\n'
if base_image: if base_image:
cell_msg += ' ** nghttp2 Installation: N/A\n' cell_msg += ' ** nghttp2-asio Installation: N/A\n'
elif nghttp2_build_status: elif nghttp2_build_status:
cell_msg += ' ** nghttp2 Installation: OK\n' cell_msg += ' ** nghttp2-asio Installation: OK\n'
else: else:
cell_msg += ' ** nghttp2 Installation: KO\n' cell_msg += ' ** nghttp2 Installation: KO\n'
if base_image: if base_image:
...@@ -734,7 +734,7 @@ class HtmlReport(): ...@@ -734,7 +734,7 @@ class HtmlReport():
if status and noPbInLDD: if status and noPbInLDD:
cell_msg = ' <td bgcolor="LimeGreen"><pre style="border:none; background-color:LimeGreen"><b>' cell_msg = ' <td bgcolor="LimeGreen"><pre style="border:none; background-color:LimeGreen"><b>'
cell_msg += 'OK:\n' cell_msg += 'OK:\n'
elif noPbInLDD: elif not noPbInLDD:
cell_msg = ' <td bgcolor="Tomato"><pre style="border:none; background-color:Tomato"><b>' cell_msg = ' <td bgcolor="Tomato"><pre style="border:none; background-color:Tomato"><b>'
cell_msg += 'KO:\n' cell_msg += 'KO:\n'
cell_msg += ' Some libraries were not copied from builder image\n' cell_msg += ' Some libraries were not copied from builder image\n'
......
...@@ -63,6 +63,7 @@ COPY . /openair-nrf ...@@ -63,6 +63,7 @@ COPY . /openair-nrf
WORKDIR /openair-nrf/build/scripts WORKDIR /openair-nrf/build/scripts
RUN ./build_nrf --install-deps --force RUN ./build_nrf --install-deps --force
RUN ./build_nrf --clean --Verbose --build-type Release --jobs && \ RUN ./build_nrf --clean --Verbose --build-type Release --jobs && \
ldd /openair-nrf/build/nrf/build/nrf && \
mv /openair-nrf/build/nrf/build/nrf /openair-nrf/build/nrf/build/oai_nrf && \ mv /openair-nrf/build/nrf/build/nrf /openair-nrf/build/nrf/build/oai_nrf && \
rm /etc/pki/entitlement/*pem rm /etc/pki/entitlement/*pem
...@@ -92,9 +93,10 @@ WORKDIR /openair-nrf/bin ...@@ -92,9 +93,10 @@ WORKDIR /openair-nrf/bin
COPY --from=oai-nrf-builder \ COPY --from=oai-nrf-builder \
/openair-nrf/build/nrf/build/oai_nrf \ /openair-nrf/build/nrf/build/oai_nrf \
/openair-nrf/scripts/entrypoint.sh \ /openair-nrf/scripts/entrypoint.sh \
/openair-nrf/scripts/healthcheck.sh \
./ ./
COPY --from=oai-nrf-builder \ COPY --from=oai-nrf-builder \
# Copying only the packages built from source
/usr/local/lib64/libpistache.so.0 \ /usr/local/lib64/libpistache.so.0 \
/usr/local/lib/libnghttp2_asio.so \ /usr/local/lib/libnghttp2_asio.so \
/usr/local/lib/libnghttp2_asio.so.1 \ /usr/local/lib/libnghttp2_asio.so.1 \
...@@ -112,6 +114,11 @@ WORKDIR /openair-nrf ...@@ -112,6 +114,11 @@ WORKDIR /openair-nrf
# expose ports # expose ports
EXPOSE 80/tcp 9090/tcp EXPOSE 80/tcp 9090/tcp
# healthcheck
HEALTHCHECK --interval=10s \
--timeout=15s \
--retries=6 \
CMD /openair-nrf/bin/healthcheck.sh
ENTRYPOINT ["/openair-nrf/bin/entrypoint.sh"] ENTRYPOINT ["/openair-nrf/bin/entrypoint.sh"]
CMD ["/openair-nrf/bin/oai_nrf", "-c", "/openair-nrf/etc/nrf.conf", "-o"] CMD ["/openair-nrf/bin/oai_nrf", "-c", "/openair-nrf/etc/nrf.conf", "-o"]
...@@ -53,7 +53,7 @@ WORKDIR /openair-nrf ...@@ -53,7 +53,7 @@ WORKDIR /openair-nrf
# Installing all the needed libraries/packages to build and run NRF # Installing all the needed libraries/packages to build and run NRF
WORKDIR /openair-nrf/build/scripts WORKDIR /openair-nrf/build/scripts
RUN ./build_nrf --install-deps --force && \ RUN ./build_nrf --install-deps --force && \
cp -Rf /openair-f/build/ext /openair-nrf-ext-ref cp -Rf /openair-nrf/build/ext /openair-nrf-ext-ref
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# BUILDER IMAGE # BUILDER IMAGE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment