Add Acumos Gerrit configuration and rebase jobs
[infra/cicd.git] / jjb / global / jjb-macros.yaml
index c80cd45a347c3e4f31aa553150b79bd713ee4c22..b96a205b0fbbf082b06da1588095161cda20b28a 100644 (file)
           default: ssh://$GERRIT_USER@gerrit.onap.org:29418
           description: SSH URL to Project Repo on ONAP Gerrit to clone repo
 
+- parameter:
+    name: acumos-gerrit-parameters
+    parameters:
+      - string:
+          name: GERRIT_USER
+          default: nordix
+          description: Non-interactive user to stream Gerrit Events on Acumos Gerrit
+      - string:
+          name: GIT_BASE_HTTPS
+          default: https://gerrit.acumos.org/r/p
+          description: HTTPS URL to Project Repo on Acumos Gerrit to clone repo
+      - string:
+          name: GIT_BASE_SSH
+          default: ssh://$GERRIT_USER@gerrit.acumos.org:29418
+          description: SSH URL to Project Repo on Acumos Gerrit to clone repo
+
 # defaults for job build history
 - property:
     name: logrotate-default
           silent: true
           silent-start: true
 
+# triggers for Acumos Gerrit
+- trigger:
+    name: acumos-gerrit-trigger-change-merged
+    triggers:
+      - gerrit:
+          server-name: 'Acumos Gerrit'
+          trigger-on:
+            - change-merged-event
+            - comment-added-contains-event:
+                comment-contains-value: 'remerge'
+          projects:
+            - project-compare-type: 'ANT'
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: '**/{branch}'
+              file-paths:
+                - compare-type: 'ANT'
+                  pattern: '{files}'
+          silent: true
+          silent-start: true
+
+
 # wrappers to use for jobs
 - wrapper:
     name: nordixinfra-jjb-creds-wrapper