Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add HM2 job

Change-Id: I43649efee8fb5d5009f593c319d4f21b3d8c9c12
  • Loading branch information...
commit 47d47e76de6e62fd98cd1256533f0fde308d0ab4 1 parent b9dbf1c
mpage authored
Showing with 127 additions and 0 deletions.
  1. +127 −0 src/jenkins_jobs/VCAP_HM2_TESTS/config.xml.erb
View
127 src/jenkins_jobs/VCAP_HM2_TESTS/config.xml.erb
@@ -0,0 +1,127 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+ <actions/>
+ <description>Health Manager v. 2.0 unit tests</description>
+ <displayName>Health Manager v2 Unit Tests</displayName>
+ <keepDependencies>false</keepDependencies>
+ <properties>
+ <hudson.plugins.throttleconcurrents.ThrottleJobProperty>
+ <maxConcurrentPerNode>0</maxConcurrentPerNode>
+ <maxConcurrentTotal>0</maxConcurrentTotal>
+ <throttleEnabled>false</throttleEnabled>
+ <throttleOption>project</throttleOption>
+ </hudson.plugins.throttleconcurrents.ThrottleJobProperty>
+ </properties>
+ <scm class="hudson.plugins.git.GitSCM">
+ <configVersion>2</configVersion>
+ <userRemoteConfigs>
+ <hudson.plugins.git.UserRemoteConfig>
+ <name></name>
+ <refspec>$GERRIT_REFSPEC</refspec>
+ <url>ssh://<%= ENV['CF_CI_USER'] %>@<%= ENV['CF_GERRIT_ADDRESS'] %>:<%= ENV['CF_GERRIT_PORT'] %>/health_manager.git</url>
+ </hudson.plugins.git.UserRemoteConfig>
+ </userRemoteConfigs>
+ <branches>
+ <hudson.plugins.git.BranchSpec>
+ <name>*/master</name>
+ </hudson.plugins.git.BranchSpec>
+ </branches>
+ <disableSubmodules>false</disableSubmodules>
+ <recursiveSubmodules>true</recursiveSubmodules>
+ <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
+ <authorOrCommitter>false</authorOrCommitter>
+ <clean>false</clean>
+ <wipeOutWorkspace>false</wipeOutWorkspace>
+ <pruneBranches>false</pruneBranches>
+ <remotePoll>false</remotePoll>
+ <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser">
+ <separator>#</separator>
+ </buildChooser>
+ <gitTool>Default</gitTool>
+ <submoduleCfg class="list"/>
+ <relativeTargetDir></relativeTargetDir>
+ <reference></reference>
+ <excludedRegions></excludedRegions>
+ <excludedUsers></excludedUsers>
+ <gitConfigName></gitConfigName>
+ <gitConfigEmail></gitConfigEmail>
+ <skipTag>false</skipTag>
+ <includedRegions></includedRegions>
+ <scmName></scmName>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>false</disabled>
+ <blockBuildWhenDownstreamBuilding>true</blockBuildWhenDownstreamBuilding>
+ <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+ <triggers class="vector">
+ <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
+ <spec></spec>
+ <gerritProjects>
+ <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
+ <compareType>PLAIN</compareType>
+ <pattern>health_manager</pattern>
+ <branches>
+ <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
+ <compareType>REG_EXP</compareType>
+ <pattern>.*</pattern>
+ </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
+ </branches>
+ </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
+ </gerritProjects>
+ <silentMode>false</silentMode>
+ <escapeQuotes>true</escapeQuotes>
+ <buildStartMessage></buildStartMessage>
+ <buildFailureMessage></buildFailureMessage>
+ <buildSuccessfulMessage></buildSuccessfulMessage>
+ <buildUnstableMessage></buildUnstableMessage>
+ <buildUnsuccessfulFilepath></buildUnsuccessfulFilepath>
+ <customUrl></customUrl>
+ </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
+ </triggers>
+ <concurrentBuild>true</concurrentBuild>
+ <builders>
+ <hudson.tasks.Shell>
+ <command>export PATH=$VCAP_RUBY19/bin:$PATH
+
+HM_DIR=$PWD
+
+rm -rvf $SPEC_DIR
+rm -rvf $PWD/tests/assets
+
+# PATHS NEEDED IN THE CONTAINER
+DEA_RUBY19_REALPATH=`readlink -nf $DEA_RUBY19`
+SQLITE_REALPATH=`readlink -nf /var/vcap/packages/sqlite`
+RUBY_BD=$DEA_RUBY19_REALPATH/bin
+SQLITE_LIB=$SQLITE_REALPATH/lib
+SQLITE_INC=$SQLITE_REALPATH/include
+GIT_REALPATH=$(readlink -nf $VCAP_GIT)
+
+TEST_RUNNER=`mktemp`
+
+cat &lt;&lt;-EOT &gt; $TEST_RUNNER
+#!/bin/bash
+set -o xtrace
+set -o errexit
+set -o nounset
+
+export PATH=$GIT_REALPATH/bin:$RUBY_BD:$PATH
+cd /tmp/health_manager
+bundle install --deployment --verbose
+bundle exec rake spec
+EOT
+
+HANDLE=`$CREATE_CONTAINER $GIT_REALPATH $DEA_RUBY19_REALPATH $SQLITE_REALPATH`
+$WARDEN_REPL -e -c &quot;
+copy $HANDLE in $HM_DIR/ /tmp/health_manager
+copy $HANDLE in $TEST_RUNNER /tmp
+run $HANDLE chmod +x $TEST_RUNNER
+run $HANDLE $TEST_RUNNER
+destroy $HANDLE
+&quot;
+
+rm -f $TEST_RUNNER</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers/>
+ <buildWrappers/>
+</project>
Please sign in to comment.
Something went wrong with that request. Please try again.