From fb503b7ac55e2fa4a545d460cfb4a9663580ecd7 Mon Sep 17 00:00:00 2001
From: "James E. Blair" <jeblair@redhat.com>
Date: Tue, 17 Sep 2019 14:58:44 -0700
Subject: [PATCH] Add a third-party check pipeline to OpenDev

This will use the checks API so we can perform builds of Gerrit
and related plugins.

Depends-On: https://review.opendev.org/682749
Change-Id: Iff53836aa63317f86222d3819ecd32cb590e6bba
---
 zuul.d/pipelines.yaml | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/zuul.d/pipelines.yaml b/zuul.d/pipelines.yaml
index c8e9dbf..2f2eb24 100644
--- a/zuul.d/pipelines.yaml
+++ b/zuul.d/pipelines.yaml
@@ -162,3 +162,44 @@
     failure:
       gerrit: {}
       mysql:
+
+- pipeline:
+    name: third-party-check
+    description: |
+      Newly uploaded patchsets to external projects enter this
+      pipeline to receive an initial +/-1 Verified vote.
+    manager: independent
+    trigger:
+      googlesource:
+        - event: pending-check
+          scheme: 'opendev-zuul-third-party-check'
+    enqueue:
+      googlesource:
+        checks_api:
+          scheme: 'opendev-zuul-third-party-check'
+          state: SCHEDULED
+          message: 'Change has been enqueued in check'
+    start:
+      googlesource:
+        checks_api:
+          scheme: 'opendev-zuul-third-party-check'
+          state: RUNNING
+          message: 'Jobs have started running'
+    no-jobs:
+      googlesource:
+        checks_api:
+          scheme: 'opendev-zuul-third-party-check'
+          state: NOT_RELEVANT
+          message: 'Project has no jobs configured'
+    success:
+      googlesource:
+        checks_api:
+          scheme: 'opendev-zuul-third-party-check'
+          state: SUCCESSFUL
+          message: 'Change passed all voting jobs'
+    failure:
+      googlesource:
+        checks_api:
+          scheme: 'opendev-zuul-third-party-check'
+          state: FAILED
+          message: 'Change failed'