Hi jenkinytes,
I've been struggling with pushing a build a git tag when a build is
promoted. I've set up a build to be promoted when it's downstream
build succeeds, and then as the (only) promotion action I've set the
Git Publisher to push a (newly created) tag with certain name to the
repository that I checked out from in the first place. The config is
like this:
<?xml version='1.0' encoding='utf-8'?>
<hudson.plugins.promoted__builds.PromotionProcess>
<keepDependencies>false</keepDependencies>
<properties />
<scm class="hudson.scm.NullSCM" />
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</
blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</
blockBuildWhenUpstreamBuilding>
<triggers class="vector" />
<concurrentBuild>false</concurrentBuild>
<conditions>
<hudson.plugins.promoted__builds.conditions.DownstreamPassCondition>
<jobs>TestJob - test </jobs>
<evenIfUnstable>false</evenIfUnstable>
</
hudson.plugins.promoted__builds.conditions.DownstreamPassCondition>
</conditions>
<icon>star-gold</icon>
<buildSteps>
<hudson.plugins.git.GitPublisher>
<configVersion>2</configVersion>
<pushMerge>false</pushMerge>
<pushOnlyIfSuccess>false</pushOnlyIfSuccess>
<tagsToPush>
<hudson.plugins.git.GitPublisher_-TagToPush>
<targetRepoName>origin</targetRepoName>
<tagName>build-${BUILD_NUMBER}</tagName>
<createTag>true</createTag>
</hudson.plugins.git.GitPublisher_-TagToPush>
</tagsToPush>
</hudson.plugins.git.GitPublisher>
</buildSteps>
</hudson.plugins.promoted__builds.PromotionProcess>
However, when the build is promoted, the promotion action fails with
this messagen:
Legacy code started this job. No cause information is available
Building on master in workspace /home/java/.jenkins/jobs/TestJob/
workspace
Promoting TestJob - Build #47
failed build hudson.plugins.git.GitPublisher@3d9f2b SUCCESS
Finished: FAILURE
Beside that fact that it's confusing (how can it bet successfull and
still fail), I also can't figure out what the problem is, because
there is no stacktrace or anything. I know the config is good because
exactly the same setup does work if you configure it as a normal, post-
buid build publiser.
I'm using Jenkins 1.449 and the Promoted Builder plugin v.2.4
Ayone know what's going on? Any help would be much appreciated.
Regards,
Maarten