public static interface ParameterizedJobMixIn.ParameterizedJob<JobT extends Job<JobT,RunT> & ParameterizedJobMixIn.ParameterizedJob<JobT,RunT> & Queue.Task,RunT extends Run<JobT,RunT> & Queue.Executable> extends BuildableItem
Modifier and Type | Method and Description |
---|---|
default RunT |
createExecutable()
Creates
Queue.Executable , which performs the actual execution of the task. |
default void |
doBuild(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
TimeDuration delay)
Schedules a new build command.
|
default void |
doBuildWithParameters(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
TimeDuration delay)
Supports build trigger with parameters via an HTTP GET or POST.
|
default void |
doCancelQueue(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Cancels a scheduled build.
|
default org.kohsuke.stapler.HttpResponse |
doDisable() |
default org.kohsuke.stapler.HttpResponse |
doEnable() |
default void |
doPolling(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Schedules a new SCM polling command.
|
BuildAuthorizationToken |
getAuthToken() |
default String |
getBuildNowText()
Text to display for a build button.
|
default ParameterizedJobMixIn<JobT,RunT> |
getParameterizedJobMixIn()
Creates a helper object.
|
default int |
getQuietPeriod()
Quiet period for the job.
|
Map<TriggerDescriptor,Trigger<?>> |
getTriggers()
Gets currently configured triggers.
|
default boolean |
isBuildable() |
default boolean |
isDisabled() |
default boolean |
isParameterized()
For use from
BuildButtonColumn . |
default void |
makeDisabled(boolean b)
Marks the build as disabled.
|
static ParameterizedJobMixIn.ParameterizedJob |
resolveForCLI(String name)
Used for CLI binding.
|
default boolean |
scheduleBuild()
Deprecated.
|
default boolean |
scheduleBuild(Cause c) |
default boolean |
scheduleBuild(int quietPeriod)
Deprecated.
|
default boolean |
scheduleBuild(int quietPeriod,
Cause c) |
default QueueTaskFuture<RunT> |
scheduleBuild2(int quietPeriod,
Action... actions)
Provides a standard implementation of
SCMTriggerItem.scheduleBuild2(int, hudson.model.Action...) to schedule a build with the ability to wait for its result. |
default void |
setDisabled(boolean disabled) |
default boolean |
supportsMakeDisabled()
Specifies whether this project may be disabled by the user.
|
delete, getAbsoluteUrl, getAllJobs, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch, onLoad, save
getRootDir
getSearch
getSearchIndex, getSearchName, getSearchUrl
checkPermission, getACL, hasPermission
checkAbortPermission, getCauseOfBlockage, getDefaultAuthentication, getDefaultAuthentication, getFullDisplayName, getName, getSubTasks, getUrl, getWhyBlocked, hasAbortPermission, isBuildBlocked, isConcurrentBuild
getAssignedLabel, getEstimatedDuration, getLastBuiltOn, getOwnerTask, getSameNodeConstraint
getDisplayName, getResourceList
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @CLIResolver static ParameterizedJobMixIn.ParameterizedJob resolveForCLI(String name) throws org.kohsuke.args4j.CmdLineException
org.kohsuke.args4j.CmdLineException
default ParameterizedJobMixIn<JobT,RunT> getParameterizedJobMixIn()
@CheckForNull BuildAuthorizationToken getAuthToken()
default int getQuietPeriod()
Jenkins.getQuietPeriod()
default String getBuildNowText()
ParameterizedJobMixIn.BUILD_NOW_TEXT
.ParameterizedJobMixIn.getBuildNowText()
Map<TriggerDescriptor,Trigger<?>> getTriggers()
<p:config-trigger/>
to configure them.ParameterizedJobMixIn.getTrigger(hudson.model.Job<?, ?>, java.lang.Class<T>)
@Deprecated default boolean scheduleBuild()
scheduleBuild(Cause)
scheduleBuild
in interface BuildableItem
default boolean scheduleBuild(Cause c)
scheduleBuild
in interface BuildableItem
@Deprecated default boolean scheduleBuild(int quietPeriod)
scheduleBuild(int, Cause)
scheduleBuild
in interface BuildableItem
default boolean scheduleBuild(int quietPeriod, Cause c)
scheduleBuild
in interface BuildableItem
@CheckForNull default QueueTaskFuture<RunT> scheduleBuild2(int quietPeriod, Action... actions)
SCMTriggerItem.scheduleBuild2(int, hudson.model.Action...)
to schedule a build with the ability to wait for its result.
That job method is often used during functional tests (JenkinsRule.assertBuildStatusSuccess
).quietPeriod
- seconds to wait before starting (normally 0)actions
- various actions to associate with the scheduling, such as ParametersAction
or CauseAction
default void doBuild(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
ParameterizedJobMixIn.doBuild(org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse, jenkins.util.TimeDuration)
default void doBuildWithParameters(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
ParameterizedJobMixIn.doBuildWithParameters(org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse, jenkins.util.TimeDuration)
default void doCancelQueue(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
ParameterizedJobMixIn.doCancelQueue(org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse)
default void doPolling(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
default boolean isParameterized()
BuildButtonColumn
.ParameterizedJobMixIn.isParameterized()
default boolean isDisabled()
@Restricted(value=org.kohsuke.accmod.restrictions.ProtectedExternally.class) default void setDisabled(boolean disabled)
default boolean supportsMakeDisabled()
doDisable()
and the likedefault void makeDisabled(boolean b) throws IOException
supportsMakeDisabled()
returns false. The enable command will be executed in any case.b
- true - disable, false - enableIOException
@CLIMethod(name="disable-job") default org.kohsuke.stapler.HttpResponse doDisable() throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
@CLIMethod(name="enable-job") default org.kohsuke.stapler.HttpResponse doEnable() throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
default RunT createExecutable() throws IOException
SubTask
Queue.Executable
, which performs the actual execution of the task.createExecutable
in interface SubTask
Queue.Executable
to be launched or null if the executable cannot be
created (e.g. AbstractProject
is disabled)IOException
- Queue.Executable
cannot be createddefault boolean isBuildable()
Copyright © 2004–2017. All rights reserved.