google-app-engine - 如何使用 CLI 检索部署到 AppEngine 的所有 Git 提交 SHA-1 哈希?
问题描述
此处GCP 控制台的 AppEngine 部分中的“版本”页面显示了一个表格,其中包含git
commit
已为给定 AppEngine 服务部署的所有 SHA-1 哈希值。
如何使用gcloud
CLI 显示此列表?
解决方案
您可以使用CLI中的app
组生成要查找的表。gcloud
这是一个带有一些格式和 asc 的示例表。排序:
gcloud app versions list \
--format="table[box](last_deployed_time.datetime:label=DEPLOYED, version.id:label=GIT_COMMIT_HASH)" \
--service=$GAE_SERVICE_NAME \
--sort-by=DEPLOYED
#=>
┌───────────────────────────┬──────────────────────────────────────────┐
│ DEPLOYED │ GIT_COMMIT_HASH │
├───────────────────────────┼──────────────────────────────────────────┤
│ 1970-01-01 00:00:00-00:00 │ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │
│ . . . │ . . . │
│ . . . │ . . . │
│ . . . │ . . . │
│ 1970-01-01 00:00:01-00:00 │ yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy │
└───────────────────────────┴──────────────────────────────────────────┘
推荐阅读
- c++ - 使用 reference_wrappers 初始化向量
- postgresql - psycopg2:语句返回码
- vue.js - 在哪里存储多个 vue 组件使用的非常大的“blob”对象
- python - 无法将外部文件中的数据加载到 ipython 模块中
- ios - 在 Objective-C 中加载时将光标移动到预填充 Textview 的开头
- docker - 无法在 clickhouse docker 映像上运行 docker-compose push:资源被拒绝
- linux - 如何按主题编号(文件名的前缀)对文件进行排序并从中创建一个新文件夹?
- c++ - 优雅地声明 2(甚至多)维 std::arrays
- javascript - 将 FirebaseFirestore.DocumentSnapshot 转换为 Node.js 中的列表/地图
- node.js - 如何将文件(在 node.js 中)从内存保存到磁盘上的特定位置?