Merge pull request #32 from chnyda/master
Add support of regex in trigger from gerrit branch
diff --git a/jenkins/files/jobs/_common.xml b/jenkins/files/jobs/_common.xml
index 7baaf40..b93135f 100644
--- a/jenkins/files/jobs/_common.xml
+++ b/jenkins/files/jobs/_common.xml
@@ -52,8 +52,13 @@
<branches>
{%- for branch in project.branches %}
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
+ {%- if branch is mapping %}
+ <compareType>{{ branch.compare_type|default("PLAIN") }}</compareType>
+ <pattern>{{ branch.name }}</pattern>
+ {%- else %}
<compareType>PLAIN</compareType>
<pattern>{{ branch }}</pattern>
+ {%- endif %}
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
{%- endfor %}
</branches>