2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Merge pull request #5823 from robin2008/travic-xenial

upgrade to travis xenial env
This commit is contained in:
Yuan Bai 2018-11-21 12:51:19 +08:00 committed by GitHub
commit 3b77b96e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 24 deletions

View File

@ -1,10 +1,10 @@
os: linux
dist: trusty
dist: xenial
sudo: required
before_install:
- sudo apt-get install -y git reprepro devscripts debhelper libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common
- sudo apt-get install -y git fakeroot reprepro devscripts debhelper libcapture-tiny-perl libjson-perl libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common
- perl -v
- echo "yes" | sudo cpan -f -i Capture::Tiny
#- echo "yes" | sudo cpan -f -i Capture::Tiny
script:
- echo $TRAVIS_BUILD_ID

View File

@ -271,19 +271,19 @@ sub send_back_comment{
#--------------------------------------------------------
sub build_xcat_core{
my @output;
my @cmds = ("gpg --list-keys",
"sed -i '/SignWith: /d' $ENV{'PWD'}/build-ubunturepo");
foreach my $cmd (@cmds){
print "[build_xcat_core] running $cmd\n";
@output = runcmd("$cmd");
if($::RUNCMD_RC){
print "[build_xcat_core] $cmd ....[Failed]\n";
send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information");
return 1;
}
}
#my @cmds = ("gpg --list-keys",
# "sed -i '/SignWith: /d' $ENV{'PWD'}/build-ubunturepo");
#foreach my $cmd (@cmds){
# print "[build_xcat_core] running $cmd\n";
# @output = runcmd("$cmd");
# if($::RUNCMD_RC){
# print "[build_xcat_core] $cmd ....[Failed]\n";
# send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information");
# return 1;
# }
#}
my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1";
my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1 GPGSIGN=0";
@output = runcmd("$cmd");
print ">>>>>Dumper the output of '$cmd'\n";
print Dumper \@output;
@ -321,8 +321,8 @@ sub install_xcat{
my @cmds = ("cd ./../../xcat-core && sudo ./mklocalrepo.sh",
"sudo chmod 777 /etc/apt/sources.list",
"sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list",
"sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list",
"sudo echo \"deb [arch=amd64 allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list",
"sudo echo \"deb [arch=ppc64el allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list",
"sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -",
"sudo apt-get -qq update");
my @output;
@ -488,7 +488,6 @@ sub run_fast_regression_test{
@output = runcmd("cat $conf_file");
print Dumper \@output;
# $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -s \"mn_only-wait_fix\" -l'";
# my @caseslist = runcmd("$cmd");
# if($::RUNCMD_RC){
@ -613,6 +612,17 @@ my @disk = runcmd("df -h");
print "Disk information:\n";
print Dumper \@disk;
# Hacking the netmask. Not sure if we need to recover it after finish xcattest
# Note: Here has an assumption from Travis VM: only 1 UP Ethernet interface available (CHANGEME if it not as is)
my @intfinfo = runcmd("ip -o link |grep 'link/ether'|grep 'state UP' |awk -F ':' '{print \$2}'|head -1");
foreach my $nic (@intfinfo) {
print "Hacking the netmask length to 16 if it is 32: $nic\n";
runcmd("ip -4 addr show $nic|grep 'inet'|grep -q '/32' && sudo ip addr add \$(hostname -I|awk '{print \$1}')/16 dev $nic");
}
my @ipinfo = runcmd("ip addr");
print "Networking information:\n";
print Dumper \@ipinfo;
#Start to check the format of pull request
$last_func_start = timelocal(localtime());
print GREEN "\n------ Checking Pull Request Format ------\n";

View File

@ -759,7 +759,7 @@ sub configSwitch {
my $table = xCAT::Table->new('switches', -create => 0);
if ($table) {
my @tmp1 = $table->getAllAttribs(('switch'));
if (defined(@tmp1) && (@tmp1 > 0)) {
if (scalar @tmp1 > 0) {
foreach (@tmp1) {
my @switches_tmp = noderange($_->{switch});
if (@switches_tmp == 0) { push @switches_tmp, $_->{switch}; }
@ -1360,7 +1360,7 @@ sub getNodesMonServers
my $table = xCAT::Table->new('switches', -create => 0);
if ($table) {
my @tmp1 = $table->getAllAttribs(('switch'));
if (defined(@tmp1) && (@tmp1 > 0)) {
if (scalar @tmp1 > 0) {
foreach (@tmp1) {
my @switches_tmp = noderange($_->{switch});
if (@switches_tmp == 0) { push @switches_tmp, $_->{switch}; }

View File

@ -58,9 +58,9 @@ lsxcatd_a
lsxcatd_d
lsxcatd_h
lsxcatd_null
makeconservercf_d
makeconservercf_noderange
makeconservercf_null
#makeconservercf_d
#makeconservercf_noderange
#makeconservercf_null
#makedhcp_a_d_linux
#makedhcp_a_linux
#makedhcp_d_linux

View File

@ -5,7 +5,7 @@ label:mn_only,ci_test,dhcp
cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi
cmd:makedhcp -n
check:rc==0
cmd:ls /etc/dhcp/dhcpd.conf || ls /etc/dhcpd.conf
cmd:cat $(ls /etc/dhcp/dhcpd.conf || ls /etc/dhcpd.conf)
check:rc==0
cmd:sleep 20
cmd:ps -e | grep dhcpd