From cd81f4cc6b6581bedf02c61779972511c0f3ae30 Mon Sep 17 00:00:00 2001 From: wanghongru Date: Fri, 10 Oct 2025 16:35:51 +0800 Subject: [PATCH 1/4] add new jenkins agent dockerfile for OpenYuanRong --- src/dockerfile/ci-yr-base-arm | 234 ++++++++++++++++++++++++++++++++++ src/dockerfile/ci-yr-base-x86 | 225 ++++++++++++++++++++++++++++++++ 2 files changed, 459 insertions(+) create mode 100644 src/dockerfile/ci-yr-base-arm create mode 100644 src/dockerfile/ci-yr-base-x86 diff --git a/src/dockerfile/ci-yr-base-arm b/src/dockerfile/ci-yr-base-arm new file mode 100644 index 0000000..c331cb9 --- /dev/null +++ b/src/dockerfile/ci-yr-base-arm @@ -0,0 +1,234 @@ +# 基础镜像: +FROM swr.cn-north-4.myhuaweicloud.com/openeuler/openjdk/OPENJDK:TAG + +# During build, ensure the following files are included: +# - OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz +# - apache-maven-3.9.11-bin.tar.gz +# - bazel-6.5.0.zip +# - go1.22.1.linux-amd64.tar.gz +# - protobuf-1.5.4.tar.gz +# - Python-3.9.11.tgz +# - Python-3.10.2.tgz +# - Python-3.11.4.tgz +# - ninja-1.12.0.tar.gz + +RUN yum install -y gcc gcc-c++ git make libstdc++-devel curl libtool \ + binutils binutils-devel libcurl-devel zlib zlib-devel automake expat-devel \ + python3-pip python3-mock patch openssl openssl-devel libssh-devel libffi-devel \ + sqlite-devel bison gawk texinfo glibc glibc-devel wget bzip2-devel sudo \ + rsync nfs-utils xz libuuid unzip util-linux-devel cpio libcap-devel libatomic \ + chrpath numactl-devel openeuler-lsb libasan dos2unix net-tools pigz cmake protobuf protobuf-devel patchelf + +# Create build tools directory +RUN mkdir -p /opt/buildtools/ + +ENV LANG=C.UTF-8 + +# ============================================================================== +# Download and install JDK 8 +# ============================================================================== +RUN cd /tmp \ + && wget https://mirrors.huaweicloud.com/eclipse/temurin-compliance/temurin/8/jdk8u382-b05/OpenJDK8U-jdk_aarch64_linux_hotspot_8u382b05.tar.gz \ + && tar xf OpenJDK8U-jdk_aarch64_linux_hotspot_8u382b05.tar.gz -C /opt/buildtools/ + +# ============================================================================== +# Install Apache Maven +# ============================================================================== +RUN cd /tmp && \ + wget https://mirrors.huaweicloud.com/apache/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz && \ + tar xf apache-maven-3.9.11-bin.tar.gz -C /opt/buildtools/ + +# Write environment variables to /etc/profile and set ENV +RUN echo '' >> /etc/profile && \ + echo '# MAVEN_HOME' >> /etc/profile && \ + echo 'export MAVEN_HOME=/opt/buildtools/apache-maven-3.9.11' >> /etc/profile && \ + echo 'export PATH=$MAVEN_HOME/bin:$PATH' >> /etc/profile + +ENV MAVEN_HOME=/opt/buildtools/apache-maven-3.9.11 +ENV PATH=$MAVEN_HOME/bin:$PATH + +# ============================================================================== +# Install Go 1.22.1 +# ============================================================================== +RUN cd /tmp && \ + wget https://golang.google.cn/dl/go1.22.1.linux-arm64.tar.gz && \ + tar -xvf go1.22.1.linux-arm64.tar.gz && \ + mv go /opt/buildtools/golang_go-1.22.1 + +RUN mkdir -p /opt/buildtools/go_workspace && \ + chmod 755 -R /opt/buildtools/golang_go-1.22.1 && \ + chmod 777 -R /opt/buildtools/go_workspace + +ENV GOROOT=/opt/buildtools/golang_go-1.22.1 +ENV GOPATH=/opt/buildtools/go_workspace +ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH +ENV GO111MODULE=on +ENV GONOSUMDB=* + +# ============================================================================== +# Build and install protoc-gen-go (v1.5.4) +# ============================================================================== + +# Compile and install protoc-gen-go +RUN cd /tmp && \ + wget -O protobuf-1.5.4.tar.gz https://codeload.github.com/golang/protobuf/tar.gz/refs/tags/v1.5.4 && \ + tar -xvf protobuf-1.5.4.tar.gz && \ + cd protobuf-1.5.4/protoc-gen-go && \ + # Enable module mode and download dependencies + GO111MODULE=on go mod download && \ + # Build binary + go build main.go + +RUN mv /tmp/protobuf-1.5.4/protoc-gen-go $GOROOT/bin/ && \ + chmod +x $GOROOT/bin/protoc-gen-go + +# ============================================================================== +# Install Python 3.9.11 +# ============================================================================== +RUN cd /tmp && \ + wget https://mirrors.huaweicloud.com/python/3.9.11/Python-3.9.11.tgz && \ + tar -xzf Python-3.9.11.tgz && \ + cd Python-3.9.11 && \ + ./configure --prefix=/opt/buildtools/python3.9 \ + --with-openssl=/usr \ + --enable-loadable-sqlite-extensions \ + --enable-shared && \ + make -j $(nproc) && \ + make install && \ + chmod -R 755 /opt/buildtools/python3.9 + +# ============================================================================== +# Install Python 3.10.2 +# ============================================================================== +RUN cd /tmp && \ + wget https://mirrors.huaweicloud.com/python/3.10.2/Python-3.10.2.tgz && \ + tar -xzf Python-3.10.2.tgz && \ + cd Python-3.10.2/ && \ + ./configure --prefix=/opt/buildtools/python3.10 \ + --with-openssl=/usr \ + --enable-loadable-sqlite-extensions \ + --enable-shared && \ + make -j $(nproc) && \ + make install && \ + chmod -R 755 /opt/buildtools/python3.10 + +# ============================================================================== +# Install Python 3.11.4 +# ============================================================================== +RUN cd /tmp && \ + wget https://mirrors.huaweicloud.com/python/3.11.4/Python-3.11.4.tgz && \ + tar -xzf Python-3.11.4.tgz && \ + cd Python-3.11.4 && \ + ./configure --prefix=/opt/buildtools/python3.11 \ + --with-openssl=/usr \ + --enable-loadable-sqlite-extensions \ + --enable-shared && \ + make -j $(nproc) && \ + make install && \ + chmod -R 755 /opt/buildtools/python3.11 + +# Create symbolic links for Python and pip versions +RUN ln -sf /opt/buildtools/python3.9/bin/python3.9 /usr/local/bin/python3.9 && \ + ln -sf /opt/buildtools/python3.9/bin/pip3.9 /usr/local/bin/pip3.9 +RUN ln -sf /opt/buildtools/python3.10/bin/python3.10 /usr/local/bin/python3.10 && \ + ln -sf /opt/buildtools/python3.10/bin/pip3.10 /usr/local/bin/pip3.10 +RUN ln -sf /opt/buildtools/python3.11/bin/python3.11 /usr/local/bin/python3.11 && \ + ln -sf /opt/buildtools/python3.11/bin/pip3.11 /usr/local/bin/pip3.11 + +# Set default python to python3.9 +RUN ln -sf /usr/local/bin/python3.9 /usr/bin/python3 && \ + ln -sf /usr/bin/python3 /usr/bin/python + +# Environment variables for Python installations +ENV PYTHON_PATH_3911=/opt/buildtools/python3.9 +ENV PYTHON_PATH_3102=/opt/buildtools/python3.10 +ENV PYTHON_PATH_3114=/opt/buildtools/python3.11 + +# Update library path to include Python shared libraries +ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/lib" +ENV LD_LIBRARY_PATH=$PYTHON_PATH_3911/lib:$PYTHON_PATH_3102/lib:$PYTHON_PATH_3114/lib:$LD_LIBRARY_PATH + +# Add Python binaries to PATH +ENV PATH=$PYTHON_PATH_3911/bin:$PYTHON_PATH_3102/bin:$PYTHON_PATH_3114/bin:$PATH + +# Upgrade pip and install required packages for each Python version +RUN python3.9 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn && \ + pip3.9 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ && \ + pip3.9 config set install.trusted-host pypi.tuna.tsinghua.edu.cn && \ + pip3.9 install wheel==0.36.2 six==1.10.0 + +RUN python3.10 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn && \ + pip3.10 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ && \ + pip3.10 config set install.trusted-host pypi.tuna.tsinghua.edu.cn && \ + pip3.10 install wheel==0.36.2 + +RUN python3.11 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn && \ + pip3.11 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ && \ + pip3.11 config set install.trusted-host pypi.tuna.tsinghua.edu.cn && \ + pip3.11 install wheel==0.36.2 + +# ============================================================================== +# Install Ninja 1.12.0 +# ============================================================================== +RUN cd /tmp && \ + wget -O ninja-1.12.0.tar.gz https://codeload.github.com/ninja-build/ninja/tar.gz/refs/tags/v1.12.0 && \ + tar -xvf ninja-1.12.0.tar.gz && \ + cd ninja-1.12.0 && \ + ./configure.py --bootstrap && \ + mkdir -p /opt/buildtools/ninja-1.12.0 && \ + mv ninja /opt/buildtools/ninja-1.12.0 && \ + ln -sf /opt/buildtools/ninja-1.12.0/ninja /usr/local/bin/ninja + +# ============================================================================== +# Install Bazel 6.5.0 +# ============================================================================== +RUN cd /tmp && \ + wget -O bazel https://mirrors.huaweicloud.com/bazel/6.5.0/bazel-6.5.0-linux-arm64 && \ + chmod +x bazel && \ + mv bazel /usr/local/bin/bazel + +# ============================================================================== +# Clean up temporary files (optional, to reduce image size) +# ============================================================================== +RUN sed -i "s/TMOUT=300/TMOUT=0/g" /etc/profile +ENV TMOUT=0 + +RUN rm -rf /tmp/* + +# ============================================================================== +# Jenkins environment configuration +# ============================================================================== +ARG VERSION=3107.v665000b_51092 +ARG user=jenkins +ARG group=jenkins +ARG uid=1000 +ARG gid=1000 +ARG AGENT_WORKDIR=/home/${user}/agent + +RUN curl --create-dirs -fsSLo /usr/share/jenkins/agent.jar https://repo.jenkins-ci.org/artifactory/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar \ + && chmod 755 /usr/share/jenkins \ + && chmod 644 /usr/share/jenkins/agent.jar \ + && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar + +RUN curl --create-dirs -fsSLo /usr/local/bin/jenkins-agent http://121.36.53.23/AdoptOpenJDK/jenkins-agent +#COPY jenkins-agent /usr/local/bin/jenkins-agent + +RUN chmod a+rx /usr/local/openjdk-17 \ + && chmod a+rx /usr/local/bin/jenkins-agent \ + && ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave + +RUN groupadd -g ${gid} ${group} +RUN useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} +RUN echo "${user} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + + +USER ${user} +ENV AGENT_WORKDIR=${AGENT_WORKDIR} +RUN mkdir /home/${user}/.jenkins && mkdir -p ${AGENT_WORKDIR} + +VOLUME /home/${user}/.jenkins +VOLUME ${AGENT_WORKDIR} +WORKDIR ${AGENT_WORKDIR} + + +ENTRYPOINT ["jenkins-agent"] \ No newline at end of file diff --git a/src/dockerfile/ci-yr-base-x86 b/src/dockerfile/ci-yr-base-x86 new file mode 100644 index 0000000..a419f8d --- /dev/null +++ b/src/dockerfile/ci-yr-base-x86 @@ -0,0 +1,225 @@ +# replace VERSION before run +FROM swr.cn-north-4.myhuaweicloud.com/openeuler/openjdk/OPENJDK:TAG + +# Assume all dependency packages have been copied into /tmp +# During build, ensure the following files are included: +# - OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz +# - apache-maven-3.9.11-bin.tar.gz +# - bazel-6.5.0.zip +# - go1.22.1.linux-amd64.tar.gz +# - protobuf-1.5.4.tar.gz +# - Python-3.9.11.tgz +# - Python-3.10.2.tgz +# - Python-3.11.4.tgz +# - ninja-1.12.0.tar.gz +RUN yum install -y gcc gcc-c++ git make libstdc++-devel curl libtool \ + binutils binutils-devel libcurl-devel zlib zlib-devel automake expat-devel \ + python3-pip python3-mock patch openssl openssl-devel libssh-devel libffi-devel \ + sqlite-devel bison gawk texinfo glibc glibc-devel wget bzip2-devel sudo \ + rsync nfs-utils xz libuuid unzip util-linux-devel cpio libcap-devel libatomic \ + chrpath numactl-devel openeuler-lsb libasan dos2unix net-tools pigz cmake protobuf protobuf-devel patchelf + +# Create build tools directory +RUN mkdir -p /opt/buildtools/ + +ENV LANG=C.UTF-8 + +# ============================================================================== +# Install JDK 8 +# ============================================================================== +RUN cd /tmp \ + && wget https://mirrors.huaweicloud.com/eclipse/temurin-compliance/temurin/8/jdk8u382-b05/OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz \ + && tar xf OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz -C /opt/buildtools/ + +# ============================================================================== +# Install Apache Maven +# ============================================================================== +RUN cd /tmp && \ + wget https://mirrors.huaweicloud.com/apache/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz && \ + tar xf apache-maven-3.9.11-bin.tar.gz -C /opt/buildtools/ + +# Write environment variables to /etc/profile and set ENV +RUN echo '' >> /etc/profile && \ + echo '#MAVEN_HOME' >> /etc/profile && \ + echo 'export MAVEN_HOME=/opt/buildtools/apache-maven-3.9.11' >> /etc/profile && \ + echo 'export PATH=$MAVEN_HOME/bin:$PATH' >> /etc/profile + +ENV MAVEN_HOME=/opt/buildtools/apache-maven-3.9.11 +ENV PATH=$MAVEN_HOME/bin:$PATH + +# ============================================================================== +# Install Go 1.22.1 +# ============================================================================== +RUN cd /tmp && \ + wget https://golang.google.cn/dl/go1.22.1.linux-amd64.tar.gz && \ + tar -xvf go1.22.1.linux-amd64.tar.gz && \ + mv go /opt/buildtools/golang_go-1.22.1 + +RUN mkdir -p /opt/buildtools/go_workspace && \ + chmod 755 -R /opt/buildtools/golang_go-1.22.1 && \ + chmod 777 -R /opt/buildtools/go_workspace + +ENV GOROOT=/opt/buildtools/golang_go-1.22.1 +ENV GOPATH=/opt/buildtools/go_workspace +ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH +ENV GO111MODULE=on +ENV GONOSUMDB=* + +# ============================================================================== +# Build and install protoc-gen-go (v1.5.4) +# ============================================================================== +# Set Go module proxy and paths +ENV GOPROXY=https://goproxy.cn,direct + +# Build and install protoc-gen-go +RUN cd /tmp && \ + wget -O protobuf-1.5.4.tar.gz https://codeload.github.com/golang/protobuf/tar.gz/refs/tags/v1.5.4 && \ + tar -xvf protobuf-1.5.4.tar.gz && \ + cd protobuf-1.5.4/protoc-gen-go && \ + # Enable module mode and download dependencies + GO111MODULE=on go mod download && \ + # Build and place in target directory + go build main.go + +RUN mv /tmp/protobuf-1.5.4/protoc-gen-go $GOROOT/bin/ && \ + chmod +x $GOROOT/bin/protoc-gen-go + +# ============================================================================== +# Install Python 3.9.11 +# ============================================================================== +RUN cd /tmp && \ + wget https://mirrors.huaweicloud.com/python/3.9.11/Python-3.9.11.tgz && \ + tar -xzf Python-3.9.11.tgz && \ + cd Python-3.9.11 && \ + ./configure --prefix=/opt/buildtools/python3.9 \ + --with-openssl=/usr \ + --enable-loadable-sqlite-extensions \ + --enable-shared && \ + make -j $(nproc) && \ + make install && \ + chmod -R 755 /opt/buildtools/python3.9 + +# ============================================================================== +# Install Python 3.10.2 +# ============================================================================== +RUN cd /tmp && \ + wget https://mirrors.huaweicloud.com/python/3.10.2/Python-3.10.2.tgz && \ + tar -xzf Python-3.10.2.tgz && \ + cd Python-3.10.2/ && \ + ./configure --prefix=/opt/buildtools/python3.10 \ + --with-openssl=/usr \ + --enable-loadable-sqlite-extensions \ + --enable-shared && \ + make -j $(nproc) && \ + make install && \ + chmod -R 755 /opt/buildtools/python3.10 + +# ============================================================================== +# Install Python 3.11.4 +# ============================================================================== +RUN cd /tmp && \ + wget https://mirrors.huaweicloud.com/python/3.11.4/Python-3.11.4.tgz && \ + tar -xzf Python-3.11.4.tgz && \ + cd Python-3.11.4 && \ + ./configure --prefix=/opt/buildtools/python3.11 \ + --with-openssl=/usr \ + --enable-loadable-sqlite-extensions \ + --enable-shared && \ + make -j $(nproc) && \ + make install && \ + chmod -R 755 /opt/buildtools/python3.11 + +# ============================================================================== +# Python environment configuration +# ============================================================================== +RUN ln -sf /opt/buildtools/python3.9/bin/python3.9 /usr/local/bin/python3.9 && ln -sf /opt/buildtools/python3.9/bin/pip3.9 /usr/local/bin/pip3.9 +RUN ln -sf /opt/buildtools/python3.10/bin/python3.10 /usr/local/bin/python3.10 && ln -sf /opt/buildtools/python3.10/bin/pip3.10 /usr/local/bin/pip3.10 +RUN ln -sf /opt/buildtools/python3.11/bin/python3.11 /usr/local/bin/python3.11 && ln -sf /opt/buildtools/python3.11/bin/pip3.11 /usr/local/bin/pip3.11 +RUN ln -sf /usr/local/bin/python3.9 /usr/bin/python3 && ln -sf /usr/bin/python3 /usr/bin/python + +ENV PYTHON_PATH_3911=/opt/buildtools/python3.9 +ENV PYTHON_PATH_3102=/opt/buildtools/python3.10 +ENV PYTHON_PATH_3114=/opt/buildtools/python3.11 +ENV LD_LIBRARY_PATH=$PYTHON_PATH_3911/lib:$PYTHON_PATH_3102/lib:$PYTHON_PATH_3114/lib:/usr/lib:/usr/lib64 +ENV PATH=$PYTHON_PATH_3911/bin:$PYTHON_PATH_3102/bin:$PYTHON_PATH_3114/bin:$PATH + +RUN pip3.9 config --user set global.index https://mirrors.huaweicloud.com/repository/pypi && \ + pip3.9 config --user set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple && \ + pip3.9 config --user set global.trusted-host mirrors.huaweicloud.com && \ + pip3.9 install wheel==0.36.2 six==1.10.0 + +RUN pip3.10 config --user set global.index https://mirrors.huaweicloud.com/repository/pypi && \ + pip3.10 config --user set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple && \ + pip3.10 config --user set global.trusted-host mirrors.huaweicloud.com && \ + pip3.10 install wheel==0.36.2 + +RUN pip3.11 config --user set global.index https://mirrors.huaweicloud.com/repository/pypi && \ + pip3.11 config --user set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple && \ + pip3.11 config --user set global.trusted-host mirrors.huaweicloud.com && \ + pip3.11 install wheel==0.36.2 + +# ============================================================================== +# Install Ninja 1.12.0 +# ============================================================================== +RUN cd /tmp && \ + wget -O ninja-1.12.0.tar.gz https://codeload.github.com/ninja-build/ninja/tar.gz/refs/tags/v1.12.0 && \ + tar -xvf ninja-1.12.0.tar.gz && \ + cd ninja-1.12.0 && \ + ./configure.py --bootstrap && \ + mkdir -p /opt/buildtools/ninja-1.12.0 && \ + mv ninja /opt/buildtools/ninja-1.12.0 && \ + ln -sf /opt/buildtools/ninja-1.12.0/ninja /usr/local/bin/ninja + +# ============================================================================== +# Install Bazel 6.5.0 +# ============================================================================== +RUN cd /tmp && \ + wget -O bazel https://mirrors.huaweicloud.com/bazel/6.5.0/bazel-6.5.0-linux-x86_64 && \ + chmod +x bazel && \ + mv bazel /usr/local/bin/bazel + +# ============================================================================== +# Clean up temporary files +# ============================================================================== +RUN sed -i "s/TMOUT=300/TMOUT=0/g" /etc/profile +ENV TMOUT=0 + +RUN rm -rf /tmp/* + +# ============================================================================== +# Jenkins environment configuration +# ============================================================================== +ARG VERSION=3107.v665000b_51092 +ARG user=jenkins +ARG group=jenkins +ARG uid=1000 +ARG gid=1000 +ARG AGENT_WORKDIR=/home/${user}/agent + +RUN curl --create-dirs -fsSLo /usr/share/jenkins/agent.jar https://repo.jenkins-ci.org/artifactory/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar \ + && chmod 755 /usr/share/jenkins \ + && chmod 644 /usr/share/jenkins/agent.jar \ + && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar + +RUN curl --create-dirs -fsSLo /usr/local/bin/jenkins-agent http://121.36.53.23/AdoptOpenJDK/jenkins-agent +#COPY jenkins-agent /usr/local/bin/jenkins-agent + +RUN chmod a+rx /usr/local/openjdk-17 \ + && chmod a+rx /usr/local/bin/jenkins-agent \ + && ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave + +RUN groupadd -g ${gid} ${group} +RUN useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} +RUN echo "${user} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + + +USER ${user} +ENV AGENT_WORKDIR=${AGENT_WORKDIR} +RUN mkdir /home/${user}/.jenkins && mkdir -p ${AGENT_WORKDIR} + +VOLUME /home/${user}/.jenkins +VOLUME ${AGENT_WORKDIR} +WORKDIR ${AGENT_WORKDIR} + + +ENTRYPOINT ["jenkins-agent"] \ No newline at end of file -- Gitee From 26ab05868f1937be5646c0e855dcbf5bcf1e8b24 Mon Sep 17 00:00:00 2001 From: wanghongru Date: Sat, 11 Oct 2025 14:30:27 +0800 Subject: [PATCH 2/4] add new jenkins agent dockerfile for OpenYuanRong --- src/dockerfile/ci-yr-base-arm | 54 ++++++++++++------------------- src/dockerfile/ci-yr-base-x86 | 60 ++++++++++++++--------------------- 2 files changed, 45 insertions(+), 69 deletions(-) diff --git a/src/dockerfile/ci-yr-base-arm b/src/dockerfile/ci-yr-base-arm index c331cb9..f7efa67 100644 --- a/src/dockerfile/ci-yr-base-arm +++ b/src/dockerfile/ci-yr-base-arm @@ -5,12 +5,11 @@ FROM swr.cn-north-4.myhuaweicloud.com/openeuler/openjdk/OPENJDK:TAG # - OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz # - apache-maven-3.9.11-bin.tar.gz # - bazel-6.5.0.zip -# - go1.22.1.linux-amd64.tar.gz -# - protobuf-1.5.4.tar.gz +# - go1.21.4.src.tar.gz # - Python-3.9.11.tgz # - Python-3.10.2.tgz # - Python-3.11.4.tgz -# - ninja-1.12.0.tar.gz +# - ninja-1.13.1.tar.gz RUN yum install -y gcc gcc-c++ git make libstdc++-devel curl libtool \ binutils binutils-devel libcurl-devel zlib zlib-devel automake expat-devel \ @@ -48,40 +47,28 @@ ENV MAVEN_HOME=/opt/buildtools/apache-maven-3.9.11 ENV PATH=$MAVEN_HOME/bin:$PATH # ============================================================================== -# Install Go 1.22.1 +# Install Go 1.21.4 # ============================================================================== RUN cd /tmp && \ - wget https://golang.google.cn/dl/go1.22.1.linux-arm64.tar.gz && \ - tar -xvf go1.22.1.linux-arm64.tar.gz && \ - mv go /opt/buildtools/golang_go-1.22.1 + git clone https://gitee.com/src-openeuler/golang.git -b openEuler-24.03-LTS && \ + cp /tmp/golang/go1.21.4.src.tar.gz /tmp && \ + mkdir -p /opt/buildtools/golang_go-1.21.4 && \ + tar -xvf go1.21.4.src.tar.gz && \ + cd /tmp/go/src && \ + bash make.bash && \ + mv /tmp/go /opt/buildtools/golang_go-1.21.4 && \ + yum remove -y golang RUN mkdir -p /opt/buildtools/go_workspace && \ - chmod 755 -R /opt/buildtools/golang_go-1.22.1 && \ + chmod 755 -R /opt/buildtools/golang_go-1.21.4 && \ chmod 777 -R /opt/buildtools/go_workspace -ENV GOROOT=/opt/buildtools/golang_go-1.22.1 +ENV GOROOT=/opt/buildtools/golang_go-1.21.4 ENV GOPATH=/opt/buildtools/go_workspace ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH ENV GO111MODULE=on ENV GONOSUMDB=* -# ============================================================================== -# Build and install protoc-gen-go (v1.5.4) -# ============================================================================== - -# Compile and install protoc-gen-go -RUN cd /tmp && \ - wget -O protobuf-1.5.4.tar.gz https://codeload.github.com/golang/protobuf/tar.gz/refs/tags/v1.5.4 && \ - tar -xvf protobuf-1.5.4.tar.gz && \ - cd protobuf-1.5.4/protoc-gen-go && \ - # Enable module mode and download dependencies - GO111MODULE=on go mod download && \ - # Build binary - go build main.go - -RUN mv /tmp/protobuf-1.5.4/protoc-gen-go $GOROOT/bin/ && \ - chmod +x $GOROOT/bin/protoc-gen-go - # ============================================================================== # Install Python 3.9.11 # ============================================================================== @@ -168,16 +155,17 @@ RUN python3.11 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn pip3.11 install wheel==0.36.2 # ============================================================================== -# Install Ninja 1.12.0 +# Install Ninja 1.13.1 # ============================================================================== RUN cd /tmp && \ - wget -O ninja-1.12.0.tar.gz https://codeload.github.com/ninja-build/ninja/tar.gz/refs/tags/v1.12.0 && \ - tar -xvf ninja-1.12.0.tar.gz && \ - cd ninja-1.12.0 && \ + git clone https://gitee.com/src-openeuler/ninja-build.git -b openEuler-25.09 && \ + cp /tmp/ninja-build/ninja-1.13.1.tar.gz /tmp && \ + tar -xvf ninja-1.13.1.tar.gz && \ + cd ninja-1.13.1 && \ ./configure.py --bootstrap && \ - mkdir -p /opt/buildtools/ninja-1.12.0 && \ - mv ninja /opt/buildtools/ninja-1.12.0 && \ - ln -sf /opt/buildtools/ninja-1.12.0/ninja /usr/local/bin/ninja + mkdir -p /opt/buildtools/ninja-1.13.1 && \ + mv ninja /opt/buildtools/ninja-1.13.1 && \ + ln -sf /opt/buildtools/ninja-1.13.1/ninja /usr/local/bin/ninja # ============================================================================== # Install Bazel 6.5.0 diff --git a/src/dockerfile/ci-yr-base-x86 b/src/dockerfile/ci-yr-base-x86 index a419f8d..fc73fad 100644 --- a/src/dockerfile/ci-yr-base-x86 +++ b/src/dockerfile/ci-yr-base-x86 @@ -6,18 +6,19 @@ FROM swr.cn-north-4.myhuaweicloud.com/openeuler/openjdk/OPENJDK:TAG # - OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz # - apache-maven-3.9.11-bin.tar.gz # - bazel-6.5.0.zip -# - go1.22.1.linux-amd64.tar.gz -# - protobuf-1.5.4.tar.gz +# - go1.21.4.src.tar.gz # - Python-3.9.11.tgz # - Python-3.10.2.tgz # - Python-3.11.4.tgz -# - ninja-1.12.0.tar.gz +# - ninja-1.13.1.tar.gz + RUN yum install -y gcc gcc-c++ git make libstdc++-devel curl libtool \ binutils binutils-devel libcurl-devel zlib zlib-devel automake expat-devel \ python3-pip python3-mock patch openssl openssl-devel libssh-devel libffi-devel \ sqlite-devel bison gawk texinfo glibc glibc-devel wget bzip2-devel sudo \ rsync nfs-utils xz libuuid unzip util-linux-devel cpio libcap-devel libatomic \ - chrpath numactl-devel openeuler-lsb libasan dos2unix net-tools pigz cmake protobuf protobuf-devel patchelf + chrpath numactl-devel openeuler-lsb libasan dos2unix net-tools pigz cmake \ + protobuf protobuf-devel patchelf golang # Create build tools directory RUN mkdir -p /opt/buildtools/ @@ -48,42 +49,28 @@ ENV MAVEN_HOME=/opt/buildtools/apache-maven-3.9.11 ENV PATH=$MAVEN_HOME/bin:$PATH # ============================================================================== -# Install Go 1.22.1 +# Install Go 1.21.4 # ============================================================================== RUN cd /tmp && \ - wget https://golang.google.cn/dl/go1.22.1.linux-amd64.tar.gz && \ - tar -xvf go1.22.1.linux-amd64.tar.gz && \ - mv go /opt/buildtools/golang_go-1.22.1 + git clone https://gitee.com/src-openeuler/golang.git -b openEuler-24.03-LTS && \ + cp /tmp/golang/go1.21.4.src.tar.gz /tmp && \ + mkdir -p /opt/buildtools/golang_go-1.21.4 && \ + tar -xvf go1.21.4.src.tar.gz && \ + cd /tmp/go/src && \ + bash make.bash && \ + mv /tmp/go /opt/buildtools/golang_go-1.21.4 && \ + yum remove -y golang RUN mkdir -p /opt/buildtools/go_workspace && \ - chmod 755 -R /opt/buildtools/golang_go-1.22.1 && \ + chmod 755 -R /opt/buildtools/golang_go-1.21.4 && \ chmod 777 -R /opt/buildtools/go_workspace -ENV GOROOT=/opt/buildtools/golang_go-1.22.1 +ENV GOROOT=/opt/buildtools/golang_go-1.21.4 ENV GOPATH=/opt/buildtools/go_workspace ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH ENV GO111MODULE=on ENV GONOSUMDB=* -# ============================================================================== -# Build and install protoc-gen-go (v1.5.4) -# ============================================================================== -# Set Go module proxy and paths -ENV GOPROXY=https://goproxy.cn,direct - -# Build and install protoc-gen-go -RUN cd /tmp && \ - wget -O protobuf-1.5.4.tar.gz https://codeload.github.com/golang/protobuf/tar.gz/refs/tags/v1.5.4 && \ - tar -xvf protobuf-1.5.4.tar.gz && \ - cd protobuf-1.5.4/protoc-gen-go && \ - # Enable module mode and download dependencies - GO111MODULE=on go mod download && \ - # Build and place in target directory - go build main.go - -RUN mv /tmp/protobuf-1.5.4/protoc-gen-go $GOROOT/bin/ && \ - chmod +x $GOROOT/bin/protoc-gen-go - # ============================================================================== # Install Python 3.9.11 # ============================================================================== @@ -159,16 +146,17 @@ RUN pip3.11 config --user set global.index https://mirrors.huaweicloud.com/repos pip3.11 install wheel==0.36.2 # ============================================================================== -# Install Ninja 1.12.0 +# Install Ninja 1.13.1 # ============================================================================== RUN cd /tmp && \ - wget -O ninja-1.12.0.tar.gz https://codeload.github.com/ninja-build/ninja/tar.gz/refs/tags/v1.12.0 && \ - tar -xvf ninja-1.12.0.tar.gz && \ - cd ninja-1.12.0 && \ + git clone https://gitee.com/src-openeuler/ninja-build.git -b openEuler-25.09 && \ + cp /tmp/ninja-build/ninja-1.13.1.tar.gz /tmp && \ + tar -xvf ninja-1.13.1.tar.gz && \ + cd ninja-1.13.1 && \ ./configure.py --bootstrap && \ - mkdir -p /opt/buildtools/ninja-1.12.0 && \ - mv ninja /opt/buildtools/ninja-1.12.0 && \ - ln -sf /opt/buildtools/ninja-1.12.0/ninja /usr/local/bin/ninja + mkdir -p /opt/buildtools/ninja-1.13.1 && \ + mv ninja /opt/buildtools/ninja-1.13.1 && \ + ln -sf /opt/buildtools/ninja-1.13.1/ninja /usr/local/bin/ninja # ============================================================================== # Install Bazel 6.5.0 -- Gitee From c0efcc80ccf0384e267f8d8d561eff975dfead4e Mon Sep 17 00:00:00 2001 From: wanghongru Date: Sat, 11 Oct 2025 14:33:58 +0800 Subject: [PATCH 3/4] add new jenkins agent dockerfile for OpenYuanRong --- src/dockerfile/ci-yr-base-arm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/dockerfile/ci-yr-base-arm b/src/dockerfile/ci-yr-base-arm index f7efa67..adbb918 100644 --- a/src/dockerfile/ci-yr-base-arm +++ b/src/dockerfile/ci-yr-base-arm @@ -139,19 +139,19 @@ ENV LD_LIBRARY_PATH=$PYTHON_PATH_3911/lib:$PYTHON_PATH_3102/lib:$PYTHON_PATH_311 ENV PATH=$PYTHON_PATH_3911/bin:$PYTHON_PATH_3102/bin:$PYTHON_PATH_3114/bin:$PATH # Upgrade pip and install required packages for each Python version -RUN python3.9 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn && \ - pip3.9 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ && \ - pip3.9 config set install.trusted-host pypi.tuna.tsinghua.edu.cn && \ +RUN pip3.9 config --user set global.index https://mirrors.huaweicloud.com/repository/pypi && \ + pip3.9 config --user set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple && \ + pip3.9 config --user set global.trusted-host mirrors.huaweicloud.com && \ pip3.9 install wheel==0.36.2 six==1.10.0 -RUN python3.10 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn && \ - pip3.10 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ && \ - pip3.10 config set install.trusted-host pypi.tuna.tsinghua.edu.cn && \ +RUN pip3.10 config --user set global.index https://mirrors.huaweicloud.com/repository/pypi && \ + pip3.10 config --user set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple && \ + pip3.10 config --user set global.trusted-host mirrors.huaweicloud.com && \ pip3.10 install wheel==0.36.2 -RUN python3.11 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn && \ - pip3.11 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ && \ - pip3.11 config set install.trusted-host pypi.tuna.tsinghua.edu.cn && \ +RUN pip3.11 config --user set global.index https://mirrors.huaweicloud.com/repository/pypi && \ + pip3.11 config --user set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple && \ + pip3.11 config --user set global.trusted-host mirrors.huaweicloud.com && \ pip3.11 install wheel==0.36.2 # ============================================================================== -- Gitee From 807db20cb7c8bc52b714c950ccf24a257d1ae5b5 Mon Sep 17 00:00:00 2001 From: wanghongru Date: Sat, 11 Oct 2025 14:38:34 +0800 Subject: [PATCH 4/4] add new jenkins agent dockerfile for OpenYuanRong --- src/dockerfile/ci-yr-base-arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dockerfile/ci-yr-base-arm b/src/dockerfile/ci-yr-base-arm index adbb918..5b658e5 100644 --- a/src/dockerfile/ci-yr-base-arm +++ b/src/dockerfile/ci-yr-base-arm @@ -1,4 +1,4 @@ -# 基础镜像: +# replace VERSION before run FROM swr.cn-north-4.myhuaweicloud.com/openeuler/openjdk/OPENJDK:TAG # During build, ensure the following files are included: -- Gitee