You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2023/05/19 15:56:42 UTC

[couchdb-ci] branch main updated: Add Dockerfile for rockylinux-9 (#54)

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-ci.git


The following commit(s) were added to refs/heads/main by this push:
     new f1a60ee  Add Dockerfile for rockylinux-9 (#54)
f1a60ee is described below

commit f1a60ee6228030018def7acc61de9291ac181611
Author: Kun Lu <ku...@ibm.com>
AuthorDate: Fri May 19 11:56:36 2023 -0400

    Add Dockerfile for rockylinux-9 (#54)
    
    * Add Dockerfile for rockylinux-9
    
    Signed-off-by: Kun-Lu <ku...@ibm.com>
---
 bin/yum-dependencies.sh    | 22 ++++++++++++----
 build.sh                   |  2 +-
 dockerfiles/rockylinux-9   | 64 ++++++++++++++++++++++++++++++++++++++++++++++
 pull-all-couchdbdev-docker |  1 +
 4 files changed, 83 insertions(+), 6 deletions(-)

diff --git a/bin/yum-dependencies.sh b/bin/yum-dependencies.sh
index ee19893..1036bd3 100755
--- a/bin/yum-dependencies.sh
+++ b/bin/yum-dependencies.sh
@@ -87,7 +87,7 @@ echo "Detected RedHat/Centos/Fedora version: ${VERSION_ID}   arch: ${ARCH}"
 # Enable EPEL
 yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${VERSION_ID}.noarch.rpm || true
 # PowerTools for Rocky 8
-if [[ ${VERSION_ID} -gt 7 ]]; then
+if [[ ${VERSION_ID} -eq 8 ]]; then
   dnf install -y 'dnf-command(config-manager)'
   dnf config-manager --set-enabled powertools
   yum update -y
@@ -112,7 +112,12 @@ yum groupinstall -y 'Development Tools'
 # help2man is for docs
 yum install -y sudo git wget which autoconf autoconf-archive automake curl-devel libicu-devel \
     libtool ncurses-devel nspr-devel zip readline-devel unzip perl \
-    createrepo xfsprogs-devel rpmdevtools help2man
+    createrepo xfsprogs-devel rpmdevtools
+if [[ ${VERSION_ID} -eq 9 ]]; then
+  dnf --enablerepo=crb install -y help2man
+else
+  yum install -y help2man
+fi
 
 # Node.js
 pushd /tmp
@@ -143,14 +148,19 @@ if [[ ${VERSION_ID} -eq 7 ]]; then
   yum install -y python36 python36-pip python-virtualenv
   PIP=pip3.6
   ln -s /usr/bin/python3.6 /usr/local/bin/python3
-else
+elif [[ ${VERSION_ID} -eq 8 ]]; then
   yum install -y python3-pip python3-virtualenv
   PIP=pip3
+else
+  yum install -y python3-pip
+  PIP=pip3
 fi
 
-
 ${PIP} --default-timeout=1000 install docutils==0.13.1 sphinx==1.5.3 sphinx_rtd_theme \
     typing nose requests hypothesis==3.79.0
+if [[ ${VERSION_ID} -eq 9 ]]; then
+  ${PIP} --default-timeout=1000 install wheel virtualenv
+fi
 
 # js packages, as long as we're not told to skip them
 if [[ $1 != "nojs" ]]; then
@@ -160,8 +170,10 @@ if [[ $1 != "nojs" ]]; then
     yum-config-manager --add-repo https://couchdb.apache.org/repo/couchdb.repo
     # install the JS packages
     yum install -y couch-js-devel
-  else
+  elif [[ ${VERSION_ID} -eq 8 ]]; then
     yum install -y mozjs60-devel
+  else
+    yum install -y mozjs78-devel
   fi
 else
   # install js build-time dependencies only
diff --git a/build.sh b/build.sh
index 5fec2f1..bbcd15b 100755
--- a/build.sh
+++ b/build.sh
@@ -48,7 +48,7 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 #
 DEBIANS="debian-buster debian-bullseye"
 UBUNTUS="ubuntu-bionic ubuntu-focal ubuntu-jammy"
-CENTOSES="centos-7 rockylinux-8"
+CENTOSES="centos-7 rockylinux-8 rockylinux-9"
 ERLANGALL_BASE="debian-bullseye"
 XPLAT_BASE="debian-bullseye"
 XPLAT_ARCHES="arm64v8 ppc64le s390x"
diff --git a/dockerfiles/rockylinux-9 b/dockerfiles/rockylinux-9
new file mode 100644
index 0000000..a3c9517
--- /dev/null
+++ b/dockerfiles/rockylinux-9
@@ -0,0 +1,64 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+
+# NOTE: These are intended to be built using the arguments as
+# described in ../build.sh. See that script for more details.
+
+FROM rockylinux:9
+
+# Install Java
+ENV JAVA_HOME=/opt/java/openjdk
+COPY --from=eclipse-temurin:11 $JAVA_HOME $JAVA_HOME
+ENV PATH="${JAVA_HOME}/bin:${PATH}"
+
+# Choose whether to install SpiderMonkey 1.8.5, default yes
+ARG js=js
+# Choose whether to install Erlang, default yes
+ARG erlang=erlang
+# Select version of Node, Erlang and Elixir to install
+ARG erlangversion=24.3.4.10
+ARG elixirversion=v1.13.4
+ARG nodeversion=14
+
+# Create Jenkins user and group
+RUN groupadd --gid 910 jenkins; \
+  useradd --uid 910 --gid jenkins --create-home jenkins
+
+# Copy couchdb-ci repo into root's home directory
+ADD --chown=root:root bin /root/couchdb-ci/bin/
+ADD --chown=root:root files /root/couchdb-ci/files/
+
+# Jenkins builds in /usr/src/couchdb.
+RUN mkdir -p /usr/src/couchdb; \
+  chown -R jenkins:jenkins /usr/src/couchdb
+
+# Add /usr/local/lib to global LD_LIBRARY_PATH for CentOS
+RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf
+
+# Install all dependencies, and optionally SM 1.8.5
+# This allows us to use the same Dockerfile for building SM
+RUN ERLANGVERSION=$erlangversion \
+  ELIXIRVERSION=$elixirversion \
+  NODEVERSION=$nodeversion \
+  /root/couchdb-ci/bin/install-dependencies.sh $js $erlang
+
+# Allow Jenkins to sudo
+RUN echo "jenkins ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/jenkins
+
+USER jenkins
+
+# overwrite this with 'CMD []' in a dependent Dockerfile
+CMD ["/bin/bash"]
diff --git a/pull-all-couchdbdev-docker b/pull-all-couchdbdev-docker
index 70edd4a..59d9076 100644
--- a/pull-all-couchdbdev-docker
+++ b/pull-all-couchdbdev-docker
@@ -7,6 +7,7 @@ KEEP_IMAGES=(
 couchdbci-debian:bullseye-erlang-25.3
 couchdbci-debian:buster-erlang-24.3.4.10
 couchdbci-debian:bullseye-erlang-24.3.4.10
+couchdbci-centos:9-erlang-24.3.4.10
 couchdbci-centos:8-erlang-24.3.4.10
 couchdbci-centos:7-erlang-24.3.4.10
 couchdbci-ubuntu:bionic-erlang-24.3.4.10