2.2. 多个 postStart 事件
在这个版本中,OpenShift Dev Spaces 在 devfile 中支持多个 postStart 事件。
注意
复合命令目前不支持作为 postStart 事件。
例 2.1. 带有两个命令作为 postStart 事件的 devfile 示例
schemaVersion: 2.1.0
metadata:
name: multi-post-start
components:
- name: tools
container:
image: quay.io/devfile/universal-developer-image
commands:
- id: first-command
exec:
component: tools
commandLine: "echo first command"
- id: second-command
exec:
component: tools
commandLine: "echo second command"
events:
postStart:
- first-command
- second-command
其他资源