From 888925c75545262003c54ed2d20f970b025bea67 Mon Sep 17 00:00:00 2001 From: nanxun Date: Tue, 11 Aug 2026 23:06:07 +0800 Subject: [PATCH] ci: use pnpm lockfile and proxy BuildKit pulls --- Dockerfile | 4 ++-- Jenkinsfile | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d4090e..f03be67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ ARG DOTNET_RUNTIME_IMAGE=mcr.microsoft.com/dotnet/aspnet:6.0 FROM ${NODE_IMAGE} AS frontend-build WORKDIR /src/app -COPY app/package.json app/package-lock.json ./ -RUN npm ci +COPY app/package.json app/pnpm-lock.yaml ./ +RUN npx --yes pnpm@10.15.0 install --frozen-lockfile COPY app/ ./ RUN npm run build diff --git a/Jenkinsfile b/Jenkinsfile index d1c08e2..fb0c770 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ pipeline { OPENLIST_BASE_URL = 'https://openlist.nxsir.cn' OPENLIST_REMOTE_DIR = '/yidongpan/构建产物/douyin' HTTP_PROXY_URL = 'http://192.168.5.200:7890' - NO_PROXY_HOSTS = '127.0.0.1,localhost,reg.nxsir.cn,gitea.nxsir.cn,openlist.nxsir.cn,mcr.microsoft.com,docker.m.daocloud.io' + NO_PROXY_HOSTS = '127.0.0.1,localhost,reg.nxsir.cn,gitea.nxsir.cn,openlist.nxsir.cn,mcr.microsoft.com' BUILDER_NAME = "douyin-${BUILD_NUMBER}" DOCKER_CONFIG = "${WORKSPACE}/.ci/docker" NPM_CONFIG_CACHE = "${WORKSPACE}/.ci/npm-cache" @@ -85,7 +85,7 @@ pipeline { steps { sh ''' set -euo pipefail - npm ci --prefix app + npx --yes pnpm@10.15.0 --dir app install --frozen-lockfile npm run test:mobile-contract --prefix app npm run build --prefix app "$DOTNET" restore tests/dy.net.Tests/dy.net.Tests.csproj --disable-parallel @@ -114,7 +114,11 @@ pipeline { sh ''' set -euo pipefail ./scripts/ci-docker.sh buildx rm -f "$BUILDER_NAME" >/dev/null 2>&1 || true - ./scripts/ci-docker.sh buildx create --name "$BUILDER_NAME" --driver docker-container --driver-opt network=host --use + ./scripts/ci-docker.sh buildx create --name "$BUILDER_NAME" --driver docker-container \ + --driver-opt network=host \ + --driver-opt "env.http_proxy=$HTTP_PROXY_URL" \ + --driver-opt "env.https_proxy=$HTTP_PROXY_URL" \ + --driver-opt "env.no_proxy=$NO_PROXY_HOSTS" --use ./scripts/ci-docker.sh buildx inspect "$BUILDER_NAME" --bootstrap ./scripts/ci-docker.sh buildx build --builder "$BUILDER_NAME" --platform linux/amd64 --network host \ --progress=plain --provenance=false --no-cache --load \