Ask Your Question

Revision history [back]

how to trigger jenkins gate job when commit in git using zuul if git has sub folders?

I have one openstack project which I have to configure using zuul, jenkins-job-builder and git.

When developer commit his code, jenkins must run job which will run tests on that project for example.

I have project abc then configuration for this type of jenkins gate job is

# file: jenkins_job_builder/config/abc.yaml
- job:
    name: abc-unittests
      - gerrit-git-prep
      - shell: "./"

      - console-log

ZUUL layout config

# file: zuul/layout.yaml
- name: my/abc
      - abc-unittests
      - abc-unittests

So here my/abc is git repository. This config works fine and it will run the abc's when any developer commit its changes.

Now the problem is, abc is not a single git repository. abc has sub folders like abc/def, abc/ghi then how to configure zuul so it will trigger job for each sub folder.