-
Notifications
You must be signed in to change notification settings - Fork 5k
fix: update workflow reference and improve return value checks in CI scripts #34478
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d00d95c
fix: update workflow reference and improve return value checks in CI …
tomchon cc49f9f
fix: update workflow reference, improve return value checks, and opti…
tomchon 0209217
fix: Update clang-query command and remove unused scan directories
tomchon 33e88d0
fix: refine return value checks by removing unnecessary parent condit…
tomchon 2eaf18a
fix: update clang-query command to use version 16 for improved compat…
tomchon ba731ac
fix: normalize log function names in return value checks
tomchon db63df2
fix: optimize Dockerfile by refining comments and improving SSH confi…
tomchon 34a350a
fix: streamline main execution flow by removing commented code and cl…
tomchon 07e3e08
fix: correct regex case sensitivity for log and print function matches
tomchon 94f2959
fix: update Rust environment variables for improved flexibility and c…
tomchon f8bd8b2
fix: add additional Python packages for enhanced functionality in Doc…
tomchon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,94 +1,87 @@ | ||
| # Stage 1: Build Stage | ||
| FROM python:3.9 AS builder | ||
| FROM python:3.9.25 AS builder | ||
|
|
||
| # 设置工作目录 | ||
| WORKDIR /home | ||
|
|
||
| # 定义变量 | ||
| ARG INSTALLERS_DIR=installers | ||
| RUN echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list \ | ||
| && echo "deb http://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list \ | ||
| && echo "deb http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list | ||
|
|
||
| # 复制必要的文件 | ||
| COPY requirements.txt /home/ | ||
| COPY sources.list /etc/apt/ | ||
| COPY id_ecdsa /root/.ssh/id_ecdsa | ||
| COPY id_ecdsa.pub /root/.ssh/id_ecdsa.pub | ||
| COPY id_ecdsa.pub /root/.ssh/authorized_keys | ||
| COPY .gitconfig /root/.gitconfig | ||
|
|
||
| RUN rm -rf /etc/apt/sources.list.d/* | ||
|
|
||
|
|
||
| # 安装基础依赖(合并命令,减少镜像层) | ||
| RUN apt-key adv --keyserver hkp://pgpkeys.eu --recv-keys 3B4FE6ACC0B21F32 \ | ||
| && apt-key adv --keyserver hkp://pgpkeys.eu --recv-keys 871920D1991BC93C \ | ||
| && apt-get update \ | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| locales psmisc sudo tree libgeos-dev libgflags2.2 libgflags-dev ruby-full \ | ||
| libgeos-dev libgoogle-glog-dev libsnappy-dev liblzma-dev libz-dev \ | ||
| libjansson-dev zlib1g pkg-config build-essential valgrind rsync vim \ | ||
| locales psmisc sudo tree libgeos-dev libgflags-dev ruby-full \ | ||
| libgoogle-glog-dev libsnappy-dev liblzma-dev libz-dev \ | ||
| libjansson-dev zlib1g pkg-config build-essential valgrind rsync vim \ | ||
| libjemalloc-dev openssh-server screen sshpass net-tools dirmngr gnupg \ | ||
| apt-transport-https ca-certificates software-properties-common iputils-ping \ | ||
| r-base r-base-dev clang-tools-16 wget lcov \ | ||
| && wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ | ||
| && dpkg -i packages-microsoft-prod.deb \ | ||
| && rm packages-microsoft-prod.deb \ | ||
| && apt-get update \ | ||
| && apt-get install -y dotnet-sdk-6.0 \ | ||
| r-base r-base-dev clang-tools-16 wget lcov groff \ | ||
| && wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \ | ||
| && chmod +x dotnet-install.sh \ | ||
| && ./dotnet-install.sh --version 6.0.100 --install-dir /usr/share/dotnet \ | ||
| && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
| && sed -i 's/# en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen \ | ||
| && locale-gen \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # 配置 pip | ||
| RUN pip3 config set global.index-url http://admin:123456@192.168.0.212:3141/admin/dev/+simple/ \ | ||
| && pip3 config set global.trusted-host 192.168.0.212 \ | ||
| && pip3 install --no-cache-dir -r /home/requirements.txt \ | ||
| && pip3 install --no-cache-dir \ | ||
| taospy==2.8.8 taos-ws-py==0.6.5 pandas psutil codecov fabric2 requests faker simplejson toml \ | ||
| pexpect tzlocal distro decorator loguru hyperloglog websockets | ||
|
|
||
| # 安装 Go、JDK、Maven、Node.js(优化解压路径) | ||
| ADD go1.23.4.linux-amd64.tar.gz /usr/local/ | ||
| ADD jdk-8u144-linux-x64.tar.gz /usr/local/ | ||
| ADD apache-maven-3.8.4-bin.tar.gz /usr/local/ | ||
| ADD node-v20.17.0-linux-x64.tar.xz /usr/local/ | ||
| ADD cmake-3.21.5-linux-x86_64.tar.gz /usr/local/ | ||
| ADD go1.23.4.linux-amd64.tar.gz \ | ||
| jdk-8u144-linux-x64.tar.gz \ | ||
| apache-maven-3.8.4-bin.tar.gz \ | ||
| node-v20.17.0-linux-x64.tar.xz \ | ||
| cmake-3.21.5-linux-x86_64.tar.gz \ | ||
| /usr/local/ | ||
|
|
||
| # Use build-time ARGs and run-time ENVs for flexibility | ||
| ARG RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup | ||
| ARG RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static | ||
| ARG RUST_VERSION=1.90.0 | ||
|
|
||
| ENV RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" | ||
| ENV RUSTUP_DIST_SERVER="https://rsproxy.cn" | ||
| ENV RUST_VERSION=1.87.0 | ||
| ENV RUSTUP_UPDATE_ROOT=${RUSTUP_UPDATE_ROOT} | ||
| ENV RUSTUP_DIST_SERVER=${RUSTUP_DIST_SERVER} | ||
| ENV RUST_VERSION=${RUST_VERSION} | ||
|
|
||
| # 安装 Rust(优化安装过程) | ||
| RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --verbose --profile minimal --component clippy,rustfmt --default-toolchain $RUST_VERSION | ||
| COPY .cargo/config /root/.cargo/config | ||
|
|
||
| # 配置环境变量 | ||
| ENV PATH="/usr/local/go/bin:/usr/local/node-v20.17.0-linux-x64/bin:/usr/local/apache-maven-3.8.4/bin:/usr/local/jdk1.8.0_144/bin:/root/.cargo/bin:/home/bin:/usr/local/cmake-3.21.5-linux-x86_64/bin:$PATH" | ||
| ENV JAVA_HOME="/usr/local/jdk1.8.0_144" | ||
| ENV RUSTUP_DIST_SERVER="https://rsproxy.cn" RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" | ||
| RUN go env -w GOPROXY=https://goproxy.cn | ||
| ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 | ||
|
|
||
| # 配置 R 支持 Java 并安装 RJDBC | ||
| RUN R CMD javareconf JAVA_HOME=${JAVA_HOME} JAVA=${JAVA_HOME}/bin/java JAVAC=${JAVA_HOME}/bin/javac JAVAH=${JAVA_HOME}/bin/javah JAR=${JAVA_HOME}/bin/jar \ | ||
| && echo "install.packages(\"RJDBC\", repos=\"http://cran.us.r-project.org\")" | R --no-save | ||
|
|
||
| # 安装覆盖率工具 | ||
| # Install coverage tools | ||
| RUN gem install coveralls-lcov \ | ||
| && npm config -g set registry https://registry.npmmirror.com | ||
| # COPY ../.nuget /root/.nuget | ||
| # COPY ../.dotnet /root/.dotnet | ||
| # COPY ../.npm /root/.npm | ||
|
|
||
| # 配置 SSH(优化配置并设置权限) | ||
| # Configure SSH (optimize configuration and set permissions) | ||
| RUN mkdir -p /root/.ssh \ | ||
| && chmod 700 /root/.ssh \ | ||
| && echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config \ | ||
|
tomchon marked this conversation as resolved.
|
||
| && chmod 600 /root/.ssh/id_ecdsa \ | ||
| && chmod 600 /root/.ssh/authorized_keys | ||
| && chmod 600 /root/.ssh/authorized_keys \ | ||
| # for taosadapter start | ||
| && mkdir -p /etc/taos | ||
|
|
||
| RUN sh -c "rm -f /etc/localtime;ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime;echo \"Asia/Shanghai\" >/etc/timezone" | ||
|
|
||
| # 复制应用代码 | ||
| # COPY TDinternal /home/TDinternal | ||
| COPY setup.sh /home/setup.sh | ||
| RUN chmod +x /home/setup.sh | ||
| RUN chmod +x /home/setup.sh | ||
| COPY TDinternal /home/TDinternal | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.