Limit github reporting to github sources
Also limit it to the specific github host that generated the event. This
corrects an issue seen live where the github driver attempts to report
on gerrit events causing a failure, which will eject the change without
reporting it on the gerrit side.
Testing this required adding start reporters, so that a traceback in
reporting a start to the wrong driver would cause the change to get
dequeued before the jobs run, and before the success is reported.
Also a new test needed to be added to make sure multiple connections
using the github driver are able to correctly report to the right github
server.
Change-Id: Ic4630dd46d72fbeb45f691615a99ef1299a8cd05
diff --git a/tests/fixtures/layouts/reporting-multiple-github.yaml b/tests/fixtures/layouts/reporting-multiple-github.yaml
new file mode 100644
index 0000000..f14000e
--- /dev/null
+++ b/tests/fixtures/layouts/reporting-multiple-github.yaml
@@ -0,0 +1,40 @@
+- pipeline:
+ name: check
+ description: Standard check
+ manager: independent
+ trigger:
+ github:
+ - event: pull_request
+ action: opened
+ github_ent:
+ - event: pull_request
+ action: opened
+ start:
+ github:
+ status: 'pending'
+ comment: false
+ github_ent:
+ status: 'pending'
+ comment: false
+ success:
+ github:
+ status: 'success'
+ github_ent:
+ status: 'success'
+
+- job:
+ name: project1-test1
+- job:
+ name: project2-test1
+
+- project:
+ name: org/project1
+ check:
+ jobs:
+ - project1-test1
+
+- project:
+ name: org/project2
+ check:
+ jobs:
+ - project2-test2