Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
Add support for combination filters
Browse files Browse the repository at this point in the history
  • Loading branch information
fredg02 committed Jan 12, 2018
1 parent 3b74876 commit 92a9ccf
Show file tree
Hide file tree
Showing 4 changed files with 565 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/resources/xsl/config.job.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<axes>
<xsl:apply-templates select="project-properties/entry [string/text() = 'axes']"/>
</axes>
<xsl:apply-templates select="project-properties/entry [string/text() = 'combinationFilter']"/>
</xsl:if>
<xsl:apply-templates select="project-properties/entry [string/text() = 'customWorkspace']"/>
<xsl:if test="/maven2-moduleset">
Expand Down Expand Up @@ -208,6 +209,13 @@
<xsl:copy-of select="*/originalValue/*" />
</xsl:template>

<!-- Combination filter -->
<xsl:template match="/*/project-properties/entry [string/text() = 'combinationFilter']">
<xsl:element name="combinationFilter">
<xsl:copy-of select="*/originalValue/text()" />
</xsl:element>
</xsl:template>

<!-- String, Int, Boolean, etc -->
<xsl:template match="/*/project-properties/entry [(*/originalValue/@class = 'string' or */originalValue/@class = 'int' or */originalValue/@class = 'boolean' or */originalValue/@class = '') and not(string/text() = 'cleanWorkspaceRequired')]">
<xsl:variable name="tagName">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,14 @@ public void configJobTest_andmore() {
transformAndCompare("andmore", "config.job.hudson", "matrix-project");
}

/**
* Tests that combination filters are transformed correctly
*/
@Test
public void configJobTest_recommenders() {
transformAndCompare("recommenders", "config.job.hudson", "matrix-project");
}

@Test
public void copyViewsTest_positive() {
testCopyViews("config.main.jenkins-cbi.xml", "config.main.hudson-cbi.xml");
Expand Down
Loading

0 comments on commit 92a9ccf

Please sign in to comment.