首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用gitlab-ci.yml安装特定的节点版本?

如何使用gitlab-ci.yml安装特定的节点版本?
EN

Stack Overflow用户
提问于 2022-07-11 07:18:19
回答 1查看 223关注 0票数 0

在我的实现中,gitlab-ci.ymal如下所示

代码语言:javascript
复制
  stages:
  - lint
  - test
  - android_steps
  - ios_steps

lint:
  tags:
    - mac-osx
  stage: lint
  script:
    - ls -la "/Users/ec2-user/Library/MobileDevice/Provisioning Profiles/"
    - ls -la /Users/ec2-user/Library/Developer/Xcode/Archives
    - rm -rf /Users/ec2-user/Library/Developer/Xcode/Archives/20*/
    - ls -la /Users/ec2-user/Library/Developer/Xcode/Archives
    - npm -v
    - node -v
    - rm -rf node_modules/*/.git
    - npm install --force
    - npm run lint
    - npm run circular

test:
  tags:
    - mac-osx
  stage: test
  script:
    - npm install --force
    - npm run test -- -u --coverage --silent

我需要在哪里修改这段代码才能在VM上安装特定的Nodejs版本?

EN

回答 1

Stack Overflow用户

发布于 2022-07-11 10:12:29

只需添加:

代码语言:javascript
复制
image: node:16.16 # or full - 16.16.0

请参阅gitlab-示例/nodejs

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72934959

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档