Open tom-256 opened 2 months ago
What would you like to be added:
Enhance the event watcher feature to support multiple data updates in a single event registration, with the ability to associate specific data with specific file updates.
Example configuration:
eventWatcher: - matcher: name: multi-update labels: env: dev appName: helloworld handler: type: GIT_UPDATE config: replacements: - file: deployment.yaml yamlField: $.spec.template.spec.containers[0].image dataKey: image - file: config.yaml yamlField: $.data.version dataKey: version - file: ingress.yaml yamlField: $.spec.rules[0].host dataKey: hostname
Example command:
pipectl event register \ --address=CONTROL_PLANE_API_ADDRESS \ --api-key=API_KEY \ --name=multi-update \ --labels env=dev,appName=helloworld \ --data image=gcr.io/pipecd/helloworld:v0.2.0 \ --data version=1.2.3 \ --data hostname=example.com
Why is this needed:
Thank you for your great suggestion.
The (only one?) difficulty seems to be how to keep the compatibility of Event.data.
Event.data
Probably, we have two ways:
dataList []string
data
[]string
What would you like to be added:
Enhance the event watcher feature to support multiple data updates in a single event registration, with the ability to associate specific data with specific file updates.
Example configuration:
Example command:
Why is this needed: