public class JiraUtils extends Object
Constructor and Description |
---|
JiraUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
cleanJobCacheFile(List<hudson.tasks.junit.CaseResult> testCaseResults,
Job testJob) |
static String |
createIssue(Job job,
EnvVars envVars,
hudson.tasks.junit.CaseResult test) |
static String |
createIssue(Job job,
Job project,
EnvVars envVars,
hudson.tasks.junit.CaseResult test,
JiraIssueTrigger trigger) |
static com.atlassian.jira.rest.client.api.domain.SearchResult |
findIssues(Job project,
hudson.tasks.test.TestResult test,
EnvVars envVars,
com.atlassian.jira.rest.client.api.domain.input.IssueInput issueInput)
To prevent the creation of duplicates lets see if we can find a pre-existing issue.
|
static String |
getErrorMessage(com.atlassian.jira.rest.client.api.RestClientException e,
String newLine)
Form a single string from the messages returned in a RestClientException
|
static String |
getIssueURL(String serverURL,
String issueKey)
Constructs the URL for an issue, given the server url and the issue key
|
static JiraTestDataPublisher.JiraTestDataPublisherDescriptor |
getJiraDescriptor()
Static getter for the JiraTestDataPublisherDescriptor singleton instance
|
static void |
log(String message) |
static void |
logError(String message) |
static void |
logError(String message,
Exception e) |
static void |
logWarning(String message) |
static void |
logWarning(String message,
Exception e) |
static Set<String> |
searchIssueKeys(Job job,
EnvVars envVars,
hudson.tasks.junit.CaseResult test)
Given a test case result, it searchs for all the issue keys related with it
from the local issue map or from the Jira server
|
public static String getIssueURL(String serverURL, String issueKey)
serverURL
- issueKey
- public static void log(String message)
public static void logError(String message)
public static void logWarning(String message)
public static JiraTestDataPublisher.JiraTestDataPublisherDescriptor getJiraDescriptor()
public static String getErrorMessage(com.atlassian.jira.rest.client.api.RestClientException e, String newLine)
e
- a RestClientExceptionnewLine
- string representing the new linepublic static String createIssue(Job job, EnvVars envVars, hudson.tasks.junit.CaseResult test) throws com.atlassian.jira.rest.client.api.RestClientException
com.atlassian.jira.rest.client.api.RestClientException
public static boolean cleanJobCacheFile(List<hudson.tasks.junit.CaseResult> testCaseResults, Job testJob)
public static String createIssue(Job job, Job project, EnvVars envVars, hudson.tasks.junit.CaseResult test, JiraIssueTrigger trigger) throws com.atlassian.jira.rest.client.api.RestClientException
com.atlassian.jira.rest.client.api.RestClientException
public static Set<String> searchIssueKeys(Job job, EnvVars envVars, hudson.tasks.junit.CaseResult test) throws com.atlassian.jira.rest.client.api.RestClientException
job
- envVars
- test
- com.atlassian.jira.rest.client.api.RestClientException
public static com.atlassian.jira.rest.client.api.domain.SearchResult findIssues(Job project, hudson.tasks.test.TestResult test, EnvVars envVars, com.atlassian.jira.rest.client.api.domain.input.IssueInput issueInput) throws com.atlassian.jira.rest.client.api.RestClientException
project
- the projecttest
- the testenvVars
- the environment variablescom.atlassian.jira.rest.client.api.RestClientException
Copyright © 2016–2024. All rights reserved.