#3095 Support CI trigger on commits
Merged by pingou. Opened by cverna.
cverna/pagure support_commit_trigger  into  master

Download 3095.patch

This PR adds the possibility to trigger a CI on every commit received. It is now possible in the CI settings to choose to enable the CI hook for only PRs, only commits or both.

The next steps will be to add the possibility to trigger different jobs for PRs or commits, then add a REST API to trigger the CI using a script and finally add the possibility to restrict the commit trigger on specific branch, for example only trigger on the master branch.

Note : Once these changes are deployed, it will require the current users of the hook to reconfigure the settings.

We know the currently active hooks are only active for PRs, so why not update that while we're here

rebased onto befd34ebb7b3aa1d3a1f3205fde30d42c5d36d03

used or set?

ie: I'm not quite seeing where it is set

Tests are running at: https://ci.centos.org/job/pagure-pr/69/

set is better, I ll change that.

This is where I set the value https://pagure.io/pagure/pull-request/3095#8_5

Hum, yes good thinking :smile:

Ok, I see now, thanks for the link

/me NEEDSCOFFEE

Some tests are failing :dragon_face:, so I ll fix that too

4 new commits added

  • Update documentation and DB update
  • Update the unit tests
  • Activate the CI hook with either commit or pr
  • Initial support for commit CI trigger

Tests seemed to pass on ci.centos :)

Running again at: https://ci.centos.org/job/pagure-pr/70/

Tests seemed to pass on ci.centos :)

Yes it is weird because if form.active_pr and form.active_commit here made the other hooks fail since they do not have the active_pr and active_commit attribute.

agreed, I have tests passing on ci.centos as well in another PR while they were failing locally :(

Looks fine to me, do you want to merge this as is or do you want to wait some more?

rebased onto 44c44e6c246d20c6a9af88c5ef2ab6b3826624d1

Let's merge it as it is now and I ll open another PR for the rest of the changes

Pull-Request has been merged by pingou

Metadata