coding持续集成构建环境自定义node版本

coding持续集成构建环境自定义node版本

解决方案

只需要在构建计划的编写过程中增加一个如下的 stage,具体 nodejs 版本下载地址可参考 https://nodejs.org/en/download/releases/ 这里。

c 复制代码
    stage('toggle Node.js version') {
      steps {
        sh 'rm -rf /usr/lib/node_modules/npm/'
        dir ('/root/.cache/downloads') {
          sh 'wget -nc "https://nodejs.org/download/release/v8.17.0/node-v8.17.0-linux-x64.tar.xz" -O node-v8.17.0-linux-x64.tar.xz | true'
          sh 'tar -xf node-v8.17.0-linux-x64.tar.xz -C /usr --strip-components 1'
        }
        sh 'node -v'
      }
    }

参考

自定义版本
Previous Releases

相关推荐
MZZ骏马8 分钟前
centos7安装gcc 4.9.2
ci/cd
洋就在江州1 天前
gitlab-cicd 离线集成——springboot-cicd (非docker形式,shell形式)
java·spring boot·后端·ci/cd·gitlab·gitlab-runner
oicola1 天前
【运维】CI/CD是什么,合格的规范应该怎么设置
运维·ci/cd
tianyuanwo1 天前
【软考高级系统架构设计师】05 - DevOps & CI/CD专题备考
ci/cd·系统架构·devops
白帽攻防录4 天前
SRC 挖洞:Claude Code Action 供应链 RCE 深度复盘,CVE-2026-47751 一个 PR 怎么偷走你所有 CI/CD 密钥
网络安全·ci/cd·供应链安全
hasty5 天前
安全扫描器也要被隔离:Trivy Terraform 文件读取漏洞与 CI 输出边界
安全·ci/cd·terraform
事圆则缓6 天前
Android 使用 Jenkins 实现 CI/CD,并用 SonarQube 建立质量门禁
android·ci/cd·jenkins
行者-全栈开发9 天前
【码动四季·秋】从 commit 到发版全自动:Conventional Commits + semantic-release 发布流水线实战
git·ci/cd·自动化发布·atomgit·semantic-releas·语义化版本自动化·git 提交规范落地
Zhou14113610 天前
CICD_01_持续集成与Jenkins入门
运维·ci/cd·jenkins