Add new jenkins jobs 45/158145/1
authorSoonKyu Park <sk7.park@samsung.com>
Mon, 30 Oct 2017 06:00:31 +0000 (15:00 +0900)
committerSoonKyu Park <sk7.park@samsung.com>
Mon, 30 Oct 2017 06:00:31 +0000 (15:00 +0900)
gbs fullbuild snapshot creation related jenkins jobs

Change-Id: I935a0b3ab3e4520c4c82e15dc34f9e578711aea9

debian/jenkins-jobs.install
jobs/configuration
jobs/gbs-ref-fullbuild/config.xml
jobs/gbsfullbuild-buildlogs/config.xml [new file with mode: 0644]
jobs/gbsfullbuild-create-snapshot/config.xml [new file with mode: 0644]
jobs/gbsfullbuild-image-creator/config.xml [new file with mode: 0644]
packaging/jenkins-jobs.spec

index 3a7315f..8a45275 100644 (file)
@@ -58,3 +58,6 @@ submit-request-git-sync /var/lib/jenkins/jobs/
 generate_gbs_full_build_script /var/lib/jenkins/jobs/
 purge-tools-services-tester-projects /var/lib/jenkins/jobs/
 repa_auto_reject /var/lib/jenkins/jobs/
+gbsfullbuild-create-snapshot /var/lib/jenkins/jobs/
+gbsfullbuild-image-creator /var/lib/jenkins/jobs/
+gbsfullbuild-buildlogs /var/lib/jenkins/jobs/
index bb3a938..e16a740 100644 (file)
@@ -220,3 +220,4 @@ ONDEMAND_SLAVE_CONFIGURATION_ENABLED=
 ########### GBS META UPDATE related Definition##############
 GBS_META_DEFAULT_PROFILE=
 GBS_META_SUPPORT_TIZEN_VER=
+GBSFULLBUILD_DL_POSTFIX=
index d293c8e..4dc6622 100644 (file)
@@ -73,29 +73,11 @@ python ${WORKSPACE}/jenkins-scripts/job_gbs_ref_fullbuild.py</command>
           <configs class="empty-list"/>
           <configFactories>
             <hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
-              <filePattern>BUILD-MONITOR.env</filePattern>
+              <filePattern>gbsfullbuild-create-snapshot.env</filePattern>
               <noFilesFoundAction>SKIP</noFilesFoundAction>
             </hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
           </configFactories>
-          <projects>BUILD-MONITOR</projects>
-          <condition>ALWAYS</condition>
-          <triggerWithNoParameters>false</triggerWithNoParameters>
-          <triggerFromChildProjects>false</triggerFromChildProjects>
-          <buildAllNodesWithLabel>false</buildAllNodesWithLabel>
-        </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
-      </configs>
-    </hudson.plugins.parameterizedtrigger.TriggerBuilder>
-    <hudson.plugins.parameterizedtrigger.TriggerBuilder plugin="parameterized-trigger@2.33">
-      <configs>
-        <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
-          <configs class="empty-list"/>
-          <configFactories>
-            <hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
-              <filePattern>update-gbs-meta.env</filePattern>
-              <noFilesFoundAction>SKIP</noFilesFoundAction>
-            </hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
-          </configFactories>
-          <projects>update-gbs-meta</projects>
+          <projects>gbsfullbuild-create-snapshot</projects>
           <condition>ALWAYS</condition>
           <triggerWithNoParameters>false</triggerWithNoParameters>
           <triggerFromChildProjects>false</triggerFromChildProjects>
