提交 f07e6579 编写于 作者: L lifeng68

CI: fix CI update cmake version to 3.12.1

Signed-off-by: Nlifeng68 <lifeng68@huawei.com>
上级 7cc91efe
...@@ -24,15 +24,17 @@ ...@@ -24,15 +24,17 @@
FROM centos:7.6.1810 FROM centos:7.6.1810
MAINTAINER LiFeng <lifeng68@huawei.com> MAINTAINER LiFeng <lifeng68@huawei.com>
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf && \
echo "nameserver 8.8.4.4" >> /etc/resolv.conf && \
echo "search localdomain" >> /etc/resolv.conf
# Install dependency package # Install dependency package
RUN yum clean all && yum swap -y fakesystemd systemd && \ RUN yum clean all && yum makecache && yum install -y epel-release && yum swap -y fakesystemd systemd && \
yum install -y epel-release \
yum update -y && \ yum update -y && \
yum install -y automake \ yum install -y automake \
autoconf \ autoconf \
libtool \ libtool \
make \ make \
cmake \
which \ which \
gdb \ gdb \
strace \ strace \
...@@ -48,7 +50,6 @@ RUN yum clean all && yum swap -y fakesystemd systemd && \ ...@@ -48,7 +50,6 @@ RUN yum clean all && yum swap -y fakesystemd systemd && \
libseccomp-devel \ libseccomp-devel \
yajl-devel \ yajl-devel \
git \ git \
bridge-utils \
dnsmasq \ dnsmasq \
libcgroup \ libcgroup \
rsync \ rsync \
...@@ -65,9 +66,9 @@ RUN yum clean all && yum swap -y fakesystemd systemd && \ ...@@ -65,9 +66,9 @@ RUN yum clean all && yum swap -y fakesystemd systemd && \
cppcheck \ cppcheck \
python3 \ python3 \
python3-pip \ python3-pip \
python \
python-pip \
device-mapper-devel \ device-mapper-devel \
libarchive \
libarchive-devel \
libcurl-devel \ libcurl-devel \
zlib-devel \ zlib-devel \
glibc-headers \ glibc-headers \
...@@ -87,8 +88,6 @@ RUN yum clean all && yum swap -y fakesystemd systemd && \ ...@@ -87,8 +88,6 @@ RUN yum clean all && yum swap -y fakesystemd systemd && \
valgrind \ valgrind \
e2fsprogs e2fsprogs
RUN pip install xlrd
RUN yum clean all && \ RUN yum clean all && \
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; \ (cd /lib/systemd/system/sysinit.target.wants/; for i in *; \
do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
...@@ -109,6 +108,17 @@ RUN echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> / ...@@ -109,6 +108,17 @@ RUN echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> /
# disalbe sslverify # disalbe sslverify
RUN git config --global http.sslverify false RUN git config --global http.sslverify false
# install cmake
RUN set -x && \
cd ~ && \
git clone https://gitee.com/src-openeuler/cmake.git && \
cd cmake && \
git checkout origin/openEuler-20.03-LTS && \
tar -xzvf cmake-3.12.1.tar.gz && \
cd cmake-3.12.1 && \
./bootstrap && make -j && make install && \
ldconfig
# Centos has no protobuf, protobuf-devel, grpc, grpc-devel, grpc-plugin # Centos has no protobuf, protobuf-devel, grpc, grpc-devel, grpc-plugin
# and we should install them manually. # and we should install them manually.
# install protobuf # install protobuf
...@@ -170,10 +180,12 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ ...@@ -170,10 +180,12 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \
cd ~ && \ cd ~ && \
git clone https://gitee.com/src-openeuler/libevhtp.git && \ git clone https://gitee.com/src-openeuler/libevhtp.git && \
cd libevhtp && \ cd libevhtp && \
tar -xzvf libevhtp-1.2.16.tar.gz && \ tar -xzvf libevhtp-1.2.18.tar.gz && \
cd libevhtp-1.2.16 && \ cd libevhtp-1.2.18 && \
patch -p1 -F1 -s < ../0001-support-dynamic-threads.patch && \ patch -p1 -F1 -s < ../0001-decrease-numbers-of-fd-for-shared-pipe-mode.patch && \
patch -p1 -F1 -s < ../0002-close-openssl.patch && \ patch -p1 -F1 -s < ../0002-evhtp-enable-dynamic-thread-pool.patch && \
patch -p1 -F1 -s < ../0003-close-open-ssl.-we-do-NOT-use-it-in-lcrd.patch && \
patch -p1 -F1 -s < ../0004-Use-shared-library-instead-static-one.patch && \
rm -rf build && \ rm -rf build && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
......
...@@ -102,6 +102,7 @@ do ...@@ -102,6 +102,7 @@ do
done done
sed -i 's/fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO/fd == 0 || fd == 1 || fd == 2 || fd >= 1000/g' ./src/lxc/start.c sed -i 's/fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO/fd == 0 || fd == 1 || fd == 2 || fd >= 1000/g' ./src/lxc/start.c
sed -i '/unmount-namespace/d' ./lxc.spec.in sed -i '/unmount-namespace/d' ./lxc.spec.in
sed -i '/bridge-utils/d' ./lxc.spec.in
./autogen.sh ./autogen.sh
./configure --sysconfdir=/etc ./configure --sysconfdir=/etc
make rpm make rpm
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance fd # attributes: isulad inheritance fd
# concurrent: NO # concurrent: NO
# spend time: 40 # spend time: 15
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
# - iSulad licensed under the Mulan PSL v2. # - iSulad licensed under the Mulan PSL v2.
......
...@@ -2,16 +2,18 @@ ...@@ -2,16 +2,18 @@
# #
# attributes: isulad cri cni # attributes: isulad cri cni
# concurrent: NA # concurrent: NA
# spend time: 10 # spend time: 28
curr_path=$(dirname $(readlink -f "$0")) curr_path=$(dirname $(readlink -f "$0"))
data_path=$(realpath $curr_path/criconfigs) data_path=$(realpath $curr_path/criconfigs)
pause_img_path=$(realpath $curr_path/test_data)
source ../helpers.bash source ../helpers.bash
function do_pre() function do_pre()
{ {
systemctl stop firewalld.service
cp /etc/isulad/daemon.json /etc/isulad/daemon.bak cp /etc/isulad/daemon.json /etc/isulad/daemon.bak
sed -i "s#\"pod-sandbox-image\": \"\"#\"pod-sandbox-image\": \"rancher/pause-amd64:3.0\"#g" /etc/isulad/daemon.json sed -i "s#\"pod-sandbox-image\": \"\"#\"pod-sandbox-image\": \"mirrorgooglecontainers/pause-amd64:3.0\"#g" /etc/isulad/daemon.json
init_cni_conf $data_path init_cni_conf $data_path
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
...@@ -19,13 +21,20 @@ function do_pre() ...@@ -19,13 +21,20 @@ function do_pre()
TC_RET_T=$(($TC_RET_T+1)) TC_RET_T=$(($TC_RET_T+1))
return $TC_RET_T return $TC_RET_T
fi fi
isula load -i ${pause_img_path}/pause.tar
if [ $? -ne 0 ]; then
ERROR "Failed to load pause image"
TC_RET_T=$(($TC_RET_T+1))
return $TC_RET_T
fi
} }
function do_post() function do_post()
{ {
cp -f /etc/isulad/daemon.bak /etc/isulad/daemon.json cp -f /etc/isulad/daemon.bak /etc/isulad/daemon.json
stop_isulad_without_valgrind check_valgrind_log
start_isulad_without_valgrind start_isulad_with_valgrind
} }
function do_test_help() function do_test_help()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance create # attributes: isulad inheritance create
# concurrent: YES # concurrent: YES
# spend time: 8 # spend time: 6
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance start # attributes: isulad inheritance start
# concurrent: YES # concurrent: YES
# spend time: 11 # spend time: 2
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance import # attributes: isulad inheritance import
# concurrent: YES # concurrent: YES
# spend time: 14 # spend time: 3
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance ps list # attributes: isulad inheritance ps list
# concurrent: NO # concurrent: NO
# spend time: 14 # spend time: 13
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance restartpolicy # attributes: isulad inheritance restartpolicy
# concurrent: NO # concurrent: NO
# spend time: 25 # spend time: 24
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance rm # attributes: isulad inheritance rm
# concurrent: YES # concurrent: YES
# spend time: 14 # spend time: 13
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance run # attributes: isulad inheritance run
# concurrent: YES # concurrent: YES
# spend time: 12 # spend time: 3
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad share namepaces # attributes: isulad share namepaces
# concurrent: NO # concurrent: NO
# spend time: 6 # spend time: 21
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance stop # attributes: isulad inheritance stop
# concurrent: YES # concurrent: YES
# spend time: 24 # spend time: 29
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# attributes: isulad inheritance update # attributes: isulad inheritance update
# concurrent: YES # concurrent: YES
# spend time: 17 # spend time: 15
####################################################################### #######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved. ##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
...@@ -9,7 +9,6 @@ TC_RET_T=0 ...@@ -9,7 +9,6 @@ TC_RET_T=0
# image to pull and run container # image to pull and run container
BUSYBOX_IMAGE="busybox:latest" BUSYBOX_IMAGE="busybox:latest"
PAUSE_IMAGE="rancher/pause-amd64:3.0"
valgrind_log="/tmp/valgrind.log" valgrind_log="/tmp/valgrind.log"
ISUALD_LOG="/var/lib/isulad/isulad.log" ISUALD_LOG="/var/lib/isulad/isulad.log"
ISULAD_ROOT_DIR="/var/lib/isulad" ISULAD_ROOT_DIR="/var/lib/isulad"
...@@ -121,11 +120,6 @@ function start_isulad_with_valgrind() { ...@@ -121,11 +120,6 @@ function start_isulad_with_valgrind() {
wait_isulad_running wait_isulad_running
} }
function start_isulad_without_valgrind() {
isulad $@ -l DEBUG >/dev/null 2>&1 &
wait_isulad_running
}
function check_isulad_stopped() { function check_isulad_stopped() {
maxtimes=15 maxtimes=15
curcnt=0 curcnt=0
...@@ -143,17 +137,6 @@ function check_isulad_stopped() { ...@@ -143,17 +137,6 @@ function check_isulad_stopped() {
return 1 return 1
} }
function stop_isulad_without_valgrind() {
pid=`cat /var/run/isulad.pid`
kill -15 $pid
check_isulad_stopped $pid
if [ $? -ne 0 ];then
echo "iSulad process is still alive"
return 1
fi
return 0
}
function check_valgrind_log() { function check_valgrind_log() {
pid=`cat /var/run/isulad.pid` pid=`cat /var/run/isulad.pid`
kill -15 $pid kill -15 $pid
...@@ -233,13 +216,13 @@ function init_cni_conf() ...@@ -233,13 +216,13 @@ function init_cni_conf()
cp $dtpath/bins/isulad-cni /opt/cni/bin cp $dtpath/bins/isulad-cni /opt/cni/bin
cp $dtpath/good.conflist /etc/cni/net.d/ cp $dtpath/good.conflist /etc/cni/net.d/
stop_isulad_without_valgrind check_valgrind_log
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "stop isulad failed" echo "stop isulad failed"
TC_RET_T=$(($TC_RET_T+1)) TC_RET_T=$(($TC_RET_T+1))
fi fi
start_isulad_without_valgrind --network-plugin cni start_isulad_with_valgrind --network-plugin cni
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "start failed" echo "start failed"
TC_RET_T=$(($TC_RET_T+1)) TC_RET_T=$(($TC_RET_T+1))
...@@ -260,25 +243,3 @@ function wait_container_state() ...@@ -260,25 +243,3 @@ function wait_container_state()
done done
} }
function pull_images() {
isula inspect $BUSYBOX_IMAGE > /dev/null
if [ $? -ne 0 ]; then
isula pull $BUSYBOX_IMAGE
if [ $? -ne 0 ]; then
echo "failed pull busybox image"
TC_RET_T=$(($TC_RET_T+1))
fi
fi
isula inspect $PAUSE_IMAGE > /dev/null
if [ $? -ne 0 ]; then
isula pull $PAUSE_IMAGE
if [ $? -ne 0 ]; then
echo "failed pull pause image"
TC_RET_T=$(($TC_RET_T+1))
fi
fi
return $TC_RET_T
}
pull_images
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册