Skip to content

Commit

Permalink
Build packages with Ubuntu 18.04
Browse files Browse the repository at this point in the history
Restores Ubuntu 18.04 packages
Update docker images to use Conan
  • Loading branch information
legleux authored and intelliot committed Mar 21, 2023
1 parent f7b3ddd commit da18c86
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 120 deletions.
5 changes: 4 additions & 1 deletion Builds/CMake/RippledCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ else ()
# * static option set and
# * NOT APPLE (AppleClang does not support static libc/c++) and
# * NOT san (sanitizers typically don't work with static libc/c++)
$<$<AND:$<BOOL:${static}>,$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:-static-libstdc++>)
$<$<AND:$<BOOL:${static}>,$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:
-static-libstdc++
-static-libgcc
>)
endif ()

if (use_gold AND is_gcc)
Expand Down
10 changes: 5 additions & 5 deletions Builds/CMake/RippledRelease.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ if (is_root_project)
#[===================================================================[
dpkg
#]===================================================================]
# currently use ubuntu 16.04 as a base b/c it has one of
# currently use ubuntu 18.04 as a base b/c it has one of
# the lower versions of libc among ubuntu and debian releases.
# we could change this in the future and build with some other deb
# based system.
add_custom_target (dpkg_container
docker build
--pull
--build-arg DIST_TAG=20.04
--build-arg DIST_TAG=18.04
--build-arg GIT_COMMIT=${commit_hash}
-t rippleci/rippled-dpkg-builder:${container_label}
-t rippled-dpkg-builder:${container_label}
$<$<BOOL:${dpkg_cache_from}>:--cache-from=${dpkg_cache_from}>
-f ubuntu-builder/Dockerfile .
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Builds/containers
Expand Down Expand Up @@ -119,7 +119,7 @@ if (is_root_project)
docker run
-v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
-v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
-t rippleci/rippled-dpkg-builder:${container_label}
-t rippled-dpkg-builder:${container_label}
/bin/bash -c "cp -fpu rippled/Builds/containers/packaging/dpkg/build_dpkg.sh . && ./build_dpkg.sh"
VERBATIM
USES_TERMINAL
Expand Down Expand Up @@ -159,7 +159,7 @@ if (is_root_project)
add_custom_target (ci_container
docker build
--pull
--build-arg DIST_TAG=20.04
--build-arg DIST_TAG=18.04
--build-arg GIT_COMMIT=${commit_hash}
--build-arg CI_USE=true
-t rippled-ci-builder:${container_label}
Expand Down
77 changes: 71 additions & 6 deletions Builds/containers/gitlab-ci/pkgbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ variables:
# cmake build (container targets) and tagged/pushed so they
# can be used here
RPM_CONTAINER_TAG: "2023-02-13"
RPM_CONTAINER_NAME: "rippleci/rippled-rpm-builder"
RPM_CONTAINER_NAME: "rippled-rpm-builder"
RPM_CONTAINER_FULLNAME: "${RPM_CONTAINER_NAME}:${RPM_CONTAINER_TAG}"
DPKG_CONTAINER_TAG: "2023-02-13"
DPKG_CONTAINER_NAME: "rippleci/rippled-dpkg-builder"
DPKG_CONTAINER_TAG: "2023-03-20"
DPKG_CONTAINER_NAME: "rippled-dpkg-builder"
DPKG_CONTAINER_FULLNAME: "${DPKG_CONTAINER_NAME}:${DPKG_CONTAINER_TAG}"
ARTIFACTORY_HOST: "artifactory.ops.ripple.com"
ARTIFACTORY_HUB: "${ARTIFACTORY_HOST}:6555"
Expand Down Expand Up @@ -190,7 +190,7 @@ rocky_8_smoketest:
dependencies:
- rpm_build
image:
name: rockylinux/rockylinux:8
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
<<: *run_local_smoketest

fedora_37_smoketest:
Expand All @@ -209,6 +209,14 @@ fedora_38_smoketest:
name: artifactory.ops.ripple.com/fedora:38
<<: *run_local_smoketest

ubuntu_18_smoketest:
stage: smoketest
dependencies:
- dpkg_build
image:
name: artifactory.ops.ripple.com/ubuntu:18.04
<<: *run_local_smoketest

ubuntu_20_smoketest:
stage: smoketest
dependencies:
Expand All @@ -225,6 +233,14 @@ ubuntu_22_smoketest:
name: artifactory.ops.ripple.com/ubuntu:22.04
<<: *run_local_smoketest

debian_10_smoketest:
stage: smoketest
dependencies:
- dpkg_build
image:
name: artifactory.ops.ripple.com/debian:10
<<: *run_local_smoketest

debian_11_smoketest:
stage: smoketest
dependencies:
Expand Down Expand Up @@ -329,12 +345,13 @@ centos_7_verify_repo_test:
<<: *only_primary
<<: *run_repo_smoketest


rocky_8_verify_repo_test:
stage: verify_from_test
variables:
RPM_REPO: "rippled-rpm-test-mirror"
image:
name: rockylinux/rockylinux:8
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
dependencies:
- rpm_sign
<<: *only_primary
Expand Down Expand Up @@ -362,6 +379,18 @@ fedora_38_verify_repo_test:
<<: *only_primary
<<: *run_repo_smoketest

ubuntu_18_verify_repo_test:
stage: verify_from_test
variables:
DISTRO: "bionic"
DEB_REPO: "rippled-deb-test-mirror"
image:
name: artifactory.ops.ripple.com/ubuntu:18.04
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest

ubuntu_20_verify_repo_test:
stage: verify_from_test
variables:
Expand All @@ -386,6 +415,18 @@ ubuntu_22_verify_repo_test:
<<: *only_primary
<<: *run_repo_smoketest

debian_10_verify_repo_test:
stage: verify_from_test
variables:
DISTRO: "buster"
DEB_REPO: "rippled-deb-test-mirror"
image:
name: artifactory.ops.ripple.com/debian:10
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest

debian_11_verify_repo_test:
stage: verify_from_test
variables:
Expand Down Expand Up @@ -468,7 +509,7 @@ rocky_8_verify_repo_prod:
variables:
RPM_REPO: "rippled-rpm"
image:
name: rockylinux/rockylinux:8
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
dependencies:
- rpm_sign
<<: *only_primary
Expand Down Expand Up @@ -496,6 +537,18 @@ fedora_38_verify_repo_prod:
<<: *only_primary
<<: *run_repo_smoketest

ubuntu_18_verify_repo_prod:
stage: verify_from_prod
variables:
DISTRO: "bionic"
DEB_REPO: "rippled-deb"
image:
name: artifactory.ops.ripple.com/ubuntu:18.04
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest

ubuntu_20_verify_repo_prod:
stage: verify_from_prod
variables:
Expand All @@ -520,6 +573,18 @@ ubuntu_22_verify_repo_prod:
<<: *only_primary
<<: *run_repo_smoketest

debian_10_verify_repo_prod:
stage: verify_from_prod
variables:
DISTRO: "buster"
DEB_REPO: "rippled-deb"
image:
name: artifactory.ops.ripple.com/debian:10
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest

debian_11_verify_repo_prod:
stage: verify_from_prod
variables:
Expand Down
2 changes: 1 addition & 1 deletion Builds/containers/gitlab-ci/push_to_artifactory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RIPPLED_REPORTING_DBG_PKG=$(ls rippled-reporting-dbgsym_*.*deb)
# TODO - where to upload src tgz?
RIPPLED_SRC=$(ls rippled_*.orig.tar.gz)
DEB_MATRIX=";deb.component=${COMPONENT};deb.architecture=amd64"
for dist in bullseye focal jammy; do
for dist in buster bullseye bionic focal jammy; do
DEB_MATRIX="${DEB_MATRIX};deb.distribution=${dist}"
done
echo "{ \"debs\": {" > "${TOPDIR}/files.info"
Expand Down
2 changes: 0 additions & 2 deletions Builds/containers/packaging/dpkg/build_dpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ CHANGELOG
# PATH must be preserved for our more modern cmake in /opt/local
# TODO : consider allowing lintian to run in future ?
export DH_BUILD_DDEBS=1
export CC=gcc-11
export CXX=g++-11
debuild --no-lintian --preserve-envvar PATH --preserve-env -us -uc
rc=$?; if [[ $rc != 0 ]]; then
error "error building dpkg"
Expand Down
6 changes: 5 additions & 1 deletion Builds/containers/packaging/dpkg/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ override_dh_auto_configure:
conan install . \
--install-folder bld/rippled \
--build missing \
--build boost \
--build sqlite3 \
--settings build_type=Release

cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
Expand All @@ -38,8 +40,10 @@ override_dh_auto_configure:
conan install . \
--install-folder bld/rippled-reporting \
--build missing \
--build boost \
--build sqlite3 \
--build libuv \
--settings build_type=Release \
--settings compiler.cppstd=17 \
--options reporting=True

cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
Expand Down
17 changes: 4 additions & 13 deletions Builds/containers/ubuntu-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
ARG DIST_TAG=20.04
ARG DIST_TAG=18.04
FROM ubuntu:$DIST_TAG
ARG GIT_COMMIT=unknown
ARG CI_USE=false
LABEL git-commit=$GIT_COMMIT

# install/setup prerequisites:
COPY ubuntu-builder/ubuntu_setup.sh /tmp/
COPY shared/install_cmake.sh /tmp/
RUN chmod +x /tmp/ubuntu_setup.sh && \
chmod +x /tmp/install_cmake.sh
RUN /tmp/ubuntu_setup.sh
WORKDIR /root
COPY ubuntu-builder/ubuntu_setup.sh .
RUN ./ubuntu_setup.sh && rm ubuntu_setup.sh

RUN /tmp/install_cmake.sh 3.16.3 /opt/local/cmake-3.16
RUN ln -s /opt/local/cmake-3.16 /opt/local/cmake
ENV PATH="/opt/local/cmake/bin:$PATH"

# prep files for package building
RUN update-alternatives --set gcc /usr/bin/gcc-11
RUN mkdir -m 777 -p /opt/rippled_bld/pkg/
WORKDIR /opt/rippled_bld/pkg

Expand Down
Loading

0 comments on commit da18c86

Please sign in to comment.