Multiple drone-agents as instance in drone pipline not working?

I install drone runner on multiple linux machine correctly and named them as run-1 and run-2 .

this is my pipline:

---
kind: pipeline
type: exec
name: running PHP API update

clone:
  disable: true

steps:
- name: update files
  commands:
  - git -C /path/to/project/ pull origin master

when:
  instance:
    include:
      - run-1
      - run-2

But, just, one instance pull my code and there is no error log.

The reason this doesn’t work is because your are not using the when.instance field correctly; it cannot be used for this purpose. If you want to route pipeline to runners, you need to use the nodes field along with runner labels (not runner names). See https://docs.drone.io/pipeline/docker/syntax/routing/

1 Like

Thanks for answer.

I change the pipeline, but problem not solved!

---
kind: pipeline
type: exec
name: running PHP API update

clone:
  disable: true

steps:
- name: update files
  commands:
  - git -C /path/to/project/ pull origin master

node:
  haram: exec

and this is the label:

DRONE_RUNNER_LABELS=haram:exec

May I ask you, send me some samples?

Thanks for your answer, May i ask you, check the result.