Skip to content

Commit

Permalink
gitlab-ci: add openSUSE packages build jobs
Browse files Browse the repository at this point in the history
Implemented openSUSE packages build with testing for images:
opensuse-leap:15.[0-2]

Added %{sle_version} checks in Tarantool spec file according to
https://en.opensuse.org/openSUSE:Packaging_for_Leap#RPM_Distro_Version_Macros

Added opensuse-leap of 15.1 and 15.2 versions to Gitlab-CI packages
building/deploing jobs.

Closes #4562
  • Loading branch information
avtikhon committed Aug 31, 2020
1 parent 9600b89 commit eb69ff3
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 7 deletions.
24 changes: 24 additions & 0 deletions .gitlab-ci.yml
Expand Up @@ -430,6 +430,18 @@ debian_10:
OS: 'debian'
DIST: 'buster'

opensuse_15_1:
<<: *pack_definition
variables:
OS: 'opensuse-leap'
DIST: '15.1'

opensuse_15_2:
<<: *pack_definition
variables:
OS: 'opensuse-leap'
DIST: '15.2'

# Deploy

sources_deploy:
Expand Down Expand Up @@ -527,6 +539,18 @@ debian_10_deploy:
OS: 'debian'
DIST: 'buster'

opensuse_15_1_deploy:
<<: *deploy_definition
variables:
OS: 'opensuse-leap'
DIST: '15.1'

opensuse_15_2_deploy:
<<: *deploy_definition
variables:
OS: 'opensuse-leap'
DIST: '15.2'

# Static builds

static_build:
Expand Down
16 changes: 11 additions & 5 deletions rpm/tarantool.spec
@@ -1,13 +1,13 @@
# Enable systemd for on RHEL >= 7 and Fedora >= 15
%if (0%{?fedora} >= 15 || 0%{?rhel} >= 7)
%if (0%{?fedora} >= 15 || 0%{?rhel} >= 7 || 0%{?sle_version} >= 1500)
%bcond_without systemd
%else
%bcond_with systemd
%endif

BuildRequires: cmake >= 2.8
BuildRequires: make
%if (0%{?fedora} >= 22 || 0%{?rhel} >= 7)
%if (0%{?fedora} >= 22 || 0%{?rhel} >= 7 || 0%{?sle_version} >= 1500)
# RHEL 6 requires devtoolset
BuildRequires: gcc >= 4.5
BuildRequires: gcc-c++ >= 4.5
Expand Down Expand Up @@ -53,6 +53,12 @@ Requires(preun): initscripts
%bcond_without backtrace
%endif

# openSuSE sets its own build directory in its macros, but we
# want to use in-source build there to simplify the RPM spec.
%if (0%{?sle_version} >= 1500)
%global __builddir .
%endif

%if %{with backtrace}
BuildRequires: libunwind-devel
#
Expand All @@ -78,7 +84,7 @@ BuildRequires: python2-six >= 1.9.0
BuildRequires: python2-gevent >= 1.0
BuildRequires: python2-yaml >= 3.0.9
%else
%if (0%{?rhel} != 6)
%if (0%{?rhel} != 6 || 0%{?sle_version} >= 1500)
BuildRequires: python >= 2.7
BuildRequires: python-six >= 1.9.0
BuildRequires: python-gevent >= 1.0
Expand All @@ -105,7 +111,7 @@ Requires: /etc/services
# Deps for built-in package manager
# https://github.com/tarantool/tarantool/issues/2612
Requires: openssl
%if (0%{?fedora} >= 22 || 0%{?rhel} >= 8)
%if (0%{?fedora} >= 22 || 0%{?rhel} >= 8 || 0%{?sle_version} >= 1500)
# RHEL <= 7 doesn't support Recommends:
Recommends: tarantool-devel
Recommends: git-core
Expand Down Expand Up @@ -164,7 +170,7 @@ rm -rf %{buildroot}%{_datarootdir}/doc/tarantool/

%check
%if "%{_ci}" == "travis"
%if (0%{?fedora} >= 22 || 0%{?rhel} >= 7)
%if (0%{?fedora} >= 22 || 0%{?rhel} >= 7 || 0%{?sle_version} >= 1500)
cd test && ./test-run.py --force -j 1 unit/ app/ app-tap/ box/ box-tap/ engine/ vinyl/
%endif
%else
Expand Down
6 changes: 4 additions & 2 deletions tools/update_repo.sh
Expand Up @@ -6,7 +6,7 @@ rm_dir='rm -rf'
mk_dir='mkdir -p'
ws_prefix=/tmp/tarantool_repo_s3

alloss='ubuntu debian el fedora'
alloss='ubuntu debian el fedora opensuse-leap'
product=tarantool
remove=
force=
Expand All @@ -31,6 +31,8 @@ function get_os_dists {
alldists='6 7 8'
elif [ "$os" == "fedora" ]; then
alldists='27 28 29 30 31'
elif [ "$os" == "opensuse-leap" ]; then
alldists='15.0 15.1 15.2'
fi

echo "$alldists"
Expand Down Expand Up @@ -934,7 +936,7 @@ if [ "$os" == "ubuntu" -o "$os" == "debian" ]; then
# unlock the publishing
$rm_file $ws_lockfile
popd
elif [ "$os" == "el" -o "$os" == "fedora" ]; then
elif [ "$os" == "el" -o "$os" == "fedora" -o "$os" == "opensuse-leap" ]; then
# RPM packages structure needs different paths for binaries and sources
# packages, in this way it is needed to call the packages registering
# script twice with the given format:
Expand Down

0 comments on commit eb69ff3

Please sign in to comment.