除了阶跃条件外,如何在无人机中使用cron触发器?
假设我有这个drone.yaml文件:除了阶跃条件外,如何在无人机中使用cron触发器?,cron,drone,drone.io,Cron,Drone,Drone.io,假设我有这个drone.yaml文件: kind: pipeline type: kubernetes name: default - name: echo-hello image: alpine commands: - echo "hello" when: event: - push - name: echo-goodbye image: alpine commands:
kind: pipeline
type: kubernetes
name: default
- name: echo-hello
image: alpine
commands:
- echo "hello"
when:
event:
- push
- name: echo-goodbye
image: alpine
commands:
- echo "goodbye"
when:
event:
- push
除了在每次推送时触发echo hello
和echo bye
步骤外,我还希望基于cron事件触发所有步骤。我认为将trigger
部分添加到yaml文件的底部可以达到以下目的:
trigger:
event:
- cron
cron:
- hourly
但是,当在专用步骤中时,它会忽略在下定义的条件。有人能帮我修复我的drone.yaml文件吗,这样除了步骤特定的条件外,我还可以通过cron触发