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

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

解决方案

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

    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

相关推荐

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

    2024-02-15 18:28:02       56 阅读
  2. Perl词法作用域:定义编程环境构建

    2024-02-15 18:28:02       27 阅读
  3. Mac环境安装任意版本node

    2024-02-15 18:28:02       28 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-02-15 18:28:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-02-15 18:28:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-02-15 18:28:02       87 阅读
  4. Python语言-面向对象

    2024-02-15 18:28:02       96 阅读

热门阅读

  1. STM32 SPI

    STM32 SPI

    2024-02-15 18:28:02      41 阅读
  2. P1008 [NOIP1998 普及组] 三连击

    2024-02-15 18:28:02       51 阅读
  3. 蔚来面试解答

    2024-02-15 18:28:02       54 阅读
  4. 【在 Ubuntu 上配置 Nginx 作为 Web 服务器】

    2024-02-15 18:28:02       58 阅读
  5. Momentum2

    Momentum2

    2024-02-15 18:28:02      41 阅读
  6. C++重新入门-基本输入输出

    2024-02-15 18:28:02       48 阅读
  7. 【开源讲解】

    2024-02-15 18:28:02       51 阅读
  8. win+X无反应,开始菜单右击无反应

    2024-02-15 18:28:02       55 阅读
  9. 解决谷歌Chrome浏览器翻译:无法翻译此网页

    2024-02-15 18:28:02       50 阅读