From f749971087170f4dc6f8f642edb170dff9ed9698 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Mon, 14 Sep 2026 15:48:59 -0400 Subject: [PATCH] =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E6=A3=80?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f9bd85..73b2134 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,20 +39,9 @@ pipeline { // This command should run on the agent to configure the git environment sh 'git config --global url."https://github.com/".insteadOf git://github.com/' sh ''' - set -eu + set -eu - echo "=== Environment ===" - - node --version - npm --version - - corepack enable - - echo "Corepack:" - corepack --version - - echo "pnpm:" - pnpm --version + corepack enable ''' } @@ -66,10 +55,8 @@ pipeline { steps { sh ''' rm -rf node_modules - pnpm install --no-frozen-lockfile || true + pnpm install --frozen-lockfile pnpm approve-builds --all - pnpm install --no-frozen-lockfile - ''' } } @@ -91,9 +78,9 @@ pipeline { : env.BRANCH_NAME.replaceAll('/', '-') if (env.BRANCH_NAME == 'main') { - sh 'npx wrangler deploy' + sh 'pnpm exec wrangler deploy' } else { - sh "npx wrangler versions upload --preview-alias ${branchArg}" + sh "pnpm exec wrangler versions upload --preview-alias ${branchArg}" } } }