Add new job post-image-creation
authorHasan Wan <hasan.wan@intel.com>
Tue, 20 Aug 2013 10:22:25 +0000 (13:22 +0300)
committerHasan Wan <hasan.wan@intel.com>
Wed, 21 Aug 2013 10:25:58 +0000 (13:25 +0300)
This job updates image information to OBS, generate manifest files etc

Signed-off-by: Hasan Wan <hasan.wan@intel.com>
jobs/post-image-creation/config.xml [new file with mode: 0644]
packaging/jenkins-jobs.spec

diff --git a/jobs/post-image-creation/config.xml b/jobs/post-image-creation/config.xml
new file mode 100644 (file)
index 0000000..27968e8
--- /dev/null
@@ -0,0 +1,67 @@
+<?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.queueSorter.PrioritySorterJobProperty plugin="PrioritySorter@1.3">
+      <priority>100</priority>
+    </hudson.queueSorter.PrioritySorterJobProperty>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <assignedNode>imager</assignedNode>
+  <canRoam>false</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers class="vector"/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>#/bin/bash
+
+python jenkins-scripts/job_post_image.py</command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers>
+    <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder plugin="groovy-postbuild@1.8">
+      <groovyScript>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()
+}
+</groovyScript>
+      <behavior>0</behavior>
+    </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
+    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup@0.16">
+      <deleteDirs>false</deleteDirs>
+      <skipWhenFailed>false</skipWhenFailed>
+      <cleanWhenSuccess>true</cleanWhenSuccess>
+      <cleanWhenUnstable>true</cleanWhenUnstable>
+      <cleanWhenFailure>true</cleanWhenFailure>
+      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
+      <cleanWhenAborted>true</cleanWhenAborted>
+      <notFailBuild>false</notFailBuild>
+      <cleanupMatrixParent>false</cleanupMatrixParent>
+    </hudson.plugins.ws__cleanup.WsCleanup>
+  </publishers>
+  <buildWrappers>
+    <com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper plugin="copy-to-slave@1.4">
+      <includes>configuration, jenkins-scripts/job_post_image.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.88">
+      <info>
+        <propertiesFilePath>${WORKSPACE}/configuration</propertiesFilePath>
+        <loadFilesFromMaster>false</loadFilesFromMaster>
+      </info>
+    </EnvInjectBuildWrapper>
+  </buildWrappers>
+</project>
\ No newline at end of file
index d8554cf..ca188fa 100644 (file)
@@ -58,6 +58,8 @@ cp -rf jobs/* %{buildroot}%{destdir}/
 %{destdir}/delete-tag/config.xml
 %dir %{destdir}/image-creator/
 %{destdir}/image-creator/config.xml
+%dir %{destdir}/post-image-creation/
+%{destdir}/post-image-creation/config.xml
 %dir %{destdir}/build-check/
 %{destdir}/build-check/config.xml
 %dir %{destdir}/requests/