50bc586ec5
When configuring the trigger_builds Builder in the Jenkins web interface, you can add the parameter "Pass-through Git Commit that was built". You could not configure this in a jobs.yml. This commit adds that functionality (both to the builder "trigger_builds " and the publisher "trigger_parameterized_builds"). I still want to be backwards compatible with the old version (true/false) and maintain the similarity with the svn-revision param. Which means that you can either configure it as git-revision: true/false or git-revision: combine-queued-commits: true/false There were no prior case of shared code between builders and publishers, so (by recommendation) I put the common logic in builders.py, and then imported it in publishers.py. I added thorough tests for the feature in the builders fixtures, and only a basic test in the publishers fixtures, as suggested. Change-Id: I72cdcae3fac1094ffcc9367369556b8bcbe2d5d7
39 lines
1.5 KiB
XML
39 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<project>
|
|
<builders>
|
|
<hudson.plugins.parameterizedtrigger.TriggerBuilder>
|
|
<configs>
|
|
<hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
|
|
<configs>
|
|
<hudson.plugins.git.GitRevisionBuildParameters>
|
|
<combineQueuedCommits>true</combineQueuedCommits>
|
|
</hudson.plugins.git.GitRevisionBuildParameters>
|
|
<hudson.plugins.parameterizedtrigger.FileBuildParameters>
|
|
<propertiesFile>propfile.txt</propertiesFile>
|
|
<failTriggerOnMissing>true</failTriggerOnMissing>
|
|
</hudson.plugins.parameterizedtrigger.FileBuildParameters>
|
|
</configs>
|
|
<projects>build_started</projects>
|
|
<condition>ALWAYS</condition>
|
|
<triggerWithNoParameters>false</triggerWithNoParameters>
|
|
<buildAllNodesWithLabel>false</buildAllNodesWithLabel>
|
|
<block>
|
|
<buildStepFailureThreshold>
|
|
<name>UNSTABLE</name>
|
|
<ordinal>1</ordinal>
|
|
<color>YELLOW</color>
|
|
<completeBuild>true</completeBuild>
|
|
</buildStepFailureThreshold>
|
|
<failureThreshold>
|
|
<name>FAILURE</name>
|
|
<ordinal>2</ordinal>
|
|
<color>RED</color>
|
|
<completeBuild>true</completeBuild>
|
|
</failureThreshold>
|
|
</block>
|
|
</hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
|
|
</configs>
|
|
</hudson.plugins.parameterizedtrigger.TriggerBuilder>
|
|
</builders>
|
|
</project>
|