Skip to content

Commit

Permalink
feat: ci image add mysql 5.7 (#502)
Browse files Browse the repository at this point in the history
Add more tools to ci jenkins
* mysql 5.7
* percona-toolkit

Fix rust install package error
* cargo-platform v0.1.9 need rustc 1.78 or newer
  • Loading branch information
purelind authored Dec 9, 2024
1 parent 96b3d06 commit 25862e2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
30 changes: 24 additions & 6 deletions dockerfiles/ci/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,28 @@ RUN --mount=type=cache,target=/var/cache/dnf \
pip install s3cmd==2.3.0 requests==2.26.0 certifi==2021.10.8 && \
pip3 install requests==2.27.1

ENV MARIADB_VERSION=5.5.68
ENV PATH=$PATH:/usr/local/mariadb/bin
# Install MySQL 5.7
# linux amd64 only
RUN if [ "$(arch)" = "x86_64" ]; then \
echo "Detected amd64 architecture, proceeding with installation" && \
wget https://archive.mariadb.org/mariadb-${MARIADB_VERSION}/bintar-linux-systemd-x86_64/mariadb-${MARIADB_VERSION}-linux-systemd-x86_64.tar.gz && \
tar -xvf mariadb-${MARIADB_VERSION}-linux-systemd-x86_64.tar.gz && \
mv mariadb-${MARIADB_VERSION}-linux-systemd-x86_64 /usr/local/mariadb && \
rm mariadb-${MARIADB_VERSION}-linux-systemd-x86_64.tar.gz; \
dnf module disable mysql -y && \
echo '[mysql57-community]' > /etc/yum.repos.d/mysql57.repo && \
echo 'name=MySQL 5.7 Community Server' >> /etc/yum.repos.d/mysql57.repo && \
echo 'baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/' >> /etc/yum.repos.d/mysql57.repo && \
echo 'enabled=1' >> /etc/yum.repos.d/mysql57.repo && \
echo 'gpgcheck=0' >> /etc/yum.repos.d/mysql57.repo && \
dnf install -y mysql-community-server && \
dnf clean all && \
rm -rf /var/cache/dnf; \
else \
echo "Architecture not supported: $(arch)"; \
fi

# Install gbk support
RUN --mount=type=cache,target=/var/cache/dnf \
dnf install -y glibc-locale-source && \
localedef -f GBK -i zh_CN zh_CN.gbk

# install golang toolchain
# renovate: datasource=docker depName=golang
ARG GOLANG_VERSION=1.23.3
Expand Down Expand Up @@ -109,3 +118,12 @@ RUN if [ "$(arch)" = "x86_64" ]; then \
echo "Architecture not supported: $(arch)"; \
fi
ENV PATH=$PATH:/usr/local/pulsar/bin

# install percona-toolkit
# linux amd64 only
RUN if [ "$(arch)" = "x86_64" ]; then \
echo "Detected amd64 architecture, proceeding with installation" && \
dnf install -y https://repo.percona.com/testing/centos/7/RPMS/x86_64/percona-toolkit-3.0.12-1.el7.x86_64.rpm; \
else \
echo "Architecture not supported: $(arch)"; \
fi
5 changes: 4 additions & 1 deletion dockerfiles/ci/jenkins/tikv/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ ENV PATH="${CARGO_HOME}/bin:${PATH}"
# install components
RUN rustup component add rustfmt clippy rust-src llvm-tools

RUN rustup set profile minimal

# Install specific versions of cargo-nextest and cargo-sort
RUN cargo install cargo-nextest --version 0.9.72 && \
RUN rustup update stable && rustup default stable && \
cargo install cargo-nextest --version 0.9.72 && \
cargo install cargo-sort --version 1.0.9

ENV CARGO_INCREMENTAL=0

0 comments on commit 25862e2

Please sign in to comment.