[BuildMonitor] Add new jobs named "BUILD-MONITOR" 16/96716/2
authorSungHun Hwang <sh0924.hwang@samsung.com>
Thu, 10 Nov 2016 02:54:43 +0000 (11:54 +0900)
committerSungHun Hwang <sh0924.hwang@samsung.com>
Thu, 10 Nov 2016 04:40:35 +0000 (13:40 +0900)
1. Add new jenkins job named "BUILD-MONITOR"
2. Modify the jenkins-jobs.spec
3. Needed add trigger as below (in case of using multi env)
  ex) multi env  ([PRE] Snap / [POST] Snap)
  ...
  <hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
      <filePattern>BUILD-MONITOR-*.env</filePattern>
      <noFilesFoundAction>SKIP</noFilesFoundAction>
  </hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
  ...

Change-Id: I8dfaf9d8878992b2f0b517fffdeb9c2b26cb2e3d
Signed-off-by: SungHun Hwang <sh0924.hwang@samsung.com>
jobs/BUILD-MONITOR/config.xml [new file with mode: 0644]
jobs/create-snapshot/config.xml
packaging/jenkins-jobs.spec

diff --git a/jobs/BUILD-MONITOR/config.xml b/jobs/BUILD-MONITOR/config.xml
new file mode 100644 (file)
index 0000000..35f9b61
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+  <actions/>
+  <description>This job handles the image infomation updates and image manifest creation etc.</description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.plugins.buildblocker.BuildBlockerProperty plugin="build-blocker-plugin@1.7.3">
+      <useBuildBlocker>false</useBuildBlocker>
+      <blockLevel>UNDEFINED</blockLevel>
+      <scanQueueFor>DISABLED</scanQueueFor>
+      <blockingJobs></blockingJobs>
+    </hudson.plugins.buildblocker.BuildBlockerProperty>
+    <jenkins.model.BuildDiscarderProperty>
+      <strategy class="hudson.tasks.LogRotator">
+        <daysToKeep>7</daysToKeep>
+        <numToKeep>500</numToKeep>
+        <artifactDaysToKeep>-1</artifactDaysToKeep>
+        <artifactNumToKeep>-1</artifactNumToKeep>
+      </strategy>
+    </jenkins.model.BuildDiscarderProperty>
+    <hudson.model.ParametersDefinitionProperty>
+      <parameterDefinitions>
+        <hudson.model.StringParameterDefinition>
+          <name>TRIGGER_INFO</name>
+          <description></description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+      </parameterDefinitions>
+    </hudson.model.ParametersDefinitionProperty>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <canRoam>true</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>#/bin/bash
+
+python jenkins-scripts/job_buildmonitor.py</command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers>
+    <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder plugin="groovy-postbuild@2.3.1">
+      <script plugin="script-security@1.19">
+        <script>def matcher = manager.getLogMatcher(&quot;.*\&quot;name\&quot;: (.*)\$&quot;)
+
+if(matcher?.matches()) {
+    manager.addShortText(matcher.group(1))
+}else{
+    manager.addShortText(&quot;??&quot;)
+   //manager.build.delete()
+}
+</script>
+        <sandbox>false</sandbox>
+      </script>
+      <behavior>0</behavior>
+      <runForMatrixParent>false</runForMatrixParent>
+    </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
+  </publishers>
+  <buildWrappers>
+    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.29">
+      <deleteDirs>false</deleteDirs>
+      <cleanupParameter></cleanupParameter>
+      <externalDelete></externalDelete>
+    </hudson.plugins.ws__cleanup.PreBuildCleanup>
+    <com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper plugin="copy-to-slave@1.4.4">
+      <includes>configuration, jenkins-scripts/job_buildmonitor.py, jenkins-scripts/common/*, jenkins-scripts/repomaker/*, jenkins-scripts/images/*</includes>
+      <excludes></excludes>
+      <flatten>false</flatten>
+      <includeAntExcludes>false</includeAntExcludes>
+      <hudsonHomeRelative>false</hudsonHomeRelative>
+      <relativeTo>userContent</relativeTo>
+    </com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper>
+    <EnvInjectBuildWrapper plugin="envinject@1.92.1">
+      <info>
+        <propertiesFilePath>${WORKSPACE}/configuration</propertiesFilePath>
+        <loadFilesFromMaster>false</loadFilesFromMaster>
+      </info>
+    </EnvInjectBuildWrapper>
+  </buildWrappers>
+</project>
\ No newline at end of file
index 7a3a141..fb6f1c0 100755 (executable)
           <block/>
           <buildAllNodesWithLabel>false</buildAllNodesWithLabel>
         </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+        <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+          <configs class="empty-list"/>
+          <configFactories>
+            <hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+              <filePattern>BUILD-MONITOR-*.env</filePattern>
+              <noFilesFoundAction>SKIP</noFilesFoundAction>
+            </hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+          </configFactories>
+          <projects>BUILD-MONITOR</projects>
+          <condition>ALWAYS</condition>
+          <triggerWithNoParameters>false</triggerWithNoParameters>
+          <buildAllNodesWithLabel>false</buildAllNodesWithLabel>
+        </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
       </configs>
     </hudson.plugins.parameterizedtrigger.TriggerBuilder>
     <hudson.plugins.parameterizedtrigger.TriggerBuilder plugin="parameterized-trigger@2.25">
index b0604ca..57ce8f5 100644 (file)
@@ -112,6 +112,8 @@ fi
 %config %{destdir}/check_scm_meta_git/config.xml
 %dir %{destdir}/ref-snapshot-info-update/
 %config %{destdir}/ref-snapshot-info-update/config.xml
+%dir %{destdir}/BUILD-MONITOR/
+%config %{destdir}/BUILD-MONITOR/config.xml
 
 %files common
 %defattr(-,jenkins,jenkins)