GOTARBALL=${GOTARBALL_$(HOSTTYPE)}
NODETARBALL=${NODETARBALL_$(HOSTTYPE)}
-RVMKEY1=mpapis.asc
-RVMKEY2=pkuczynski.asc
-
-common-generated-all: common-generated/$(GOTARBALL) common-generated/$(NODETARBALL) common-generated/$(RVMKEY1) common-generated/$(RVMKEY2)
+common-generated-all: common-generated/$(GOTARBALL) common-generated/$(NODETARBALL)
common-generated/$(GOTARBALL): common-generated
wget -cqO common-generated/$(GOTARBALL) https://dl.google.com/go/$(GOTARBALL)
common-generated/$(NODETARBALL): common-generated
wget -cqO common-generated/$(NODETARBALL) https://nodejs.org/dist/v12.22.12/$(NODETARBALL)
-common-generated/$(RVMKEY1): common-generated
- wget -cqO common-generated/$(RVMKEY1) https://rvm.io/mpapis.asc
-
-common-generated/$(RVMKEY2): common-generated
- wget -cqO common-generated/$(RVMKEY2) https://rvm.io/pkuczynski.asc
-
common-generated:
mkdir common-generated
ARG BRANCH
ARG GOVERSION
-## dont use debian:11 here since the word 'bullseye' is used for rvm precompiled binaries
FROM debian:bullseye as build_x86_64
# Install go
ONBUILD ARG BRANCH
SHELL ["/bin/bash", "-c"]
# Install dependencies.
-RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y python3 libcurl4-gnutls-dev curl git procps libattr1-dev libfuse-dev libgnutls28-dev libpq-dev unzip python3-venv python3-dev libpam-dev equivs
+RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y \
+ build-essential \
+ curl \
+ equivs \
+ git \
+ libattr1-dev \
+ libcurl4-gnutls-dev \
+ libfuse-dev \
+ libgnutls28-dev \
+ libpam-dev \
+ libpq-dev \
+ pkgconf \
+ procps \
+ python3 \
+ python3-dev \
+ python3-venv \
+ ruby \
+ ruby-dev \
+ unzip
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
# fpm depends on dotenv, but version 3.0 of that gem dropped support for
# Ruby 2.7, so we need to specifically install an older version.
-RUN gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install 2.7 -j $(grep -c processor /proc/cpuinfo) --disable-binary && \
- /usr/local/rvm/bin/rvm alias create default ruby-2.7 && \
- echo "gem: --no-document" >> ~/.gemrc && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19 && \
- /usr/local/rvm/bin/rvm-exec default gem install dotenv --version '~> 2.8' && \
- /usr/local/rvm/bin/rvm-exec default gem install fpm --version 1.15.1
+RUN echo "gem: --no-document" >> ~/.gemrc && \
+ gem install bundler --version 2.2.19 && \
+ gem install dotenv --version '~> 2.8' && \
+ gem install fpm --version 1.15.1 && \
+ bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
-RUN /usr/local/rvm/bin/rvm-exec default bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
# Cf. https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install/
ENV MAKE "make --jobs $(grep -c processor /proc/cpuinfo)"
cd /tmp/arvados && \
if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \
cd /tmp/arvados/services/api && \
- /usr/local/rvm/bin/rvm-exec default bundle install && \
+ bundle install && \
cd /tmp/arvados && \
go mod download
ENV WORKSPACE /arvados
-CMD ["/usr/local/rvm/bin/rvm-exec", "default", "bash", "/jenkins/run-build-packages.sh", "--target", "debian11"]
+CMD ["bash", "/jenkins/run-build-packages.sh", "--target", "debian11"]
ARG BRANCH
ARG GOVERSION
-## dont use debian:12 here since the word 'bookworm' is used for rvm precompiled binaries
FROM debian:bookworm as build_x86_64
ONBUILD ARG BRANCH
# Install go
SHELL ["/bin/bash", "-c"]
# Install dependencies.
-RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y python3 libcurl4-gnutls-dev curl git procps libattr1-dev libfuse-dev libgnutls28-dev libpq-dev unzip python3-venv python3-dev libpam-dev equivs
+RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y \
+ build-essential \
+ curl \
+ equivs \
+ git \
+ libattr1-dev \
+ libcurl4-gnutls-dev \
+ libfuse-dev \
+ libgnutls28-dev \
+ libpam-dev \
+ libpq-dev \
+ pkgconf \
+ procps \
+ python3 \
+ python3-dev \
+ python3-venv \
+ ruby \
+ ruby-dev \
+ unzip
-# Install RVM
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
-RUN gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install 3.2.2 -j $(grep -c processor /proc/cpuinfo) --disable-binary && \
- /usr/local/rvm/bin/rvm alias create default ruby-3.2.2 && \
- echo "gem: --no-document" >> ~/.gemrc && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19 && \
- /usr/local/rvm/bin/rvm-exec default gem install fpm --version 1.15.1
+RUN echo "gem: --no-document" >> ~/.gemrc && \
+ gem install bundler --version 2.2.19 && \
+ gem install fpm --version 1.15.1 && \
+ bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
-RUN /usr/local/rvm/bin/rvm-exec default bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
# Cf. https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install/
ENV MAKE "make --jobs 8"
cd /tmp/arvados && \
if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \
cd /tmp/arvados/services/api && \
- /usr/local/rvm/bin/rvm-exec default bundle install && \
+ bundle install && \
cd /tmp/arvados && \
go mod download
ENV WORKSPACE /arvados
-CMD ["/usr/local/rvm/bin/rvm-exec", "default", "bash", "/jenkins/run-build-packages.sh", "--target", "debian12"]
+CMD ["bash", "/jenkins/run-build-packages.sh", "--target", "debian12"]
MAINTAINER Arvados Package Maintainers <packaging@arvados.org>
# Install dependencies.
-RUN microdnf --assumeyes --enablerepo=devel install \
+RUN microdnf --assumeyes module enable ruby:3.1 \
+ && microdnf --assumeyes --enablerepo=devel install \
automake \
bison \
bzip2 \
openssl-devel \
pam-devel \
patch \
+ pkgconf \
postgresql-devel \
procps-ng \
python39 \
readline-devel \
rpm-build \
ruby \
+ ruby-devel \
sqlite-devel \
tar \
unzip \
xz-libs \
zlib-devel
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
# fpm depends on dotenv, but version 3.0 of that gem dropped support for
# Ruby 2.7, so we need to specifically install an older version.
-RUN gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install --disable-binary 2.7 -j $(grep -c processor /proc/cpuinfo) && \
- /usr/local/rvm/bin/rvm alias create default ruby-2.7 && \
- echo "gem: --no-document" >> ~/.gemrc && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19 && \
- /usr/local/rvm/bin/rvm-exec default gem install dotenv --version '~> 2.8' && \
- /usr/local/rvm/bin/rvm-exec default gem install fpm --version 1.15.1
+RUN echo "gem: --no-document" >> ~/.gemrc && \
+ gem install bundler --version 2.2.19 && \
+ gem install dotenv --version '~> 2.8' && \
+ gem install fpm --version 1.15.1 && \
+ bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
-RUN /usr/local/rvm/bin/rvm-exec default bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
# Cf. https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install/
ENV MAKE "make --jobs $(grep -c processor /proc/cpuinfo)"
cd /tmp/arvados && \
if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \
cd /tmp/arvados/services/api && \
- /usr/local/rvm/bin/rvm-exec default bundle install && \
+ bundle install && \
cd /tmp/arvados && \
go mod download
ENV WORKSPACE /arvados
-CMD ["/usr/local/rvm/bin/rvm-exec", "default", "bash", "/jenkins/run-build-packages.sh", "--target", "rocky8"]
+CMD ["bash", "/jenkins/run-build-packages.sh", "--target", "rocky8"]
SHELL ["/bin/bash", "-c"]
# Install dependencies.
-RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y python3 libcurl4-gnutls-dev libgnutls28-dev curl git libattr1-dev libfuse-dev libpq-dev unzip tzdata python3-venv python3-dev libpam-dev shared-mime-info equivs
+RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y \
+ build-essential \
+ curl \
+ equivs \
+ git \
+ libattr1-dev \
+ libcurl4-gnutls-dev \
+ libfuse-dev \
+ libgnutls28-dev \
+ libpam-dev \
+ libpq-dev \
+ pkgconf \
+ python3 \
+ python3-dev \
+ python3-venv \
+ ruby \
+ ruby-dev \
+ shared-mime-info \
+ tzdata \
+ unzip
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
# fpm depends on dotenv, but version 3.0 of that gem dropped support for
# Ruby 2.7, so we need to specifically install an older version.
-RUN gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install 2.7 -j $(grep -c processor /proc/cpuinfo) && \
- /usr/local/rvm/bin/rvm alias create default ruby-2.7 && \
- echo "gem: --no-document" >> ~/.gemrc && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19 && \
- /usr/local/rvm/bin/rvm-exec default gem install dotenv --version '~> 2.8' && \
- /usr/local/rvm/bin/rvm-exec default gem install fpm --version 1.15.1
+RUN echo "gem: --no-document" >> ~/.gemrc && \
+ gem install bundler --version 2.2.19 && \
+ gem install dotenv --version '~> 2.8' && \
+ gem install fpm --version 1.15.1 && \
+ bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
-RUN /usr/local/rvm/bin/rvm-exec default bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
# Cf. https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install/
ENV MAKE "make --jobs $(grep -c processor /proc/cpuinfo)"
cd /tmp/arvados && \
if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \
cd /tmp/arvados/services/api && \
- /usr/local/rvm/bin/rvm-exec default bundle install && \
+ bundle install && \
cd /tmp/arvados && \
go mod download
ENV WORKSPACE /arvados
-CMD ["/usr/local/rvm/bin/rvm-exec", "default", "bash", "/jenkins/run-build-packages.sh", "--target", "ubuntu2004"]
+CMD ["bash", "/jenkins/run-build-packages.sh", "--target", "ubuntu2004"]
SHELL ["/bin/bash", "-c"]
# Install dependencies.
-RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y python3 libcurl4-gnutls-dev libgnutls28-dev curl git libattr1-dev libfuse-dev libpq-dev unzip tzdata python3-venv python3-dev libpam-dev shared-mime-info equivs
+RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y \
+ build-essential \
+ curl \
+ equivs \
+ git \
+ libattr1-dev \
+ libcurl4-gnutls-dev \
+ libfuse-dev \
+ libgnutls28-dev \
+ libpam-dev \
+ libpq-dev \
+ pkgconf \
+ python3 \
+ python3-dev \
+ python3-venv \
+ ruby \
+ ruby-dev \
+ shared-mime-info \
+ tzdata \
+ unzip
-# Install RVM
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
-RUN gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install 3.2.2 -j $(grep -c processor /proc/cpuinfo) && \
- /usr/local/rvm/bin/rvm alias create default ruby-3.2.2 && \
- echo "gem: --no-document" >> ~/.gemrc && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19 && \
- /usr/local/rvm/bin/rvm-exec default gem install fpm --version 1.15.1
+RUN echo "gem: --no-document" >> ~/.gemrc && \
+ gem install bundler --version 2.2.19 && \
+ gem install fpm --version 1.15.1 && \
+ bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
-RUN /usr/local/rvm/bin/rvm-exec default bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
# Cf. https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install/
ENV MAKE "make --jobs 8"
cd /tmp/arvados && \
if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \
cd /tmp/arvados/services/api && \
- /usr/local/rvm/bin/rvm-exec default bundle install && \
+ bundle install && \
cd /tmp/arvados && \
go mod download
-
ENV WORKSPACE /arvados
-CMD ["/usr/local/rvm/bin/rvm-exec", "default", "bash", "/jenkins/run-build-packages.sh", "--target", "ubuntu2204"]
+CMD ["bash", "/jenkins/run-build-packages.sh", "--target", "ubuntu2204"]
test -d ubuntu2204/generated || mkdir ubuntu2204/generated
cp -f -rlt ubuntu2204/generated common-generated/*
-RVMKEY1=mpapis.asc
-RVMKEY2=pkuczynski.asc
+common-generated-all: common-generated/empty
-common-generated-all: common-generated/$(RVMKEY1) common-generated/$(RVMKEY2)
-
-common-generated/$(RVMKEY1): common-generated
- wget -cqO common-generated/$(RVMKEY1) https://rvm.io/mpapis.asc
-
-common-generated/$(RVMKEY2): common-generated
- wget -cqO common-generated/$(RVMKEY2) https://rvm.io/pkuczynski.asc
+common-generated/empty: common-generated
+ touch common-generated/empty
common-generated:
mkdir common-generated
# Install dependencies
RUN apt-get update && \
- apt-get -y install --no-install-recommends curl ca-certificates gpg procps gpg-agent
-
-# Install RVM
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
-RUN gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install 2.7 -j $(grep -c processor /proc/cpuinfo) --disable-binary && \
- /usr/local/rvm/bin/rvm alias create default ruby-2.7 && \
+ apt-get -y install --no-install-recommends curl ca-certificates gpg procps gpg-agent ruby ruby-dev && \
echo "gem: --no-document" >> /etc/gemrc && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19
-
-# udev daemon can't start in a container, so don't try.
-RUN mkdir -p /etc/udev/disabled
-
-RUN echo "deb file:///arvados/packages/debian11/ /" >>/etc/apt/sources.list
+ gem install bundler --version 2.2.19 && \
+ mkdir -p /etc/udev/disabled && \
+ echo "deb file:///arvados/packages/debian11/ /" >>/etc/apt/sources.list
# Install dependencies
RUN apt-get update && \
- apt-get -y install --no-install-recommends curl ca-certificates gpg procps gpg-agent
-
-# Install RVM
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
-RUN gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install 3.2.2 -j $(grep -c processor /proc/cpuinfo) --disable-binary && \
- /usr/local/rvm/bin/rvm alias create default ruby-3.2.2 && \
+ apt-get -y install --no-install-recommends curl ca-certificates gpg procps gpg-agent ruby ruby-dev && \
echo "gem: --no-document" >> /etc/gemrc && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19
-
-# udev daemon can't start in a container, so don't try.
-RUN mkdir -p /etc/udev/disabled
-
-RUN echo "deb file:///arvados/packages/debian12/ /" >>/etc/apt/sources.list
+ gem install bundler --version 2.2.19 && \
+ mkdir -p /etc/udev/disabled && \
+ echo "deb file:///arvados/packages/debian12/ /" >>/etc/apt/sources.list
#
# SPDX-License-Identifier: AGPL-3.0
-FROM rockylinux:8.6-minimal
+FROM rockylinux:8.8-minimal
MAINTAINER Arvados Package Maintainers <packaging@arvados.org>
# Install dependencies.
-RUN microdnf --assumeyes --enablerepo=devel install \
+RUN microdnf --assumeyes module enable ruby:3.1 \
+ && microdnf --assumeyes --enablerepo=devel install \
autoconf \
automake \
bison \
make \
openssl-devel \
patch \
+ pkgconf \
procps-ng \
python3 \
readline-devel \
+ redhat-rpm-config \
ruby \
+ ruby-devel \
shadow-utils \
sqlite-devel \
tar \
which \
zlib-devel
-# Install RVM
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
RUN touch /var/lib/rpm/* && \
- gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install --disable-binary 2.7 -j $(grep -c processor /proc/cpuinfo) && \
- /usr/local/rvm/bin/rvm alias create default ruby-2.7 && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19
+ echo "gem: --no-document" >> ~/.gemrc && \
+ gem install bundler --version 2.2.19
COPY localrepo.repo /etc/yum.repos.d/localrepo.repo
# Install dependencies
RUN apt-get update && \
- apt-get -y install --no-install-recommends curl ca-certificates gnupg2
-
-# Install RVM
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
-RUN gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install 2.7 -j $(grep -c processor /proc/cpuinfo) && \
- /usr/local/rvm/bin/rvm alias create default ruby-2.7 && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19
-
-# udev daemon can't start in a container, so don't try.
-RUN mkdir -p /etc/udev/disabled
-
-RUN echo "deb [trusted=yes] file:///arvados/packages/ubuntu2004/ /" >>/etc/apt/sources.list
+ apt-get -y install --no-install-recommends curl ca-certificates gnupg2 ruby ruby-dev && \
+ gem install bundler --version 2.2.19 && \
+ mkdir -p /etc/udev/disabled && \
+ echo "deb [trusted=yes] file:///arvados/packages/ubuntu2004/ /" >>/etc/apt/sources.list
# Install dependencies
RUN apt-get update && \
- apt-get -y install --no-install-recommends curl ca-certificates gnupg2
-
-# Install RVM
-ADD generated/mpapis.asc /tmp/
-ADD generated/pkuczynski.asc /tmp/
-RUN gpg --import --no-tty /tmp/mpapis.asc && \
- gpg --import --no-tty /tmp/pkuczynski.asc && \
- curl -L https://get.rvm.io | bash -s stable && \
- /usr/local/rvm/bin/rvm install 3.2.2 -j $(grep -c processor /proc/cpuinfo) && \
- /usr/local/rvm/bin/rvm alias create default ruby-3.2.2 && \
- /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19
-
-# udev daemon can't start in a container, so don't try.
-RUN mkdir -p /etc/udev/disabled
-
-RUN echo "deb [trusted=yes] file:///arvados/packages/ubuntu2204/ /" >>/etc/apt/sources.list
+ apt-get -y install --no-install-recommends curl ca-certificates gnupg2 ruby ruby-dev && \
+ gem install bundler --version 2.2.19 && \
+ mkdir -p /etc/udev/disabled && \
+ echo "deb [trusted=yes] file:///arvados/packages/ubuntu2204/ /" >>/etc/apt/sources.list
;;
esac
-/usr/local/rvm/bin/rvm-exec default bundle list >"$ARV_PACKAGES_DIR/$PACKAGE_NAME.gems"
+bundle list >"$ARV_PACKAGES_DIR/$PACKAGE_NAME.gems"
DATABASE_READY=1
APPLICATION_READY=1
-if [ -s "$HOME/.rvm/scripts/rvm" ] || [ -s "/usr/local/rvm/scripts/rvm" ]; then
- COMMAND_PREFIX="/usr/local/rvm/bin/rvm-exec default"
-else
- COMMAND_PREFIX=
-fi
-
report_not_ready() {
local ready_flag="$1"; shift
local config_file="$1"; shift
}
prepare_database() {
- DB_MIGRATE_STATUS=`$COMMAND_PREFIX bin/rake db:migrate:status 2>&1 || true`
+ DB_MIGRATE_STATUS=`bin/rake db:migrate:status 2>&1 || true`
if echo "$DB_MIGRATE_STATUS" | grep -qF 'Schema migrations table does not exist yet.'; then
# The database exists, but the migrations table doesn't.
- run_and_report "Setting up database" $COMMAND_PREFIX bin/rake \
+ run_and_report "Setting up database" bin/rake \
"$RAILSPKG_DATABASE_LOAD_TASK" db:seed
elif echo "$DB_MIGRATE_STATUS" | grep -q '^database: '; then
run_and_report "Running db:migrate" \
- $COMMAND_PREFIX bin/rake db:migrate
+ bin/rake db:migrate
elif echo "$DB_MIGRATE_STATUS" | grep -q 'database .* does not exist'; then
if ! run_and_report "Running db:setup" \
- $COMMAND_PREFIX bin/rake db:setup 2>/dev/null; then
+ bin/rake db:setup 2>/dev/null; then
echo "Warning: unable to set up database." >&2
DATABASE_READY=0
fi
cd "$RELEASE_PATH"
export RAILS_ENV=production
- if ! $COMMAND_PREFIX bundle --version >/dev/null 2>&1; then
- run_and_report "Installing bundler" $COMMAND_PREFIX gem install bundler --version 2.2.19 --no-document
+ if ! bundle --version >/dev/null 2>&1; then
+ run_and_report "Installing bundler" gem install bundler --version 2.2.19 --no-document
fi
run_and_report "Running bundle config set --local path $SHARED_PATH/vendor_bundle" \
- $COMMAND_PREFIX bin/bundle config set --local path $SHARED_PATH/vendor_bundle
+ bundle config set --local path "$SHARED_PATH/vendor_bundle"
run_and_report "Running bundle install" \
- $COMMAND_PREFIX bin/bundle install --local --quiet
+ bundle install --prefer-local --quiet
# As of April 2024/Bundler 2.4, for some reason `bundle install` skips
# zlib if it's already installed as a system-wide gem, which it often will
# be because arvados gems pull it in. If this happened, install it in the
# bundle manually as a workaround.
- if ! $COMMAND_PREFIX bin/bundle info zlib >/dev/null 2>&1; then
- local RUBY_VERSION="$($COMMAND_PREFIX ruby -e 'puts RUBY_VERSION')"
+ if ! bin/bundle info zlib >/dev/null 2>&1; then
+ local RUBY_VERSION="$(ruby -e 'puts RUBY_VERSION')"
run_and_report "Adding zlib to bundle" \
- $COMMAND_PREFIX gem install \
+ gem install \
--install-dir="$SHARED_PATH/vendor_bundle/ruby/$RUBY_VERSION" \
vendor/cache/zlib-*.gem
fi
# warn about config errors (deprecated/removed keys from
# previous version, etc)
run_and_report "Checking configuration for completeness" \
- $COMMAND_PREFIX bin/rake config:check || APPLICATION_READY=0
+ bin/rake config:check || APPLICATION_READY=0
else
APPLICATION_READY=0
fi
else
IMAGE="arvados/build:$TARGET"
if [[ "$COMMAND" != "" ]]; then
- COMMAND="/usr/local/rvm/bin/rvm-exec default bash /jenkins/$COMMAND --target $TARGET$DEBUG"
+ COMMAND="bash /jenkins/$COMMAND --target $TARGET$DEBUG"
fi
fi
exit 0
fi
-if [[ -f /etc/profile.d/rvm.sh ]]; then
- source /etc/profile.d/rvm.sh
- GEM="rvm-exec default gem"
-else
- GEM=gem
-fi
-
# Make all files world-readable -- jenkins runs with umask 027, and has checked
# out our git tree here
chmod o+r "$WORKSPACE" -R
fi
if [[ "$COMMAND" != "" ]]; then
- COMMAND="/usr/local/rvm/bin/rvm-exec default bash /jenkins/$COMMAND --target $TARGET"
+ COMMAND="bash /jenkins/$COMMAND --target $TARGET"
fi
STDOUT_IF_DEBUG=/dev/null
debug_echo "$0 is running from $RUN_BUILD_PACKAGES_PATH"
debug_echo "Workspace is $WORKSPACE"
-if [[ -f /etc/profile.d/rvm.sh ]]; then
- source /etc/profile.d/rvm.sh
- GEM="rvm-exec default gem"
-else
- GEM=gem
-fi
-
# Make all files world-readable -- jenkins runs with umask 027, and has checked
# out our git tree here
chmod o+r "$WORKSPACE" -R
# Ruby gems
debug_echo -e "\nRuby gems\n"
-FPM_GEM_PREFIX=$($GEM environment gemdir)
+FPM_GEM_PREFIX=$(gem environment gemdir)
cd "$WORKSPACE/sdk/ruby" || exit 1
handle_ruby_gem arvados
find -maxdepth 1 -name "${gem_name}-*.gem" -delete
# -q appears to be broken in gem version 2.2.2
- $GEM build "$gem_name.gemspec" $DASHQ_UNLESS_DEBUG >"$STDOUT_IF_DEBUG" 2>"$STDERR_IF_DEBUG"
+ gem build "$gem_name.gemspec" $DASHQ_UNLESS_DEBUG >"$STDOUT_IF_DEBUG" 2>"$STDERR_IF_DEBUG"
fi
}
|| fatal "Locale '${LANG}' is broken/missing. Try: echo ${LANG} | sudo tee -a /etc/locale.gen && sudo locale-gen"
echo -n 'ruby: '
ruby -v \
- || fatal "No ruby. Install >=2.1.9 (using rbenv, rvm, or source)"
+ || fatal "No ruby. Install >=2.7 from package or source"
echo -n 'go: '
go version \
|| fatal "No go binary. See http://golang.org/doc/install"
trap interrupt INT
setup_ruby_environment() {
- if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
- source "$HOME/.rvm/scripts/rvm"
- using_rvm=true
- elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
- source "/usr/local/rvm/scripts/rvm"
- using_rvm=true
- else
- using_rvm=false
+ # When our "bundle install"s need to install new gems to
+ # satisfy dependencies, we want them to go where "gem install
+ # --user-install" would put them. (However, if the caller has
+ # already set GEM_HOME, we assume that's where dependencies
+ # should be installed, and we should leave it alone.)
+
+ if [ -z "$GEM_HOME" ]; then
+ user_gempath="$(gem env gempath)"
+ export GEM_HOME="${user_gempath%%:*}"
fi
+ PATH="$(gem env gemdir)/bin:$PATH"
- if [[ "$using_rvm" == true ]]; then
- # If rvm is in use, we can't just put separate "dependencies"
- # and "gems-under-test" paths to GEM_PATH: passenger resets
- # the environment to the "current gemset", which would lose
- # our GEM_PATH and prevent our test suites from running ruby
- # programs (for example, the Workbench test suite could not
- # boot an API server or run arv). Instead, we have to make an
- # rvm gemset and use it for everything.
-
- [[ `type rvm | head -n1` == "rvm is a function" ]] \
- || fatal 'rvm check'
-
- # Put rvm's favorite path back in first place (overriding
- # virtualenv, which just put itself there). Ignore rvm's
- # complaint about not being in first place already.
- rvm use @default 2>/dev/null
-
- # Create (if needed) and switch to an @arvados-tests-* gemset,
- # salting the gemset name so it doesn't interfere with
- # concurrent builds in other workspaces. Leave the choice of
- # ruby to the caller.
- gemset="arvados-tests-$(echo -n "${WORKSPACE}" | md5sum | head -c16)"
- rvm use "@${gemset}" --create \
- || fatal 'rvm gemset setup'
-
- rvm env
- (bundle version | grep -q 2.2.19) || gem install --no-document bundler -v 2.2.19
- bundle="$(which bundle)"
- echo "$bundle"
- "$bundle" version | grep 2.2.19 || fatal 'install bundler'
- else
- # When our "bundle install"s need to install new gems to
- # satisfy dependencies, we want them to go where "gem install
- # --user-install" would put them. (However, if the caller has
- # already set GEM_HOME, we assume that's where dependencies
- # should be installed, and we should leave it alone.)
-
- if [ -z "$GEM_HOME" ]; then
- user_gempath="$(gem env gempath)"
- export GEM_HOME="${user_gempath%%:*}"
- fi
- PATH="$(gem env gemdir)/bin:$PATH"
-
- # When we build and install our own gems, we install them in our
- # $GEMHOME tmpdir, and we want them to be at the front of GEM_PATH and
- # PATH so integration tests prefer them over other versions that
- # happen to be installed in $user_gempath, system dirs, etc.
+ # When we build and install our own gems, we install them in our
+ # $GEMHOME tmpdir, and we want them to be at the front of GEM_PATH and
+ # PATH so integration tests prefer them over other versions that
+ # happen to be installed in $user_gempath, system dirs, etc.
- tmpdir_gem_home="$(env - PATH="$PATH" HOME="$GEMHOME" gem env gempath | cut -f1 -d:)"
- PATH="$tmpdir_gem_home/bin:$PATH"
- export GEM_PATH="$tmpdir_gem_home:$(gem env gempath)"
+ tmpdir_gem_home="$(env - PATH="$PATH" HOME="$GEMHOME" gem env gempath | cut -f1 -d:)"
+ PATH="$tmpdir_gem_home/bin:$PATH"
+ export GEM_PATH="$tmpdir_gem_home:$(gem env gempath)"
- echo "Will install dependencies to $(gem env gemdir)"
- echo "Will install bundler and arvados gems to $tmpdir_gem_home"
- echo "Gem search path is GEM_PATH=$GEM_PATH"
- bundle="bundle"
- (
- export HOME=$GEMHOME
- versions=(2.2.19)
- for v in ${versions[@]}; do
- if ! gem list --installed --version "${v}" bundler >/dev/null; then
- gem install --no-document --user $(for v in ${versions[@]}; do echo bundler:${v}; done)
- break
- fi
- done
- "$bundle" version | tee /dev/stderr | grep -q 'version 2'
- ) || fatal 'install bundler'
+ echo "Will install dependencies to $(gem env gemdir)"
+ echo "Will install bundler and arvados gems to $tmpdir_gem_home"
+ echo "Gem search path is GEM_PATH=$GEM_PATH"
+ (
+ export HOME=$GEMHOME
+ versions=(2.2.19)
+ for v in ${versions[@]}; do
+ if ! gem list --installed --version "${v}" bundler >/dev/null; then
+ gem install --no-document --user $(for v in ${versions[@]}; do echo bundler:${v}; done)
+ break
+ fi
+ done
+ "$bundle" version | tee /dev/stderr | grep -q 'version 2'
+ ) || fatal 'install bundler'
if test -d /var/lib/arvados-arvbox/ ; then
# Inside arvbox, use bundler-installed binstubs. The
# system bundler and rail's own bin/bundle refuse to work.
# I don't know why.
bundle=binstubs/bundle
fi
- fi
}
with_test_gemset() {
- if [[ "$using_rvm" == true ]]; then
- "$@"
- else
- GEM_HOME="$tmpdir_gem_home" GEM_PATH="$tmpdir_gem_home" "$@"
- fi
+ GEM_HOME="$tmpdir_gem_home" GEM_PATH="$tmpdir_gem_home" "$@"
}
gem_uninstall_if_exists() {
unset http_proxy https_proxy no_proxy
- # Note: this must be the last time we change PATH, otherwise rvm will
- # whine a lot.
setup_ruby_environment
echo "PATH is $PATH"
(
set -e
echo "(Running bundle install --local. 'could not find package' messages are OK.)"
- if ! "$bundle" install --local --no-deployment; then
+ if ! bundle install --local --no-deployment; then
echo "(Running bundle install again, without --local.)"
- "$bundle" install --no-deployment
+ bundle install --no-deployment
fi
- "$bundle" package
+ bundle package
)
}
test_doc() {
local arvados_api_host=pirca.arvadosapi.com && \
env -C "$WORKSPACE/doc" \
- "$bundle" exec rake linkchecker \
+ bundle exec rake linkchecker \
arvados_api_host="$arvados_api_host" \
arvados_workbench_host="https://workbench.$arvados_api_host" \
baseurl="file://$WORKSPACE/doc/.site/" \
test_services/api() {
rm -f "$WORKSPACE/services/api/git-commit.version"
cd "$WORKSPACE/services/api" \
- && eval env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} "$bundle" exec rake test TESTOPTS=\'-v -d\' ${testargs[services/api]}
+ && eval env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test TESTOPTS=\'-v -d\' ${testargs[services/api]}
}
test_sdk/ruby() {
cd "$WORKSPACE/sdk/ruby" \
- && "$bundle" exec rake test TESTOPTS=-v ${testargs[sdk/ruby]}
+ && bundle exec rake test TESTOPTS=-v ${testargs[sdk/ruby]}
}
test_sdk/ruby-google-api-client() {
test_sdk/cli() {
cd "$WORKSPACE/sdk/cli" \
&& mkdir -p /tmp/keep \
- && KEEP_LOCAL_STORE=/tmp/keep "$bundle" exec rake test TESTOPTS=-v ${testargs[sdk/cli]}
+ && KEEP_LOCAL_STORE=/tmp/keep bundle exec rake test TESTOPTS=-v ${testargs[sdk/cli]}
}
test_sdk/java-v2() {
test_services/login-sync() {
cd "$WORKSPACE/services/login-sync" \
- && "$bundle" exec rake test TESTOPTS=-v ${testargs[services/login-sync]}
+ && bundle exec rake test TESTOPTS=-v ${testargs[services/login-sync]}
}
test_services/workbench2_units() {
Ruby 2.7 or newer is required.
-* "Option 1: Install from packages":#packages
-* "Option 2: Install with RVM":#rvm
-
-h2(#packages). Option 1: Install from packages
-
-h3. Alma/CentOS/Red Hat/Rocky
-
-Version 7 of these distributions does not provide a new enough Ruby version. Use "RVM":#rvm to install Ruby 2.7 or newer.
+h2. Alma/CentOS/Red Hat/Rocky
Version 8 of these distributions provides Ruby 2.7. You can install it by running:
# <span class="userinput">dnf install --enablerepo=devel ruby ruby-devel</span></code></pre>
</notextile>
-h3. Debian and Ubuntu
-
-Debian 10 (buster) and Ubuntu 18.04 (bionic) ship with Ruby 2.5, which is too old for Arvados. Use "RVM":#rvm to install Ruby 2.7 or newer.
+h2. Debian and Ubuntu
Debian 11 (bullseye) and Ubuntu 20.04 (focal) and later ship with Ruby 2.7 or newer, which is sufficient for Arvados.
<notextile>
<pre><code># <span class="userinput">apt-get --no-install-recommends install ruby ruby-dev</span></code></pre>
</notextile>
-
-h2(#rvm). Option 2: Install with RVM
-
-{% include 'notebox_begin_warning' %}
-We do not recommend using RVM unless the Ruby version provided by your OS distribution is older than 2.7.
-{% include 'notebox_end' %}
-
-h3. Install gpg and curl
-
-h4. CentOS/Red Hat 7
-
-<pre>
-yum install gpg curl which findutils procps
-</pre>
-
-{% comment %}
-To build ruby 3.2.2 on CentOS 7, add: "yum --enablerepo=powertools install libyaml-devel"
-{% endcomment %}
-
-h4. Alma/CentOS/Red Hat/Rocky 8+
-
-<pre>
-dnf install gpg curl which findutils procps
-</pre>
-
-h4. Debian and Ubuntu
-
-<pre>
-apt-get --no-install-recommends install gpg curl ca-certificates dirmngr procps
-</pre>
-
-h3. Install RVM, Ruby and Bundler
-
-<notextile>
-<pre><code><span class="userinput">gpg --keyserver pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
-\curl -sSL https://get.rvm.io | bash -s stable --ruby=2.7.7
-</span></code></pre></notextile>
-
-This command installs the Ruby 2.7.7 release, as well as the @gem@ and @bundle@ commands.
-
-To use Ruby installed from RVM, load it in an open shell like this:
-
-<notextile>
-<pre><code><span class="userinput">source /usr/local/rvm/scripts/rvm
-</span></code></pre></notextile>
-
-Alternately you can use @rvm-exec@ (the first parameter is the ruby version to use, or "default"), for example:
-
-<notextile>
-<pre><code><span class="userinput">rvm-exec default ruby -v
-</span></code></pre></notextile>
passenger_enabled on;
passenger_preload_bundler on;
- # If you are using RVM, uncomment the line below.
- # If you're using system ruby, leave it commented out.
- #passenger_ruby /usr/local/rvm/wrappers/default/ruby;
-
# This value effectively limits the size of API objects users can
# create, especially collections. If you change this, you should
# also ensure the following settings match it:
passenger_enabled on;
passenger_preload_bundler on;
- # <span class="userinput">If you are using RVM, uncomment the line below.</span>
- # <span class="userinput">If you're using system ruby, leave it commented out.</span>
- #passenger_ruby /usr/local/rvm/wrappers/default/ruby;
-
# This value effectively limits the size of API objects users can
# create, especially collections. If you change this, you should
# also ensure the following settings match it: