Add Gerrit Trigger on Tag Creation 89/46489/1
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 31 Oct 2017 16:53:08 +0000 (09:53 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 31 Oct 2017 16:53:08 +0000 (09:53 -0700)
We should be able to capture a tag creation event by triggering on
'ref-updated' but looking specifically at the 'refs/tags/' branch
prefix.

Though this will trigger a build against a specific tag, scripts will
still need to examine the GERRIT_REFSPEC to determine the tag name.

Change-Id: Ic18a3e11530fb71735431240f93d2074dacf4e1c
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
jjb/global/releng-macros.yml

index 59415f5..e00047b 100644 (file)
                 - compare-type: 'ANT'
                   pattern: '{files}'
 
+- trigger:
+    name: gerrit-trigger-tag-created
+    triggers:
+      - gerrit:
+          server-name: 'gerrit.opnfv.org'
+          trigger-on:
+            - ref-updated
+          projects:
+            - project-compare-type: 'ANT'
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: 'refs/tags/**'
+
 - trigger:
     name: 'experimental'
     triggers: