node.js - 如何仅将受影响的 nx 服务部署到 GCP APP Engine

鉴于我有一个包含多个服务的 NX 应用程序,并且我想只将受影响的服务持续部署到 App Engine,我如何指向给定的 service.yaml(或多个)在项目的通用 cloudbuild.yaml 中?
monorepo 中的每个服务都有自己的 service.yaml 描述 here
前任: 我的 cloudbuild.yaml 看起来像:

steps:
- name: node
  entrypoint: npm
  args: ['install']
- name: node
  entrypoint: npm
  args: ['run', 'affected:build']
- name: 'gcr.io/cloud-builders/gcloud'
  args: ['app', 'deploy', 'dist/apps/express-app-1/service.yaml']
  timeout: '1600s'

在我的代码中,我指向特定的硬编码服务,但我需要它依赖于 nx affected:build

有没有办法做到这一点,并通过 nx build:affected 和 Cloud Build 触发器实现持续部署?

最佳答案

到目前为止,据我所知,还没有标准化或“官方的 NX”方式来做这些事情。

看看这里 discussion .到目前为止,这是我为自己找到的最佳“答案”...

也许是一个快速简单的提示:

您可以使用 print-affected 的输出在您的 CI 中,以便决定需要构建/部署哪些应用。

npx nx print-affected --type=app --select=projects

https://stackoverflow.com/questions/63529228/

相关文章:

node.js - 无法在谷歌云功能中调试 Puppeteer 超时

python - 如何在python中调整直方图上的字体大小

python - 我的碰撞函数中的 For 循环从未命中?

node.js - puppeteer overridePermissions 剪贴板读取不适用于

apache-spark - 如何在 pyspark 数据帧读取方法中包含分区列

java - Java 库导出的相对路径

python - django循环静态文件目录

ios - 快速用户界面 | onDrag - 自定义(dragItem)预览图像外观

flutter - 飞镖 :tml and dart:js not found error flut

reactjs - Expo React-Native 调试器 - 错误 : Unable to r