Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ SOFTWARE.
<artifactId>workflow-cps</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/tap4j/plugin/TapPublisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.tap4j.model.TestSet;
import org.tap4j.plugin.model.TestSetMap;
import org.tap4j.plugin.util.Constants;
import org.jenkinsci.Symbol;

import hudson.EnvVars;
import hudson.Extension;
Expand Down Expand Up @@ -582,6 +583,7 @@ public MatrixAggregator createAggregator(MatrixBuild build, Launcher launcher, B
}

@Extension
@Symbol("publishTap")
public static class DescriptorImpl extends BuildStepDescriptor<Publisher> {
public DescriptorImpl() {
super(TapPublisher.class);
Expand Down
24 changes: 24 additions & 0 deletions src/test/java/org/tap4j/plugin/TapPublisherPipelineTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.tap4j.plugin;

import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;

public class TapPublisherPipelineTest {

@Rule
public JenkinsRule j = new JenkinsRule();

@Test
public void publishTapSymbolWorks() throws Exception {
WorkflowJob job = j.createProject(WorkflowJob.class);

job.setDefinition(new CpsFlowDefinition(
"publishTap(testResults: 'test.log')",
true));

j.buildAndAssertSuccess(job);
}
}
Loading