mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Support building Ruby in UBI
Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
This commit is contained in:
parent
9441b21608
commit
0149acb910
1 changed files with 25 additions and 6 deletions
|
|
@ -16,12 +16,7 @@ JEMALLOC_DOWNLOAD_URL="https://github.com/jemalloc/jemalloc/releases/download/${
|
|||
BUNDLER_VERSION=${3:-""}
|
||||
RUBYGEMS_VERSION=${4:-""}
|
||||
|
||||
|
||||
function build_debian() {
|
||||
# Install needed packages
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends bison dpkg-dev libgdbm-dev autoconf
|
||||
|
||||
function build_common() {
|
||||
# Download jemalloc
|
||||
mkdir -p /usr/src/jemalloc
|
||||
cd /usr/src/jemalloc
|
||||
|
|
@ -74,6 +69,15 @@ function build_debian() {
|
|||
# Cleanup
|
||||
cd /
|
||||
rm -rf /usr/src/ruby /usr/src/jemalloc
|
||||
}
|
||||
|
||||
function build_debian() {
|
||||
# Install needed packages
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends bison dpkg-dev libgdbm-dev autoconf
|
||||
|
||||
build_common
|
||||
|
||||
apt-get purge -y --auto-remove ruby
|
||||
|
||||
# Verify
|
||||
|
|
@ -82,6 +86,21 @@ function build_debian() {
|
|||
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]
|
||||
}
|
||||
|
||||
function build_ubi() {
|
||||
yum update -y
|
||||
|
||||
build_common
|
||||
|
||||
yum remove -y ruby
|
||||
yum autoremove -y
|
||||
yum clean -y all
|
||||
|
||||
# Verify
|
||||
# verify we have no "ruby" packages installed
|
||||
! yum list installed | grep -i ruby
|
||||
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]
|
||||
}
|
||||
|
||||
BUILD_OS=${BUILD_OS:-debian}
|
||||
|
||||
if [[ $BUILD_OS =~ debian ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue