public class ReplayAction extends Object implements Action
Run
when it could be replayed with script edits.Modifier and Type | Class and Description |
---|---|
static class |
ReplayAction.Factory |
Modifier and Type | Field and Description |
---|---|
static Permission |
REPLAY |
Modifier and Type | Method and Description |
---|---|
FormValidation |
doCheckScript() |
net.sf.json.JSON |
doCheckScriptCompile(Item job,
String value) |
void |
doRebuild(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
void |
doRun(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
static void |
ensurePermissionRegistered() |
String |
getDiff() |
String |
getDisplayName() |
String |
getIconFileName() |
Map<String,String> |
getOriginalLoadedScripts() |
String |
getOriginalScript() |
Run |
getOwner() |
String |
getUrlName() |
boolean |
isEnabled() |
boolean |
isRebuildEnabled() |
boolean |
isReplayableSandboxTest()
Runs the extra tests for replayability beyond
isEnabled() that require a blocking load of the execution. |
static String |
replace(CpsFlowExecution execution,
String clazz)
Replaces some loaded script text with something else.
|
static Set<String> |
replacementsIn(CpsFlowExecution execution)
Finds a set of Groovy class names which are eligible for replacement.
|
QueueTaskFuture |
run(String replacementMainScript,
Map<String,String> replacementLoadedScripts)
For whitebox testing.
|
Queue.Item |
run2(String replacementMainScript,
Map<String,String> replacementLoadedScripts)
For use in projects that want initiate a replay via the Java API.
|
public static final Permission REPLAY
public String getDisplayName()
getDisplayName
in interface Action
getDisplayName
in interface ModelObject
public String getIconFileName()
getIconFileName
in interface Action
public String getUrlName()
getUrlName
in interface Action
public boolean isRebuildEnabled()
public boolean isEnabled()
public boolean isReplayableSandboxTest()
isEnabled()
that require a blocking load of the execution.public String getOriginalScript()
CpsFlowExecution.getScript()
public Map<String,String> getOriginalLoadedScripts()
CpsFlowExecution.getLoadedScripts()
public Run getOwner()
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public void doRun(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public void doRebuild(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
@CheckForNull public QueueTaskFuture run(@Nonnull String replacementMainScript, @Nonnull Map<String,String> replacementLoadedScripts)
replacementMainScript
- main script; replacement for getOriginalScript()
replacementLoadedScripts
- auxiliary scripts, keyed by class name; replacement for getOriginalLoadedScripts()
@CheckForNull public Queue.Item run2(@Nonnull String replacementMainScript, @Nonnull Map<String,String> replacementLoadedScripts)
replacementMainScript
- main script; replacement for getOriginalScript()
replacementLoadedScripts
- auxiliary scripts, keyed by class name; replacement for getOriginalLoadedScripts()
@Nonnull public static Set<String> replacementsIn(@Nonnull CpsFlowExecution execution) throws IOException
execution
- the associated executionScript1
IOException
@CheckForNull public static String replace(@Nonnull CpsFlowExecution execution, @Nonnull String clazz) throws IOException
execution
- the associated executionclazz
- an entry possibly in replacementsIn(org.jenkinsci.plugins.workflow.cps.CpsFlowExecution)
IOException
public String getDiff()
public FormValidation doCheckScript()
public net.sf.json.JSON doCheckScriptCompile(@AncestorInPath Item job, @QueryParameter String value)
@Initializer(after=PLUGINS_STARTED, before=EXTENSIONS_AUGMENTED) public static void ensurePermissionRegistered()
Copyright © 2016–2020. All rights reserved.