diff --git a/jobs/gbsfullbuild-buildlogs/config.xml b/jobs/gbsfullbuild-buildlogs/config.xml
new file mode 100644 (file)
index 0000000..44caf27
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+  <actions/>
+  <description>Job to collect buildlogs and sync to target snapshot, this jobs must be run on OBS server</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>2</daysToKeep>
+        <numToKeep>-1</numToKeep>
+        <artifactDaysToKeep>-1</artifactDaysToKeep>
+        <artifactNumToKeep>-1</artifactNumToKeep>
+      </strategy>
+    </jenkins.model.BuildDiscarderProperty>
+    <com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.25">
+      <autoRebuild>false</autoRebuild>
+      <rebuildDisabled>false</rebuildDisabled>
+    </com.sonyericsson.rebuild.RebuildSettings>
+    <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"/>
+  <quietPeriod>30</quietPeriod>
+  <assignedNode>download</assignedNode>
+  <canRoam>false</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>#/bin/bash
+
+python ${WORKSPACE}/jenkins-scripts/job_gbsfullbuild_buildlogs.py
+</command>
+    </hudson.tasks.Shell>
+    <hudson.plugins.parameterizedtrigger.TriggerBuilder plugin="parameterized-trigger@2.33">
+      <configs>
+        <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+          <configs class="empty-list"/>
+          <configFactories>
+            <hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+              <filePattern>make_dep_graph.env</filePattern>
+              <noFilesFoundAction>SKIP</noFilesFoundAction>
+            </hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+          </configFactories>
+          <projects>make_dep_graph</projects>
+          <condition>ALWAYS</condition>
+          <triggerWithNoParameters>false</triggerWithNoParameters>
+          <triggerFromChildProjects>false</triggerFromChildProjects>
+          <buildAllNodesWithLabel>false</buildAllNodesWithLabel>
+        </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+      </configs>
+    </hudson.plugins.parameterizedtrigger.TriggerBuilder>
+  </builders>
+  <publishers>
+    <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder plugin="groovy-postbuild@2.3.1">
+      <script plugin="script-security@1.28">
+        <script>def matcher = manager.getLogMatcher(&apos;.*&quot;build_id&quot;: &quot;(.*)&quot;.*&apos;)
+
+if(matcher?.matches()) {
+    manager.addShortText(matcher.group(1))
+}else{
+    manager.addShortText(&quot;??&quot;)
+}</script>
+        <sandbox>false</sandbox>
+      </script>
+      <behavior>0</behavior>
+      <runForMatrixParent>false</runForMatrixParent>
+    </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
+    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup@0.33">
+      <patterns class="empty-list"/>
+      <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>
+      <externalDelete></externalDelete>
+    </hudson.plugins.ws__cleanup.WsCleanup>
+  </publishers>
+  <buildWrappers>
+    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.33">
+      <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_gbsfullbuild_buildlogs.py, jenkins-scripts/common/*</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@2.1">
+      <info>
+        <propertiesFilePath>${WORKSPACE}/configuration</propertiesFilePath>
+        <secureGroovyScript plugin="script-security@1.28">
+          <script></script>
+          <sandbox>false</sandbox>
+        </secureGroovyScript>
+        <loadFilesFromMaster>false</loadFilesFromMaster>
+      </info>
+    </EnvInjectBuildWrapper>
+  </buildWrappers>
+</project>
\ No newline at end of file
diff --git a/jobs/gbsfullbuild-create-snapshot/config.xml b/jobs/gbsfullbuild-create-snapshot/config.xml
new file mode 100644 (file)
index 0000000..4279ee4
--- /dev/null
@@ -0,0 +1,173 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+  <actions/>
+  <description></description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.plugins.buildblocker.BuildBlockerProperty plugin="build-blocker-plugin@1.7.3">
+      <useBuildBlocker>true</useBuildBlocker>
+      <blockLevel>GLOBAL</blockLevel>
+      <scanQueueFor>DISABLED</scanQueueFor>
+      <blockingJobs>pre-release-create</blockingJobs>
+    </hudson.plugins.buildblocker.BuildBlockerProperty>
+    <jenkins.model.BuildDiscarderProperty>
+      <strategy class="hudson.tasks.LogRotator">
+        <daysToKeep>7</daysToKeep>
+        <numToKeep>-1</numToKeep>
+        <artifactDaysToKeep>-1</artifactDaysToKeep>
+        <artifactNumToKeep>-1</artifactNumToKeep>
+      </strategy>
+    </jenkins.model.BuildDiscarderProperty>
+    <com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.25">
+      <autoRebuild>false</autoRebuild>
+      <rebuildDisabled>false</rebuildDisabled>
+    </com.sonyericsson.rebuild.RebuildSettings>
+    <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"/>
+  <assignedNode>download</assignedNode>
+  <canRoam>false</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>true</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>export GBSFULLBUILD_SNAPSHOT=1
+python ${WORKSPACE}/jenkins-scripts/job_gbsfullbuild_create_snapshot.py</command>
+    </hudson.tasks.Shell>
+    <hudson.plugins.parameterizedtrigger.TriggerBuilder plugin="parameterized-trigger@2.33">
+      <configs>
+        <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+          <configs class="empty-list"/>
+          <configFactories>
+            <hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+              <filePattern>SLAVE_BUILDER.env</filePattern>
+              <noFilesFoundAction>SKIP</noFilesFoundAction>
+            </hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+          </configFactories>
+          <projects>ondemand_slave_control</projects>
+          <condition>ALWAYS</condition>
+          <triggerWithNoParameters>false</triggerWithNoParameters>
+          <triggerFromChildProjects>false</triggerFromChildProjects>
+          <buildAllNodesWithLabel>false</buildAllNodesWithLabel>
+        </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+      </configs>
+    </hudson.plugins.parameterizedtrigger.TriggerBuilder>
+    <hudson.plugins.parameterizedtrigger.TriggerBuilder plugin="parameterized-trigger@2.33">
+      <configs>
+        <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+          <configs class="empty-list"/>
+          <configFactories>
+            <hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+              <filePattern>gbsfullbuild_image_trigger_*.env</filePattern>
+              <noFilesFoundAction>SKIP</noFilesFoundAction>
+            </hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+          </configFactories>
+          <projects>gbsfullbuild-image-creator</projects>
+          <condition>ALWAYS</condition>
+          <triggerWithNoParameters>false</triggerWithNoParameters>
+          <triggerFromChildProjects>false</triggerFromChildProjects>
+          <block>
+            <buildStepFailureThreshold>
+              <name>FAILURE</name>
+              <ordinal>2</ordinal>
+              <color>RED</color>
+              <completeBuild>true</completeBuild>
+            </buildStepFailureThreshold>
+            <unstableThreshold>
+              <name>FAILURE</name>
+              <ordinal>2</ordinal>
+              <color>RED</color>
+              <completeBuild>true</completeBuild>
+            </unstableThreshold>
+            <failureThreshold>
+              <name>FAILURE</name>
+              <ordinal>2</ordinal>
+              <color>RED</color>
+              <completeBuild>true</completeBuild>
+            </failureThreshold>
+          </block>
+          <buildAllNodesWithLabel>false</buildAllNodesWithLabel>
+        </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+      </configs>
+    </hudson.plugins.parameterizedtrigger.TriggerBuilder>
+    <hudson.plugins.parameterizedtrigger.TriggerBuilder plugin="parameterized-trigger@2.33">
+      <configs>
+        <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+          <configs class="empty-list"/>
+          <configFactories>
+            <hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+              <filePattern>gbsfullbuild-buildlogs.env</filePattern>
+              <noFilesFoundAction>SKIP</noFilesFoundAction>
+            </hudson.plugins.parameterizedtrigger.FileBuildParameterFactory>
+          </configFactories>
+          <projects>gbsfullbuild-buildlogs</projects>
+          <condition>ALWAYS</condition>
+          <triggerWithNoParameters>false</triggerWithNoParameters>
+          <triggerFromChildProjects>false</triggerFromChildProjects>
+          <buildAllNodesWithLabel>false</buildAllNodesWithLabel>
+        </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
+      </configs>
+    </hudson.plugins.parameterizedtrigger.TriggerBuilder>
+  </builders>
+  <publishers>
+    <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder plugin="groovy-postbuild@2.3.1">
+      <script plugin="script-security@1.28">
+        <script>def matcher = manager.getLogMatcher(&quot;.*build_id=&apos;(.*)&apos;\$&quot;)
+
+if(matcher?.matches()) {
+    manager.addShortText(&quot;\n&quot;)
+    manager.addShortText(matcher.group(1))
+}else{
+    manager.addShortText(&quot;??&quot;)
+}</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.33">
+      <deleteDirs>false</deleteDirs>
+      <cleanupParameter></cleanupParameter>
+      <externalDelete></externalDelete>
+    </hudson.plugins.ws__cleanup.PreBuildCleanup>
+    <hudson.plugins.build__timeout.BuildTimeoutWrapper plugin="build-timeout@1.18">
+      <strategy class="hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy">
+        <timeoutMinutes>120</timeoutMinutes>
+      </strategy>
+      <operationList>
+        <hudson.plugins.build__timeout.operations.FailOperation/>
+      </operationList>
+    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
+    <com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper plugin="copy-to-slave@1.4.4">
+      <includes>configuration, jenkins-scripts/job_gbsfullbuild_create_snapshot.py, jenkins-scripts/common/*</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@2.1">
+      <info>
+        <propertiesFilePath>${WORKSPACE}/configuration</propertiesFilePath>
+        <secureGroovyScript plugin="script-security@1.28">
+          <script></script>
+          <sandbox>false</sandbox>
+        </secureGroovyScript>
+        <loadFilesFromMaster>false</loadFilesFromMaster>
+      </info>
+    </EnvInjectBuildWrapper>
+  </buildWrappers>
+</project>
\ No newline at end of file
diff --git a/jobs/gbsfullbuild-image-creator/config.xml b/jobs/gbsfullbuild-image-creator/config.xml
new file mode 100644 (file)
index 0000000..93eda32
--- /dev/null
@@ -0,0 +1,252 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+  <actions/>
+  <description>Image creation jobs for all kinds of images</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>
+    <com.cloudbees.plugins.JobPrerequisites plugin="slave-prerequisites@1.0">
+      <script>mnt_point_cnt=`sudo df -hT | grep /dev/loop | awk &apos;{print $1}&apos; | wc -l`
+loop_device_cnt=`sudo losetup -a | awk &apos;{print $1}&apos; | wc -l`
+if [ $mnt_point_cnt -gt 0 ]; then
+  exit 1;
+fi
+if [ $loop_device_cnt -gt 0 ]; then
+  exit 2;
+fi
+curr_free=`sudo df -h / | grep dev | awk &apos;{print $4}&apos; | sed &apos;s/[^0-9.]*//g&apos;`
+var=$(awk &apos;BEGIN{ print &quot;&apos;$curr_free&apos;&quot;&lt;&quot;&apos;3.0&apos;&quot; }&apos;)
+if [ &quot;$var&quot; -eq 1 ];then
+  exit 3;
+fi
+
+exit 0</script>
+      <interpreter>shell script</interpreter>
+    </com.cloudbees.plugins.JobPrerequisites>
+    <jenkins.model.BuildDiscarderProperty>
+      <strategy class="hudson.tasks.LogRotator">
+        <daysToKeep>3</daysToKeep>
+        <numToKeep>-1</numToKeep>
+        <artifactDaysToKeep>-1</artifactDaysToKeep>
+        <artifactNumToKeep>-1</artifactNumToKeep>
+      </strategy>
+    </jenkins.model.BuildDiscarderProperty>
+    <com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.25">
+      <autoRebuild>false</autoRebuild>
+      <rebuildDisabled>false</rebuildDisabled>
+    </com.sonyericsson.rebuild.RebuildSettings>
+    <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"/>
+  <assignedNode>imager||imager_snapshot</assignedNode>
+  <canRoam>false</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>true</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>#/bin/bash
+
+export MIC_WORK_DIR=/var/tmp/mic_$BUILD_NUMBER
+export MIC_CONF_FILE=$MIC_WORK_DIR/mic.conf
+mkdir -p $MIC_WORK_DIR
+cp /etc/mic/mic.conf $MIC_CONF_FILE
+sed -i &quot;s|^tmpdir= /var/tmp/mic|tmpdir= $MIC_WORK_DIR|g&quot; $MIC_CONF_FILE
+sed -i &quot;s|^cachedir= /var/tmp/mic/cache|cachedir= $MIC_WORK_DIR/cache|g&quot; $MIC_CONF_FILE
+sed -i &quot;s|^rootdir=/var/tmp/mic-bootstrap|rootdir= $MIC_WORK_DIR/mic-bootstrap|g&quot; $MIC_CONF_FILE
+
+python ${WORKSPACE}/jenkins-scripts/job_gbsfullbuild_image_creator.py</command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers>
+    <hudson.plugins.parameterizedtrigger.BuildTrigger plugin="parameterized-trigger@2.33">
+      <configs>
+        <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
+          <configs>
+            <hudson.plugins.parameterizedtrigger.FileBuildParameters>
+              <propertiesFile>POST-IMAGE-CREATION.env</propertiesFile>
+              <failTriggerOnMissing>true</failTriggerOnMissing>
+              <useMatrixChild>false</useMatrixChild>
+              <onlyExactRuns>false</onlyExactRuns>
+            </hudson.plugins.parameterizedtrigger.FileBuildParameters>
+          </configs>
+          <projects>post-image-creation</projects>
+          <condition>ALWAYS</condition>
+          <triggerWithNoParameters>false</triggerWithNoParameters>
+          <triggerFromChildProjects>false</triggerFromChildProjects>
+        </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
+      </configs>
+    </hudson.plugins.parameterizedtrigger.BuildTrigger>
+    <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder plugin="groovy-postbuild@2.3.1">
+      <script plugin="script-security@1.28">
+        <script>
+def now = new Date();
+def bm_start_datetime = now.format(&quot;yyyy-MM-dd HH:mm:ss.SSS&quot;, TimeZone.getTimeZone(&apos;UTC&apos;));
+
+def timeout = manager.getLogMatcher(&apos;Build timed out .*&apos;);
+def aborted = manager.getLogMatcher(&apos;Build was aborted.*&apos;);
+
+def project =  &quot;&quot;;
+def kickstart =  &quot;&quot;;
+def name =  &quot;&quot;;
+def buildid =  &quot;&quot;;
+def repo =  &quot;&quot;;
+def images_path =  &quot;&quot;;
+def download_num=  &quot;&quot;;
+def url_pub_base=  &quot;&quot;;
+def repo_path=  &quot;&quot;;
+def image_xml = &quot;&quot;;
+def status = &apos;failed&apos;;
+def bm_stage = &apos;Image&apos;;
+def bm_img_size = 0;
+
+if (timeout?.matches() &amp;&amp; aborted?.matches()) {
+  def build = Thread.currentThread().executable
+  def fileName = &quot;BUILD-MONITOR.env&quot;;
+
+  if(manager.build.workspace.isRemote()) {
+    channel = manager.build.workspace.channel;
+    file = new hudson.FilePath(channel, manager.build.workspace.toString() + &quot;/&quot; + fileName)
+  }
+  else {
+    File file = new File(build.workspace.toString() + fileName)
+  }
+
+  //File file = new File(build.workspace.toString() + &quot;/BUILD-MONITOR.env&quot;)
+
+  manager.addShortText(&apos;TimeOut&apos;);
+  project = manager.getLogMatcher(&apos;    &quot;project&quot;: &quot;(.*)&quot;.*&apos;).group(1);
+  kickstart = manager.getLogMatcher(&apos;    &quot;kickstart&quot;: &quot;(.*)&quot;.*&apos;).group(1);
+  name = manager.getLogMatcher(&apos;    &quot;name&quot;: &quot;(.*)&quot;.*&apos;).group(1);
+  buildid = manager.getLogMatcher(&apos;    &quot;buildid&quot;: &quot;(.*)&quot;.*&apos;).group(1);
+  repo = manager.getLogMatcher(&apos;    &quot;repo&quot;: &quot;(.*)&quot;.*&apos;).group(1);
+  images_path = manager.getLogMatcher(&apos;    &quot;images_path&quot;: &quot;(.*)&quot;.*&apos;).group(1);
+  download_num= manager.getLogMatcher(&apos;    &quot;download_num&quot;: (.*),.*&apos;).group(1);
+  url_pub_base= manager.getLogMatcher(&apos;    &quot;url_pub_base&quot;: &quot;(.*)&quot;.*&apos;).group(1);
+  repo_path= manager.getLogMatcher(&apos;    &quot;repo_path&quot;: &quot;(.*)&quot;.*&apos;).group(1);
+  image_xml = &quot;&quot;;
+  status = &apos;success&apos;;
+
+/*
+  // Cannot use Map type due to representation differs between groovy and python.
+  def Map fields = [
+    &quot;status&quot;: status,
+    &quot;project&quot;: project,
+    &quot;kickstart&quot;: kickstart,
+    &quot;name&quot;: name,
+    &quot;buildid&quot;: buildid,
+    &quot;repo&quot;: repo,
+    &quot;url&quot;: url_pub_base + &quot;/&quot; + repo_path + &quot;/&quot; + images_path,
+    &quot;images_path&quot;: images_path,
+    &quot;download_num&quot;: download_num,
+    &quot;image_xml&quot;: image_xml,
+    &quot;url_pub_base&quot;: url_pub_base,
+    &quot;repo_path&quot;: repo_path
+  ];
+  def Map parameter = [
+    &quot;bm_stage&quot;: &quot;Image&quot;,
+    &quot;status&quot;: status,
+    &quot;bm_img_size&quot;: 0,
+    &quot;bm_start_datetime&quot;: &quot;2017&quot;,
+    &quot;bm_end_datetime&quot;: &quot;2017&quot;,
+    &quot;build_id&quot;: buildid,
+    &quot;fields&quot;: fields
+  ];
+
+  String str_p = parameter.inspect();
+  String encoded = str_p.bytes.encodeBase64().toString();
+  file.write(&quot;TRIGGER_INFO=&quot;);
+  file.append(encoded);
+*/
+
+  now = new Date();
+  def bm_end_datetime = now.format(&quot;yyyy-MM-dd HH:mm:ss.SSS&quot;, TimeZone.getTimeZone(&apos;UTC&apos;));
+
+  // Instead print all the data as string.
+  def p_str = &apos;{&apos;;
+  p_str += &apos;&quot;status&quot;: &quot;&apos; + status + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;bm_start_datetime&quot;: &quot;&apos; + bm_start_datetime + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;bm_end_datetime&quot;: &quot;&apos; + bm_end_datetime + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;bm_stage&quot;: &quot;&apos; + bm_stage + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;bm_img_size&quot;: &quot;&apos; + bm_img_size + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;build_id&quot;: &quot;&apos; + buildid + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;fields&quot;:{&apos;;
+  p_str += &apos;&quot;status&quot;: &quot;&apos; + status + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;project&quot;: &quot;&apos; + project + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;kickstart&quot;: &quot;&apos; + kickstart + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;name&quot;: &quot;&apos; + name + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;buildid&quot;: &quot;&apos; + buildid + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;repo&quot;: &quot;&apos; + repo + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;url&quot;: &quot;&apos; + url_pub_base + &apos;/&apos; + repo_path + &apos;/&apos; + images_path + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;images_path&quot;: &quot;&apos; + images_path + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;download_num&quot;: &apos; + download_num + &apos;,&apos;;
+  p_str += &apos;&quot;image_xml&quot;: &quot;&apos; + image_xml + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;url_pub_base&quot;: &quot;&apos; + url_pub_base + &apos;&quot;,&apos;;
+  p_str += &apos;&quot;repo_path&quot;: &quot;&apos; + repo_path + &apos;&quot;&apos;;
+  p_str += &apos;}&apos;;
+  p_str += &apos;}&apos;;
+
+  String encoded = p_str.bytes.encodeBase64().toString();
+  file.write(&quot;TRIGGER_INFO=&quot; + encoded, null);
+
+} else {
+  manager.addShortText(&apos;OK&apos;);
+}
+
+</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.33">
+      <deleteDirs>false</deleteDirs>
+      <cleanupParameter></cleanupParameter>
+      <externalDelete></externalDelete>
+    </hudson.plugins.ws__cleanup.PreBuildCleanup>
+    <hudson.plugins.build__timeout.BuildTimeoutWrapper plugin="build-timeout@1.18">
+      <strategy class="hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy">
+        <timeoutMinutes>60</timeoutMinutes>
+      </strategy>
+      <operationList>
+        <hudson.plugins.build__timeout.operations.FailOperation/>
+      </operationList>
+    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
+    <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.8.8"/>
+    <com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper plugin="copy-to-slave@1.4.4">
+      <includes>configuration, jenkins-scripts/job_gbsfullbuild_image_creator.py, jenkins-scripts/common/*</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@2.1">
+      <info>
+        <propertiesFilePath>${WORKSPACE}/configuration</propertiesFilePath>
+        <secureGroovyScript plugin="script-security@1.28">
+          <script></script>
+          <sandbox>false</sandbox>
+        </secureGroovyScript>
+        <loadFilesFromMaster>false</loadFilesFromMaster>
+      </info>
+    </EnvInjectBuildWrapper>
+  </buildWrappers>
+</project>
\ No newline at end of file
index 64c70f3..c247012 100644 (file)
@@ -210,6 +210,12 @@ fi
 %config %{destdir}/purge-tools-services-tester-projects/config.xml
 %dir %{destdir}/repa_auto_reject/
 %config %{destdir}/repa_auto_reject/config.xml
+%dir %{destdir}/gbsfullbuild-create-snapshot/
+%config %{destdir}/gbsfullbuild-create-snapshot/config.xml
+%dir %{destdir}/gbsfullbuild-image-creator/
+%config %{destdir}/gbsfullbuild-image-creator/config.xml
+%dir %{destdir}/gbsfullbuild-buildlogs/
+%config %{destdir}/gbsfullbuild-buildlogs/config.xml
 
 %files common
 %defattr(-,jenkins,jenkins)