-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ci image add mysql 5.7 #502
feat: ci image add mysql 5.7 #502
Conversation
Based on the pull request title and description, the changes involve adding MySQL 5.7 and percona-toolkit to the CI Jenkins image. Looking at the diff, the changes seem straightforward and follow best practices for Dockerfile creation. However, there are a few potential issues that can be addressed in this pull request:
To address these issues, here are some suggested changes: diff --git a/dockerfiles/ci/base/Dockerfile b/dockerfiles/ci/base/Dockerfile
index 663a1193..773948e2 100644
--- a/dockerfiles/ci/base/Dockerfile
+++ b/dockerfiles/ci/base/Dockerfile
@@ -17,18 +17,21 @@ 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
-# 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; \
- 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 MySQL 5.7
+RUN 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 && \
+ rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql && \
+ dnf install -y mysql-community-server-5.7.35 && \
+ dnf clean all && \
+ rm -rf /var/cache/dnf
# install golang toolchain
# renovate: datasource=docker depName=golang
@@ -109,3 +112,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 The changes include:
Overall, the changes seem appropriate and the suggested fixes should address the potential issues. |
Based on the pull request title and description, the key changes are adding MySQL 5.7 and Percona Toolkit to the CI Jenkins image. The pull request also includes some changes to the Dockerfile to accommodate the new tools. One potential problem that I see is that the Dockerfile has some duplicated code, specifically the code that checks for the architecture and proceeds with the installation based on that. It might be better to extract that into a separate script that can be reused across multiple Dockerfiles. Another potential problem is that the code for installing MySQL 5.7 is not very explicit. It disables the existing To address these issues, I would suggest refactoring the architecture detection code into a separate script that can be reused across Dockerfiles. I would also suggest being more explicit in the code for installing MySQL 5.7 and considering alternative installation methods that might be more stable. Overall, the pull request looks good and the changes seem reasonable. |
From the pull request, the key changes made are adding MySQL 5.7 and percona-toolkit to the ci Jenkins Docker image. The pull request seems to be straightforward and does not introduce any potential problems. However, there are a few suggestions I would like to make:
Here's the modified diff for the pull request: diff --git a/dockerfiles/ci/base/Dockerfile b/dockerfiles/ci/base/Dockerfile
index 663a1193..b91a9f4e 100644
--- a/dockerfiles/ci/base/Dockerfile
+++ b/dockerfiles/ci/base/Dockerfile
@@ -17,18 +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" && \
+ dnf install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm && \
+ dnf install -y mysql-community-server && \
+ dnf clean all && \
+ rm -rf /var/cache/dnf; \
+ else \
+ echo "Architecture not supported: $(arch)"; \
+ fi
# Install golang toolchain
# renovate: datasource=docker depName=golang
ARG GOLANG_VERSION=1.23.3
RUN curl -Ls https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xz
+# Install GBK support
+RUN dnf install -y glibc-common && \
+ localedef -f GBK -i zh_CN zh_CN.gbk
+
# install pulsar
# linux amd64 only
RUN if [ "$(arch)" = "x86_64" ]; then \
echo "Detected amd64 architecture, proceeding with installation" && \
curl -Ls https://archive.apache.org/dist/pulsar/pulsar-2.9.2/apache-pulsar-2.9.2-bin.tar.gz | tar -xz && \
mv apache-pulsar-2.9.2 /usr/local/pulsar; \
else \
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 \ |
Key Changes:
Potential Problems:
Fixing suggestions:
|
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wuhuizuo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add more tools to ci jenkins
Fix rust install package error