Drone exec with pipeline trigger is running when it shouldn't

Hi! I have a multi-pipeline build with triggers on events. No matter what event I pass into drone exec, the first pipeline always gets called.

I’m guessing this is a side-effect of only running one pipeline at a time in the exec command. However, I would expect the triggers to still be respected.

Here’s my .drone.yml file:

kind: pipeline
name: Triggered on push
steps:
  - name: build
    image: busybox
    commands:
      - echo push
trigger:
  event:
    - push

---

kind: pipeline
name: Triggered on tag
steps:
  - name: build
    image: busybox
    commands:
      - echo tag
trigger:
  event:
    - tag

And my output:

$ drone exec --event tag
[build:0] + echo push
[build:1] push

Thoughts? Thanks.

The trigger section is only evaluated when the pipeline is executed from a webhook. When executing from the command line using drone exec the first pipeline in the configuration file is executed by default. You can alternatively execute a specific named pipeline like this:

drone exec --pipeline="Triggered on tag"

Thanks for the quick reply.