小编Sam*_*het的帖子

Bitbucket Pipeline:容器“构建”超出内存限制

我正在尝试为我的 Angular 应用程序运行管道,但当涉及到“npm run build”部分时,它崩溃了,失败原因是“容器“Build”超出了内存限制。” 我尝试修改 yml 文件中的内存设置,例如添加“size 2x”并更改分配给 docker 的内存量。

位桶管道.yml:

image: node:14.17.0

options:
 docker: true
 size: 2x

pipelines:
  custom:
    prod-deployment:
    - step:
        name: Build angular app
        caches:
        - node
        services:
        - docker
        size: 2x # Double resources available for this step.
        script:
        - mv .npmrc_config .npmrc
        - npm install --unsafe-perm
        - npm install -g @angular/cli@12.2.6
        - free -m
        - npm run dashboard:build
        - wget "censored for security"
        artifacts:
        - dist/**

    - step:
        name: Deploy artifacts using SCP to …
Run Code Online (Sandbox Code Playgroud)

bitbucket node.js npm bitbucket-pipelines angular

6
推荐指数
1
解决办法
4792
查看次数

标签 统计

angular ×1

bitbucket ×1

bitbucket-pipelines ×1

node.js ×1

npm ×1