|
<recipe plugin="[email protected]"> |
|
<id>com.github.t-yuki.gocov-xml.examples.gocov</id> |
|
<version>1.0</version> |
|
<displayName>Example gocov-xml Jenkins job with cobertura plugin for gocov project.</displayName> |
|
<description></description> |
|
<ingredients> |
|
<job> |
|
<name>gocov</name> |
|
<description></description> |
|
<definition> |
|
<project> |
|
<actions/> |
|
<description></description> |
|
<keepDependencies>false</keepDependencies> |
|
<properties> |
|
<hudson.plugins.redmine.RedmineProjectProperty plugin="[email protected]"> |
|
<projectName></projectName> |
|
<redmineVersionNumber></redmineVersionNumber> |
|
</hudson.plugins.redmine.RedmineProjectProperty> |
|
</properties> |
|
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]"> |
|
<configVersion>2</configVersion> |
|
<userRemoteConfigs> |
|
<hudson.plugins.git.UserRemoteConfig> |
|
<name></name> |
|
<refspec></refspec> |
|
<url>https://github.com/axw/gocov.git</url> |
|
</hudson.plugins.git.UserRemoteConfig> |
|
</userRemoteConfigs> |
|
<branches> |
|
<hudson.plugins.git.BranchSpec> |
|
<name>**</name> |
|
</hudson.plugins.git.BranchSpec> |
|
</branches> |
|
<disableSubmodules>false</disableSubmodules> |
|
<recursiveSubmodules>false</recursiveSubmodules> |
|
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> |
|
<authorOrCommitter>false</authorOrCommitter> |
|
<clean>false</clean> |
|
<wipeOutWorkspace>false</wipeOutWorkspace> |
|
<pruneBranches>false</pruneBranches> |
|
<remotePoll>false</remotePoll> |
|
<ignoreNotifyCommit>false</ignoreNotifyCommit> |
|
<useShallowClone>false</useShallowClone> |
|
<buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/> |
|
<gitTool>Default</gitTool> |
|
<submoduleCfg class="list"/> |
|
<relativeTargetDir>src/gocov</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>false</blockBuildWhenDownstreamBuilding> |
|
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> |
|
<triggers/> |
|
<concurrentBuild>false</concurrentBuild> |
|
<builders> |
|
<hudson.tasks.Shell> |
|
<command>mkdir -p $JENKINS_HOME/gopath |
|
export GOROOT=$JENKINS_HOME/workspace/golang |
|
export GOPATH=$JENKINS_HOME/gopath:$WORKSPACE |
|
export PATH=$PATH:$GOROOT/bin:$JENKINS_HOME/gopath/bin |
|
go get -u github.com/axw/gocov/... |
|
go get -u github.com/t-yuki/gocov-xml |
|
gocov test gocov > coverage.json |
|
sed -i -e 's|'$WORKSPACE'/||g' coverage.json |
|
gocov-xml < coverage.json > coverage.xml |
|
</command> |
|
</hudson.tasks.Shell> |
|
</builders> |
|
<publishers> |
|
<hudson.plugins.cobertura.CoberturaPublisher plugin="[email protected]"> |
|
<coberturaReportFile>coverage.xml</coberturaReportFile> |
|
<onlyStable>false</onlyStable> |
|
<failUnhealthy>false</failUnhealthy> |
|
<failUnstable>false</failUnstable> |
|
<autoUpdateHealth>false</autoUpdateHealth> |
|
<autoUpdateStability>false</autoUpdateStability> |
|
<zoomCoverageChart>false</zoomCoverageChart> |
|
<maxNumberOfBuilds>0</maxNumberOfBuilds> |
|
<failNoReports>true</failNoReports> |
|
<healthyTarget> |
|
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"> |
|
<entry> |
|
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric> |
|
<int>8000000</int> |
|
</entry> |
|
<entry> |
|
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric> |
|
<int>8000000</int> |
|
</entry> |
|
</targets> |
|
</healthyTarget> |
|
<unhealthyTarget> |
|
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"> |
|
<entry> |
|
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric> |
|
<int>0</int> |
|
</entry> |
|
<entry> |
|
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric> |
|
<int>0</int> |
|
</entry> |
|
</targets> |
|
</unhealthyTarget> |
|
<failingTarget> |
|
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"> |
|
<entry> |
|
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric> |
|
<int>0</int> |
|
</entry> |
|
<entry> |
|
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric> |
|
<int>0</int> |
|
</entry> |
|
</targets> |
|
</failingTarget> |
|
<sourceEncoding>UTF_8</sourceEncoding> |
|
</hudson.plugins.cobertura.CoberturaPublisher> |
|
</publishers> |
|
<buildWrappers/> |
|
</project> |
|
</definition> |
|
</job> |
|
</ingredients> |
|
</recipe> |