public class RelizaPR extends Builder implements SimpleBuildStep
Method itself does not require parameters but requires that the Flags class passed during library initialization contains these parameters.
- apiKeyId (required) - flag for instance api id.
- apiKey (required) - flag for instance api key.
- branch (required) - flag to denote name of the base branch for the pull request.
- targetBranch (required) - flag to denote name of the target branch for the pull request.
- state (required) - flag to denote state of the pull request.
- endpoint (required) - flag to denote HTML endpoint of the pull request.
- title (required) - flag to denote title of the pull request.
- number (required) - flag to denote number of the pull request.
- commits (required) - flag to denote comma seprated commit shas on this pull request (Optional when single commit flag is used).
- commits (optional) - flag to denote current commit sha of this pull request.
- createdDate (required) - flag to denote datetime when the pull request was created.
- closedDate (optional) - flag to denote datetime when the pull request was closed.
- mergedDate (optional) - flag to denote datetime when the pull request was merged.
- projectId (optional) - flag to denote project uuid. Required if organization-wide read-write key is used, ignored if project specific api key is used.
returns true if successful API call and null otherwise.
| Modifier and Type | Class and Description |
|---|---|
static class |
RelizaPR.DescriptorImpl |
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactoryBuildStep.PublisherListExtensionPoint.LegacyInstancesAreScopedToHudsonBUILDERS, PUBLISHERS| Constructor and Description |
|---|
RelizaPR()
Builder initialization with no required parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
perform(Run<?,?> run,
FilePath workspace,
EnvVars envVars,
Launcher launcher,
TaskListener listener)
Extracts project details from environment variables to send release metadata to reliza hub.
|
static String |
resolveEnvVar(String envVar,
String suffix,
EnvVars envVars)
Obtains env variable with envSuffix if it exists, otherwise obtains env variable without envSuffix.
|
void |
setbaseBranch(String baseBranch)
Optional parameter for builder initialization.
|
void |
setClosedDate(String closedDate)
Optional parameter for builder initialization.
|
void |
setCommit(String commit)
Sets up optional parameters from buildwrapper initialization.
|
void |
setCreatedDate(String createdDate)
Optional parameter for builder initialization.
|
void |
setEndpoint(String endpoint)
Optional parameter for builder initialization.
|
void |
setEnvSuffix(String envSuffix)
Sets up optional parameters from buildwrapper initialization.
|
void |
setMergedDate(String mergedDate)
Optional parameter for builder initialization.
|
void |
setNumber(String number)
Optional parameter for builder initialization.
|
void |
setProjectId(String projectId)
Optional parameter for builder initialization.
|
void |
setState(String state)
Optional parameter for builder initialization.
|
void |
setTargetBranch(String targetBranch)
Optional parameter for builder initialization.
|
void |
settitle(String title)
Optional parameter for builder initialization.
|
void |
setUri(String uri)
Optional parameter for builder initialization.
|
void |
setUseCommitList(String commits)
Sets up optional parameters from buildwrapper initialization.
|
static UUID |
toUUID(String projectId,
TaskListener listener)
String to UUID converter which handles conversion errors.
|
all, getDescriptor, getRequiredMonitorService, prebuildgetProjectAction, getProjectAction, getProjectActions, perform, perform, prebuildclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitperform, perform, requiresWorkspacegetProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild@DataBoundConstructor public RelizaPR()
@DataBoundSetter public void setTargetBranch(String targetBranch)
targetBranch - - Used set the targetBranch.@DataBoundSetter public void setbaseBranch(String baseBranch)
baseBranch - - Used set the baseBranch.@DataBoundSetter public void setState(String state)
state - - Used to override given state if needed.@DataBoundSetter public void setEndpoint(String endpoint)
endpoint - - Used to set the HTML endpoint of the PullRequest@DataBoundSetter public void settitle(String title)
title - - Used to set the title of the PullRequest@DataBoundSetter public void setNumber(String number)
number - - Used to set the title of the PullRequest@DataBoundSetter public void setProjectId(String projectId)
projectId - - UUID of project, only used when supplying custom version.@DataBoundSetter public void setUri(String uri)
uri - - Base uri of api call, only used when supplying custom version. Default set to "https://app.relizahub.com".@DataBoundSetter public void setMergedDate(String mergedDate)
mergedDate - - Used to set the datetime when the pull request was merged@DataBoundSetter public void setClosedDate(String closedDate)
closedDate - - Used to set the datetime when the pull request was closed@DataBoundSetter public void setCreatedDate(String createdDate)
createdDate - - Used to set the datetime when the pull request was created@DataBoundSetter public void setUseCommitList(String commits)
commits - - comma seprated commit shas on the pull request@DataBoundSetter public void setCommit(String commit)
commit - - current commit sha of the pull request@DataBoundSetter public void setEnvSuffix(String envSuffix)
envSuffix - - Flag which adds a suffix to all environment variables to differentiate from other withReliza calls.public void perform(Run<?,?> run, FilePath workspace, EnvVars envVars, Launcher launcher, TaskListener listener) throws InterruptedException, IOException
perform in interface SimpleBuildStepInterruptedExceptionIOExceptionpublic static UUID toUUID(String projectId, TaskListener listener)
projectId - - Project UUID.listener - - TaskListener to log specific error.public static String resolveEnvVar(String envVar, String suffix, EnvVars envVars)
envVar - - Key to resolve to a value using environment variablessuffix - - Search for environment variables with this suffixenvVars - - Map of all environment variables to search throughCopyright © 2016–2023. All rights reserved.