Class BuildTriggerConfig
- java.lang.Object
-
- hudson.plugins.parameterizedtrigger.BuildTriggerConfig
-
- All Implemented Interfaces:
Describable<BuildTriggerConfig>
- Direct Known Subclasses:
BlockableBuildTriggerConfig
,FileBuildTriggerConfig
,PredefinedPropertiesBuildTriggerConfig
public class BuildTriggerConfig extends Object implements Describable<BuildTriggerConfig>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BuildTriggerConfig.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description BuildTriggerConfig(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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
canBeScheduled(Job<?,?> job)
Checks if the project is buildable.protected Cause
createUpstreamCause(Run<?,?> build)
Create UpstreamCause that triggers a downstream build.ResultCondition
getCondition()
List<AbstractBuildParameterFactory>
getConfigFactories()
List<AbstractBuildParameters>
getConfigs()
Descriptor<BuildTriggerConfig>
getDescriptor()
List<Job>
getJobs(ItemGroup context, EnvVars env)
Get list of all projects, including workflow job typesSubProjectData
getProjectInfo(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.List<AbstractProject>
getProjectList(EnvVars env)
Deprecated.List<AbstractProject>
getProjectList(ItemGroup context, EnvVars env)
Deprecated.String
getProjects()
String
getProjects(EnvVars env)
boolean
getTriggerWithNoParameters()
boolean
isTriggerFromChildProjects()
boolean
onDeleted(ItemGroup context, String oldName)
boolean
onJobRenamed(ItemGroup context, String oldName, String newName)
List<QueueTaskFuture<AbstractBuild>>
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 QueueTaskFuture
schedule(AbstractBuild<?,?> build, Job project, int quietPeriod, List<Action> list)
protected QueueTaskFuture
schedule(AbstractBuild<?,?> build, Job project, int quietPeriod, List<Action> list, TaskListener listener)
protected QueueTaskFuture
schedule(AbstractBuild<?,?> build, Job project, List<Action> list)
protected QueueTaskFuture
schedule(AbstractBuild<?,?> build, Job project, List<Action> list, TaskListener listener)
String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
getConfigs
public List<AbstractBuildParameters> getConfigs()
-
getConfigFactories
public List<AbstractBuildParameterFactory> getConfigFactories()
-
getProjects
public String getProjects()
-
getCondition
public ResultCondition getCondition()
-
getTriggerWithNoParameters
public boolean getTriggerWithNoParameters()
-
isTriggerFromChildProjects
public boolean isTriggerFromChildProjects()
-
getProjectList
@Deprecated public List<AbstractProject> getProjectList(EnvVars env)
Deprecated.
-
getProjectList
@Deprecated public List<AbstractProject> getProjectList(ItemGroup context, EnvVars env)
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
public List<Job> getJobs(ItemGroup context, EnvVars env)
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.READ
permission, the job won't be added to the list.
-
getProjectInfo
public SubProjectData getProjectInfo(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.
- 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, IOException
Note that with Hudson 1.341, trigger should be usingBuildTrigger.buildDependencyGraph(AbstractProject, hudson.model.DependencyGraph)
.- Throws:
InterruptedException
IOException
-
perform2
@Deprecated public com.google.common.collect.ListMultimap<AbstractProject,QueueTaskFuture<AbstractBuild>> perform2(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
Deprecated.- Throws:
InterruptedException
IOException
-
perform3
public com.google.common.collect.ListMultimap<Job,QueueTaskFuture<AbstractBuild>> perform3(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
createUpstreamCause
protected Cause createUpstreamCause(Run<?,?> build)
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, IOException
Deprecated.- Throws:
InterruptedException
IOException
-
schedule
@CheckForNull protected QueueTaskFuture schedule(@NonNull AbstractBuild<?,?> build, @NonNull Job project, int quietPeriod, @NonNull List<Action> list, @NonNull TaskListener listener) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
canBeScheduled
protected boolean canBeScheduled(@NonNull Job<?,?> job)
Checks if the project is buildable. The method also takes the security implications fromQueueItemAuthenticator
into 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, IOException
Deprecated.- Throws:
InterruptedException
IOException
-
schedule
@CheckForNull protected QueueTaskFuture schedule(@NonNull AbstractBuild<?,?> build, @NonNull Job project, @NonNull List<Action> list, @NonNull TaskListener listener) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
getDescriptor
public Descriptor<BuildTriggerConfig> getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<BuildTriggerConfig>
-
-