Add Gerrit trigger to clm job 66/8366/8
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Thu, 11 Jan 2018 20:25:34 +0000 (12:25 -0800)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Fri, 12 Jan 2018 02:31:26 +0000 (18:31 -0800)
Add Gerrit trigger on comment "run-clm" for Gerrit and Github
clm jobs.

Change-Id: I220bc93e147d278fab09420cabf7c14feb874b97
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
.jjb-test/expected-xml/gerrit-maven-maven-clm-master
.jjb-test/expected-xml/github-maven-maven-clm-master
jjb/lf-maven-jobs.yaml

index e028a8a..e029666 100644 (file)
@@ -157,6 +157,51 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
     <hudson.triggers.TimerTrigger>
       <spec>H H * * 6</spec>
     </hudson.triggers.TimerTrigger>
+    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
+      <spec/>
+      <gerritProjects>
+        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
+          <compareType>ANT</compareType>
+          <pattern>releng/ciman</pattern>
+          <branches>
+            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
+              <compareType>ANT</compareType>
+              <pattern>**/master</pattern>
+            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
+          </branches>
+          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
+        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
+      </gerritProjects>
+      <skipVote>
+        <onSuccessful>true</onSuccessful>
+        <onFailed>true</onFailed>
+        <onUnstable>true</onUnstable>
+        <onNotBuilt>true</onNotBuilt>
+      </skipVote>
+      <silentMode>false</silentMode>
+      <silentStartMode>false</silentStartMode>
+      <escapeQuotes>true</escapeQuotes>
+      <noNameAndEmailParameters>false</noNameAndEmailParameters>
+      <readableMessage>false</readableMessage>
+      <dependencyJobsNames/>
+      <notificationLevel/>
+      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
+      <triggerConfigURL/>
+      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
+      <triggerOnEvents>
+        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
+          <commentAddedCommentContains>run-clm$</commentAddedCommentContains>
+        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
+      </triggerOnEvents>
+      <buildStartMessage/>
+      <buildFailureMessage/>
+      <buildSuccessfulMessage/>
+      <buildUnstableMessage/>
+      <buildNotBuiltMessage/>
+      <buildUnsuccessfulFilepath/>
+      <customUrl/>
+      <serverName>test-server</serverName>
+    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
   </triggers>
   <builders>
     <hudson.tasks.Shell>
index ddd663c..ca73ec3 100644 (file)
@@ -149,9 +149,24 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
     </extensions>
   </scm>
   <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>H H * * 6</spec>
-    </hudson.triggers.TimerTrigger>
+    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
+      <spec/>
+      <adminlist/>
+      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
+      <whitelist/>
+      <orgslist/>
+      <cron/>
+      <triggerPhrase>^run-clm$</triggerPhrase>
+      <onlyTriggerPhrase>false</onlyTriggerPhrase>
+      <useGitHubHooks>true</useGitHubHooks>
+      <permitAll>true</permitAll>
+      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
+      <extensions>
+        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
+          <commitStatusContext>CLM</commitStatusContext>
+        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
+      </extensions>
+    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
   </triggers>
   <builders>
     <hudson.tasks.Shell>
index 8d4d837..47c2555 100644 (file)
     stream: master
     submodule-recursive: true
 
+    gerrit_clm_triggers:
+      - comment-added-contains-event:
+          comment-contains-value: run-clm$
+
     #####################
     # Job Configuration #
     #####################
     triggers:
       # Build weekly on Saturdays
       - timed: 'H H * * 6'
+      - gerrit:
+          server-name: '{gerrit-server-name}'
+          trigger-on: '{obj:gerrit_clm_triggers}'
+          projects:
+            - project-compare-type: ANT
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: ANT
+                  branch-pattern: '**/{branch}'
+          skip-vote:
+            successful: true
+            failed: true
+            unstable: true
+            notbuilt: true
 
     builders:
       - lf-maven-install:
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
+    triggers:
+      - lf-infra-github-pr-trigger:
+          trigger-phrase: '^run-clm$'
+          only-trigger-phrase: false
+          status-context: 'CLM'
+          permit-all: true
+          github-hooks: true
+          github-org: ''
+          github_pr_whitelist:
+            - ''
+          github_pr_admin_list:
+            - ''
+
 #########################
 # Maven Javadoc Publish #
 #########################