From c228095c8fe11102a8d9b9e59d644ee36b5ae74a Mon Sep 17 00:00:00 2001 From: lewis_yan Date: Tue, 31 Mar 2026 17:25:18 +0800 Subject: [PATCH] fix(jenkins): install Node.js and yarn if not present --- web/Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/Jenkinsfile b/web/Jenkinsfile index bcd85e2..e8579f1 100644 --- a/web/Jenkinsfile +++ b/web/Jenkinsfile @@ -22,6 +22,12 @@ pipeline { steps { sh """ cd web + # 安装 Node.js 和 yarn (如果不存在) + if ! command -v yarn &> /dev/null; then + curl -fsSL https://deb.nodesource.com/setup_20.x | bash - + apt-get install -y nodejs + npm install -g yarn + fi yarn install --registry=https://registry.npmmirror.com yarn build """