提交 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 @@
FROM centos:7.6.1810
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
RUN yum clean all && yum swap -y fakesystemd systemd && \
yum install -y epel-release \
RUN yum clean all && yum makecache && yum install -y epel-release && yum swap -y fakesystemd systemd && \
yum update -y && \
yum install -y automake \
autoconf \
libtool \
make \
cmake \
which \
gdb \
strace \
......@@ -48,7 +50,6 @@ RUN yum clean all && yum swap -y fakesystemd systemd && \
libseccomp-devel \
yajl-devel \
git \
bridge-utils \
dnsmasq \
libcgroup \
rsync \
......@@ -65,9 +66,9 @@ RUN yum clean all && yum swap -y fakesystemd systemd && \
cppcheck \
python3 \
python3-pip \
python \
python-pip \
device-mapper-devel \
libarchive \
libarchive-devel \
libcurl-devel \
zlib-devel \
glibc-headers \
......@@ -87,8 +88,6 @@ RUN yum clean all && yum swap -y fakesystemd systemd && \
valgrind \
e2fsprogs
RUN pip install xlrd
RUN yum clean all && \
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; \
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" >> /
# disalbe sslverify
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
# and we should install them manually.
# install protobuf
......@@ -170,10 +180,12 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \
cd ~ && \
git clone https://gitee.com/src-openeuler/libevhtp.git && \
cd libevhtp && \
tar -xzvf libevhtp-1.2.16.tar.gz && \
cd libevhtp-1.2.16 && \
patch -p1 -F1 -s < ../0001-support-dynamic-threads.patch && \
patch -p1 -F1 -s < ../0002-close-openssl.patch && \
tar -xzvf libevhtp-1.2.18.tar.gz && \
cd libevhtp-1.2.18 && \
patch -p1 -F1 -s < ../0001-decrease-numbers-of-fd-for-shared-pipe-mode.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 && \
mkdir build && \
cd build && \
......
......@@ -102,6 +102,7 @@ do
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 '/unmount-namespace/d' ./lxc.spec.in
sed -i '/bridge-utils/d' ./lxc.spec.in
./autogen.sh
./configure --sysconfdir=/etc
make rpm
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance fd
# concurrent: NO
# spend time: 40
# spend time: 15
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
# - iSulad licensed under the Mulan PSL v2.
......
......@@ -2,16 +2,18 @@
#
# attributes: isulad cri cni
# concurrent: NA
# spend time: 10
# spend time: 28
curr_path=$(dirname $(readlink -f "$0"))
data_path=$(realpath $curr_path/criconfigs)
pause_img_path=$(realpath $curr_path/test_data)
source ../helpers.bash
function do_pre()
{
systemctl stop firewalld.service
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
if [ $? -ne 0 ]; then
......@@ -19,13 +21,20 @@ function do_pre()
TC_RET_T=$(($TC_RET_T+1))
return $TC_RET_T
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()
{
cp -f /etc/isulad/daemon.bak /etc/isulad/daemon.json
stop_isulad_without_valgrind
start_isulad_without_valgrind
check_valgrind_log
start_isulad_with_valgrind
}
function do_test_help()
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance create
# concurrent: YES
# spend time: 8
# spend time: 6
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance start
# concurrent: YES
# spend time: 11
# spend time: 2
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance import
# concurrent: YES
# spend time: 14
# spend time: 3
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance ps list
# concurrent: NO
# spend time: 14
# spend time: 13
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance restartpolicy
# concurrent: NO
# spend time: 25
# spend time: 24
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance rm
# concurrent: YES
# spend time: 14
# spend time: 13
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance run
# concurrent: YES
# spend time: 12
# spend time: 3
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad share namepaces
# concurrent: NO
# spend time: 6
# spend time: 21
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance stop
# concurrent: YES
# spend time: 24
# spend time: 29
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -2,7 +2,7 @@
#
# attributes: isulad inheritance update
# concurrent: YES
# spend time: 17
# spend time: 15
#######################################################################
##- @Copyright (C) Huawei Technologies., Ltd. 2020. All rights reserved.
......
......@@ -9,7 +9,6 @@ TC_RET_T=0
# image to pull and run container
BUSYBOX_IMAGE="busybox:latest"
PAUSE_IMAGE="rancher/pause-amd64:3.0"
valgrind_log="/tmp/valgrind.log"
ISUALD_LOG="/var/lib/isulad/isulad.log"
ISULAD_ROOT_DIR="/var/lib/isulad"
......@@ -121,11 +120,6 @@ function start_isulad_with_valgrind() {
wait_isulad_running
}
function start_isulad_without_valgrind() {
isulad $@ -l DEBUG >/dev/null 2>&1 &
wait_isulad_running
}
function check_isulad_stopped() {
maxtimes=15
curcnt=0
......@@ -143,17 +137,6 @@ function check_isulad_stopped() {
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() {
pid=`cat /var/run/isulad.pid`
kill -15 $pid
......@@ -233,13 +216,13 @@ function init_cni_conf()
cp $dtpath/bins/isulad-cni /opt/cni/bin
cp $dtpath/good.conflist /etc/cni/net.d/
stop_isulad_without_valgrind
check_valgrind_log
if [ $? -ne 0 ]; then
echo "stop isulad failed"
TC_RET_T=$(($TC_RET_T+1))
fi
start_isulad_without_valgrind --network-plugin cni
start_isulad_with_valgrind --network-plugin cni
if [ $? -ne 0 ]; then
echo "start failed"
TC_RET_T=$(($TC_RET_T+1))
......@@ -260,25 +243,3 @@ function wait_container_state()
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.
先完成此消息的编辑!
想要评论请 注册