Class BuildTriggerConfig
java.lang.Object
hudson.plugins.parameterizedtrigger.BuildTriggerConfig
- All Implemented Interfaces:
Describable<BuildTriggerConfig>
- Direct Known Subclasses:
BlockableBuildTriggerConfig,FileBuildTriggerConfig,PredefinedPropertiesBuildTriggerConfig
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBuildTriggerConfig(String projects, ResultCondition condition, boolean triggerWithNoParameters, List<AbstractBuildParameterFactory> configFactories, List<AbstractBuildParameters> configs) Deprecated.BuildTriggerConfig(String projects, ResultCondition condition, boolean triggerWithNoParameters, List<AbstractBuildParameterFactory> configFactories, List<AbstractBuildParameters> configs, boolean triggerFromChildProjects) BuildTriggerConfig(String projects, ResultCondition condition, boolean triggerWithNoParameters, List<AbstractBuildParameters> configs) BuildTriggerConfig(String projects, ResultCondition condition, boolean triggerWithNoParameters, List<AbstractBuildParameters> configs, boolean triggerFromChildProjects) BuildTriggerConfig(String projects, ResultCondition condition, AbstractBuildParameters... configs) BuildTriggerConfig(String projects, ResultCondition condition, List<AbstractBuildParameterFactory> configFactories, AbstractBuildParameters... configs) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanBeScheduled(Job<?, ?> job) Checks if the project is buildable.protected CausecreateUpstreamCause(Run<?, ?> build) Create UpstreamCause that triggers a downstream build.Get list of all projects, including workflow job typesgetProjectInfo(AbstractProject context) Provides a SubProjectData object containing four set, each containing projects to be displayed on the project view under 'Subprojects' section.
The first set contains fixed (statically) configured project to be trigger. The second set contains dynamically configured project, resolved by back tracking builds environment variables. The third set contains other recently triggered project found during back tracking builds The fourth set contains dynamically configured project that couldn't be resolved or project that doesn't exists.getProjectList(EnvVars env) Deprecated.getProjectList(ItemGroup context, EnvVars env) Deprecated.getProjects(EnvVars env) booleanbooleanbooleanbooleanonJobRenamed(ItemGroup context, String oldName, String newName) perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) Note that with Hudson 1.341, trigger should be usingBuildTrigger.buildDependencyGraph(AbstractProject, hudson.model.DependencyGraph).com.google.common.collect.ListMultimap<AbstractProject,QueueTaskFuture<AbstractBuild>> perform2(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) Deprecated.com.google.common.collect.ListMultimap<Job,QueueTaskFuture<AbstractBuild>> perform3(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) protected QueueTaskFutureschedule(AbstractBuild<?, ?> build, Job project, int quietPeriod, List<Action> list) protected QueueTaskFutureschedule(AbstractBuild<?, ?> build, Job project, int quietPeriod, List<Action> list, TaskListener listener) protected QueueTaskFutureschedule(AbstractBuild<?, ?> build, Job project, List<Action> list) protected QueueTaskFutureschedule(AbstractBuild<?, ?> build, Job project, List<Action> list, TaskListener listener) toString()
-
Constructor Details
-
BuildTriggerConfig
public BuildTriggerConfig(String projects, ResultCondition condition, boolean triggerWithNoParameters, List<AbstractBuildParameterFactory> configFactories, List<AbstractBuildParameters> configs, boolean triggerFromChildProjects) -
BuildTriggerConfig
@Deprecated public BuildTriggerConfig(String projects, ResultCondition condition, boolean triggerWithNoParameters, List<AbstractBuildParameterFactory> configFactories, List<AbstractBuildParameters> configs) Deprecated. -
BuildTriggerConfig
@DataBoundConstructor public BuildTriggerConfig(String projects, ResultCondition condition, boolean triggerWithNoParameters, List<AbstractBuildParameters> configs, boolean triggerFromChildProjects) -
BuildTriggerConfig
public BuildTriggerConfig(String projects, ResultCondition condition, boolean triggerWithNoParameters, List<AbstractBuildParameters> configs) -
BuildTriggerConfig
public BuildTriggerConfig(String projects, ResultCondition condition, AbstractBuildParameters... configs) -
BuildTriggerConfig
public BuildTriggerConfig(String projects, ResultCondition condition, List<AbstractBuildParameterFactory> configFactories, AbstractBuildParameters... configs)
-
-
Method Details
-
getConfigs
-
getConfigFactories
-
getProjects
-
getProjects
-
getCondition
-
getTriggerWithNoParameters
public boolean getTriggerWithNoParameters() -
isTriggerFromChildProjects
public boolean isTriggerFromChildProjects() -
getProjectList
Deprecated. -
getProjectList
Deprecated.Deprecated: get all projects that are AbstractProject instances- Parameters:
env- Environment variables from which to expand project names; Might benull.context- The container with which to resolve relative project names.
-
getJobs
Get list of all projects, including workflow job types- Parameters:
env- Environment variables from which to expand project names; Might benull.context- The container with which to resolve relative project names. If the user has noItem.READpermission, the job won't be added to the list.
-
getProjectInfo
Provides a SubProjectData object containing four set, each containing projects to be displayed on the project view under 'Subprojects' section.
- The first set contains fixed (statically) configured project to be trigger.
- The second set contains dynamically configured project, resolved by back tracking builds environment variables.
- The third set contains other recently triggered project found during back tracking builds
- The fourth set contains dynamically configured project that couldn't be resolved or project that doesn't exists.
- Parameters:
context- The container with which to resolve relative project names.- Returns:
- A data object containing sets with projects
-
perform
public List<QueueTaskFuture<AbstractBuild>> perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOExceptionNote that with Hudson 1.341, trigger should be usingBuildTrigger.buildDependencyGraph(AbstractProject, hudson.model.DependencyGraph).- Throws:
InterruptedExceptionIOException
-
perform2
@Deprecated public com.google.common.collect.ListMultimap<AbstractProject,QueueTaskFuture<AbstractBuild>> perform2(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOExceptionDeprecated.- Throws:
InterruptedExceptionIOException
-
perform3
public com.google.common.collect.ListMultimap<Job,QueueTaskFuture<AbstractBuild>> perform3(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException- Throws:
InterruptedExceptionIOException
-
createUpstreamCause
Create UpstreamCause that triggers a downstream build. If the upstream build is a promotion, return the UpstreamCause as triggered by the target of the promotion.- Parameters:
build- an upstream build- Returns:
- UpstreamCause
-
schedule
@CheckForNull @Deprecated protected QueueTaskFuture schedule(AbstractBuild<?, ?> build, Job project, int quietPeriod, List<Action> list) throws InterruptedException, IOExceptionDeprecated.- Throws:
InterruptedExceptionIOException
-
schedule
@CheckForNull protected QueueTaskFuture schedule(@NonNull AbstractBuild<?, ?> build, @NonNull Job project, int quietPeriod, @NonNull List<Action> list, @NonNull TaskListener listener) throws InterruptedException, IOException- Throws:
InterruptedExceptionIOException
-
canBeScheduled
Checks if the project is buildable. The method also takes the security implications fromQueueItemAuthenticatorinto account.- Parameters:
job- Job to be checked- Returns:
- true if the job can be scheduled from the
-
schedule
@Deprecated protected QueueTaskFuture schedule(AbstractBuild<?, ?> build, Job project, List<Action> list) throws InterruptedException, IOExceptionDeprecated.- Throws:
InterruptedExceptionIOException
-
schedule
@CheckForNull protected QueueTaskFuture schedule(@NonNull AbstractBuild<?, ?> build, @NonNull Job project, @NonNull List<Action> list, @NonNull TaskListener listener) throws InterruptedException, IOException- Throws:
InterruptedExceptionIOException
-
onJobRenamed
-
onDeleted
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<BuildTriggerConfig>
-
toString
-
getJobs(ItemGroup, EnvVars)