问题描述
在工具 wp-reactivate
的帮助下,我们有一个用 JS 编写的 wordpress 插件。
我们的目标是制作一个 GitLab CI Pipeline,在所有地方增加版本,构建项目并将其部署到 wordpress.org SVN 存储库。到目前为止,SVN 部署确实有效,增加版本号尚未实现,但我们在构建项目时遇到了问题。由于可用内存不足,GitLab CI Runner 拒绝完成该过程。
我们已经试过了(没有效果):
- 设置
GENERATE_SOURCEMAP=false
- 设置
NODE_OPTIONS="--max_old_space_size=8192"
- 运行
node --max-old-space-size=8192
我们的 .gitlab-ci.yml
文件:
stages:
- build
- deploy
default:
image: node
BuildApp:
stage: build
before_script:
- GENERATE_SOURCEMAP=false
- NODE_OPTIONS=\"--max_old_space_size=8192\"
- node --max-old-space-size=8192
script:
- yarn
- yarn prod
PluginSVN:
stage: deploy
before_script:
- apt-get install subversion
- curl -o /usr/bin/deploy.sh https://git-cdn.e15r.co/open-source/wp-org-plugin-deploy/raw/master/scripts/deploy.sh
- chmod +x /usr/bin/deploy.sh
script: /usr/bin/deploy.sh
when: on_success
有没有办法增加可用内存量,或者减少构建项目所需的内存量?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)