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

相关推荐
zyl837212 小时前
前后端项目自动部署方案主流实现方案
ci/cd·gitlab·github
Patrick_Wilson19 小时前
为省一次回归测试,该不该把多个改动堆进一条分支?
git·ci/cd·架构
qq_366566501 天前
内容出海工具链搭建实战:从0到CI/CD自动化
运维·ci/cd·自动化
snow@li1 天前
CI/CD:深入理解 CI/CD(2026版)
运维·ci/cd
牛奶咖啡131 天前
CI/CD——通过Jenkins插件实现与K8s集成并部署应用到k8s集群的实践保姆级教程
ci/cd·kubernetes·jenkins·jenkins安装k8s插件·jenkins对k8s配置凭据·jenkins配置pod模板·编写流水线脚本部署应用到k8s
江华森2 天前
Jenkins CI/CD 实战博客教程
servlet·ci/cd·jenkins
Bigger2 天前
记一次坑爹的 Cloudflare Pages 部署:Failed to load module script 是怎么把我的 SPA 搞挂的
前端·ci/cd·浏览器
江华森2 天前
基于 Git 的自动集成交付(Git-Driven CI/CD)实战
git·ci/cd
夜雪闻竹2 天前
版本管理:npm 发布 + Electron 打包 + CI/CD
ci/cd·npm·node.js·代码规范·chatcrystal
Forget_85504 天前
RHEL——CICD持续集成与交付
ci/cd