You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Update primary test environment (Vagrant and Docker) to Ubuntu 18.04.
This commit is contained in:
@@ -101,7 +101,8 @@ sub process
|
||||
"before_install:\n" .
|
||||
" - sudo apt-get -qq update && sudo apt-get install libxml-checker-perl libdbd-pg-perl libperl-critic-perl" .
|
||||
" libtemplate-perl libpod-coverage-perl libtest-differences-perl libhtml-parser-perl lintian debhelper txt2man" .
|
||||
" devscripts libjson-perl libio-socket-ssl-perl libxml-libxml-perl libyaml-libyaml-perl python-pip lcov\n" .
|
||||
" devscripts libjson-perl libio-socket-ssl-perl libxml-libxml-perl libyaml-libyaml-perl python-pip lcov" .
|
||||
" libjson-maybexs-perl\n" .
|
||||
" - |\n" .
|
||||
" # Install & Configure AWS CLI\n" .
|
||||
" pip install --upgrade --user awscli\n" .
|
||||
@@ -113,6 +114,7 @@ sub process
|
||||
" - |\n" .
|
||||
" # Install Devel::Cover\n" .
|
||||
" sudo dpkg -i \${TRAVIS_BUILD_DIR?}/test/package/u14-" . packageDevelCover(VM_ARCH_AMD64) . "\n" .
|
||||
" sudo apt-get -f install\n" .
|
||||
' ' . LIB_COVER_EXE . " -v\n" .
|
||||
"\n" .
|
||||
"install:\n" .
|
||||
|
||||
@@ -48,7 +48,7 @@ use constant BACKREST_USER_ID => getpwnam(
|
||||
####################################################################################################################################
|
||||
# Package constants
|
||||
####################################################################################################################################
|
||||
use constant LIB_COVER_VERSION => '1.23-2';
|
||||
use constant LIB_COVER_VERSION => '1.29-2';
|
||||
push @EXPORT, qw(LIB_COVER_VERSION);
|
||||
use constant LIB_COVER_EXE => '/usr/bin/cover';
|
||||
push @EXPORT, qw(LIB_COVER_EXE);
|
||||
@@ -214,7 +214,8 @@ sub certSetup
|
||||
" openssl req -new -key server.key -out server.csr \\\n" .
|
||||
" -subj \"/C=US/ST=Country/L=City/O=Organization/CN=*.pgbackrest.org\" && \\\n" .
|
||||
" openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 99999 \\\n" .
|
||||
" -sha256";
|
||||
" -sha256 && \\\n" .
|
||||
" chmod 644 /etc/fake-cert/*";
|
||||
}
|
||||
|
||||
####################################################################################################################################
|
||||
@@ -241,6 +242,11 @@ sub s3ServerSetup
|
||||
" wget -O /root/nodejs.sh https://deb.nodesource.com/setup_6.x && \\\n" .
|
||||
" bash /root/nodejs.sh && \\\n" .
|
||||
" apt-get install -y nodejs";
|
||||
|
||||
if ($strOS eq VM_U18)
|
||||
{
|
||||
$strScript .= ' npm';
|
||||
}
|
||||
}
|
||||
|
||||
# Install Scality S3
|
||||
@@ -348,21 +354,22 @@ sub containerBuild
|
||||
else
|
||||
{
|
||||
$strScript .=
|
||||
" export DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_FRONTEND=noninteractive && \\\n" .
|
||||
" apt-get update && \\\n" .
|
||||
" apt-get -y install wget python && \\\n" .
|
||||
" wget --no-check-certificate -O /root/get-pip.py https://bootstrap.pypa.io/get-pip.py && \\\n" .
|
||||
" python /root/get-pip.py && \\\n" .
|
||||
" apt-get -y install openssh-server wget sudo python-pip build-essential valgrind git \\\n" .
|
||||
" libdbd-pg-perl libhtml-parser-perl libio-socket-ssl-perl libxml-libxml-perl libssl-dev libperl-dev \\\n" .
|
||||
" libyaml-libyaml-perl";
|
||||
" libyaml-libyaml-perl tzdata";
|
||||
|
||||
if ($strOS eq VM_U12)
|
||||
{
|
||||
$strScript .= ' libperl5.14';
|
||||
}
|
||||
elsif ($strOS eq VM_U16)
|
||||
elsif ($strOS eq VM_U18)
|
||||
{
|
||||
$strScript .= ' clang-5.0 lcov';
|
||||
$strScript .= ' clang-6.0 clang-tools-6.0 lcov';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,12 +476,15 @@ sub containerBuild
|
||||
$$oVm{$strOS}{&VM_OS_REPO} . '-pgdg main' . ($strOS ne VM_U12 ? ' 11' : '') .
|
||||
"' >> /etc/apt/sources.list.d/pgdg.list && \\\n" .
|
||||
" wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \\\n" .
|
||||
" apt-get update";
|
||||
" apt-get update && \\\n" .
|
||||
" apt-get install -y postgresql-common && \\\n" .
|
||||
" sed -i 's/^\\#create\\_main\\_cluster.*\$/create\\_main\\_cluster \\= false/' " .
|
||||
"/etc/postgresql-common/createcluster.conf";
|
||||
}
|
||||
|
||||
if (defined($oOS->{&VM_DB}) && @{$oOS->{&VM_DB}} > 0)
|
||||
{
|
||||
$strScript .= sectionHeader() .
|
||||
$strScript .= sectionHeader() .
|
||||
"# Install Postgresql\n";
|
||||
|
||||
if ($$oVm{$strOS}{&VM_OS_BASE} eq VM_OS_BASE_RHEL)
|
||||
@@ -487,8 +497,6 @@ sub containerBuild
|
||||
}
|
||||
|
||||
# Construct list of databases to install
|
||||
my $strRunAfterInstall;
|
||||
|
||||
foreach my $strDbVersion (@{$oOS->{&VM_DB}})
|
||||
{
|
||||
if ($$oVm{$strOS}{&VM_OS_BASE} eq VM_OS_BASE_RHEL)
|
||||
@@ -501,17 +509,8 @@ sub containerBuild
|
||||
else
|
||||
{
|
||||
$strScript .= " postgresql-${strDbVersion}";
|
||||
|
||||
$strRunAfterInstall .= (defined($strRunAfterInstall) ? " && \\\n" : '') .
|
||||
" pg_dropcluster --stop ${strDbVersion} main";
|
||||
}
|
||||
}
|
||||
|
||||
# If there are commands to run after install
|
||||
if (defined($strRunAfterInstall))
|
||||
{
|
||||
$strScript .= " && \\\n" . $strRunAfterInstall;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -632,15 +631,15 @@ sub containerBuild
|
||||
}
|
||||
else
|
||||
{
|
||||
$strImageParent = $oVm->{&VM_U16}{&VM_IMAGE};
|
||||
$strImageParent = $oVm->{&VM_U18}{&VM_IMAGE};
|
||||
|
||||
$strScript = sectionHeader() .
|
||||
"# Install required packages\n" .
|
||||
" apt-get update && \\\n" .
|
||||
" apt-get install -y wget git";
|
||||
" apt-get install -y wget git gnupg";
|
||||
|
||||
$strScript .= certSetup();
|
||||
$strScript .= s3ServerSetup(VM_U16);
|
||||
$strScript .= s3ServerSetup(VM_U18);
|
||||
|
||||
$strScript .= sectionHeader() .
|
||||
"# Fix root tty\n" .
|
||||
@@ -670,6 +669,10 @@ sub containerBuild
|
||||
"COPY ${strOS}-${strPkgDevelCover} /tmp/${strPkgDevelCover}";
|
||||
|
||||
$strScript = sectionHeader() .
|
||||
"# Install packages\n" .
|
||||
" apt-get install -y libjson-maybexs-perl";
|
||||
|
||||
$strScript .= sectionHeader() .
|
||||
"# Install Devel::Cover\n" .
|
||||
" dpkg -i /tmp/${strPkgDevelCover}";
|
||||
}
|
||||
|
||||
@@ -357,7 +357,8 @@ sub run
|
||||
"CC=gcc\n" .
|
||||
"CFLAGS=-I. -std=c99 -fPIC -g" . ($self->{bProfile} ? " -pg" : '') . "\\\n" .
|
||||
" -Werror -Wfatal-errors -Wall -Wextra -Wwrite-strings -Wno-clobbered -Wswitch-enum -Wconversion \\\n" .
|
||||
($self->{oTest}->{&TEST_VM} eq VM_U16 ? " -Wformat-signedness \\\n" : '') .
|
||||
($self->{oTest}->{&TEST_VM} eq VM_U16 || $self->{oTest}->{&TEST_VM} eq VM_U18 ?
|
||||
" -Wformat-signedness \\\n" : '') .
|
||||
# This warning appears to be broken on U12 even though the functionality is fine
|
||||
($self->{oTest}->{&TEST_VM} eq VM_U12 || $self->{oTest}->{&TEST_VM} eq VM_CO6 ?
|
||||
" -Wno-missing-field-initializers \\\n" : '') .
|
||||
|
||||
@@ -88,6 +88,8 @@ use constant VM_U14 => 'u14';
|
||||
push @EXPORT, qw(VM_U14);
|
||||
use constant VM_U16 => 'u16';
|
||||
push @EXPORT, qw(VM_U16);
|
||||
use constant VM_U18 => 'u18';
|
||||
push @EXPORT, qw(VM_U18);
|
||||
use constant VM_D8 => 'd8';
|
||||
push @EXPORT, qw(VM_D8);
|
||||
use constant VM_D9 => 'd9';
|
||||
@@ -98,14 +100,14 @@ use constant VM_EXPECT => VM_CO7;
|
||||
push @EXPORT, qw(VM_EXPECT);
|
||||
|
||||
# Defines the host VM (the VM that the containers run in)
|
||||
use constant VM_HOST_DEFAULT => VM_U16;
|
||||
use constant VM_HOST_DEFAULT => VM_U18;
|
||||
push @EXPORT, qw(VM_HOST_DEFAULT);
|
||||
|
||||
# Defines the VM that will do coverage testing
|
||||
use constant VM_COVERAGE => VM_U16;
|
||||
use constant VM_COVERAGE => VM_U18;
|
||||
|
||||
# Lists valid VMs
|
||||
use constant VM_LIST => (VM_U16, VM_CO6, VM_CO7, VM_U12);
|
||||
use constant VM_LIST => (VM_U18, VM_CO6, VM_CO7, VM_U12);
|
||||
push @EXPORT, qw(VM_LIST);
|
||||
|
||||
my $oyVm =
|
||||
@@ -238,6 +240,32 @@ my $oyVm =
|
||||
|
||||
&VMDEF_WITH_BACKTRACE => true,
|
||||
|
||||
&VM_DB =>
|
||||
[
|
||||
PG_VERSION_94,
|
||||
PG_VERSION_95,
|
||||
],
|
||||
|
||||
&VM_DB_TEST =>
|
||||
[
|
||||
PG_VERSION_94,
|
||||
PG_VERSION_95,
|
||||
],
|
||||
},
|
||||
|
||||
# Ubuntu 18.04
|
||||
&VM_U18 =>
|
||||
{
|
||||
&VM_OS_BASE => VM_OS_BASE_DEBIAN,
|
||||
&VM_OS => VM_OS_UBUNTU,
|
||||
&VM_OS_REPO => 'bionic',
|
||||
&VM_IMAGE => 'ubuntu:18.04',
|
||||
&VM_ARCH => VM_ARCH_AMD64,
|
||||
&VMDEF_PGSQL_BIN => '/usr/lib/postgresql/{[version]}/bin',
|
||||
&VMDEF_PERL_ARCH_PATH => '/usr/local/lib/x86_64-linux-gnu/perl/5.26.1',
|
||||
|
||||
&VMDEF_WITH_BACKTRACE => true,
|
||||
|
||||
&VM_DB =>
|
||||
[
|
||||
PG_VERSION_94,
|
||||
|
||||
Reference in New Issue
Block a user