Class Job
Stage
that can be run parallel to other jobs if multiple
agents are available. When executing several jobs on single agents, order in which jobs from single stage are executed is not defined.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds providedArtifact
s to the list of artifacts produced by the job.artifactSubscriptions
(@NotNull ArtifactSubscription... subscriptions) Add artifact subscriptions.protected JobProperties
build()
cleanWorkingDirectory
(boolean cleanWorkingDirectory) Specifies if job should clean working directory after executing.description
(@Nullable String description) Sets the job's description.dockerConfiguration
(@NotNull DockerConfiguration dockerConfiguration) Configure Docker for this job.enabled
(boolean enabled) Enables/disables the job.finalTasks
(@NotNull Task<?, ?>... finalTasks) Adds providedTask
s to the list of the final tasks executed by the job.@NotNull BambooKey
getKey()
Returns job's key, which serves as identifier for this object.Sets the job's key.Sets the job's key.Sets the job's name.Deprecated.pluginConfigurations
(@NotNull PluginConfiguration<?>... pluginConfigurations) Appends plugin configuration to the plan.requirements
(Requirement... requirements) Adds custom requirements to the job.Adds providedTask
s to the list of tasks executed by the job.
-
Constructor Details
-
Job
-
Job
public Job(@NotNull @NotNull String name, @NotNull @NotNull String key) throws PropertiesValidationException Specify job with given name and key.If oid is not specified, key serves as a job identifier. If a job with specified key does not exist, a new one is created. If it does exists it is updated, it can also be moved between stages.
- Parameters:
name
- job's namekey
- job's short key, must be unique within the plan.- Throws:
PropertiesValidationException
-
Job
public Job(@NotNull @NotNull String name, @NotNull @NotNull BambooKey key) throws PropertiesValidationException Specify job with given name and key.If oid is not specified, key serves as a job identifier. If a job with specified key does not exist, a new one is creted. If it does exists it is updated, it can also be moved between stages.
- Parameters:
name
- job's namekey
- job's short key, must be unique within the plan.- Throws:
PropertiesValidationException
-
-
Method Details
-
name
Sets the job's name.- Throws:
PropertiesValidationException
-
key
Sets the job's key.If oid is not specified, key serves as a job identifier. If a job with specified key does not exist, a new one is created. If it does exists it is updated, it can also be moved between stages.
- Parameters:
key
- job's short key, must be unique within the plan.- Throws:
PropertiesValidationException
-
key
Sets the job's key.If oid is not specified, key serves as a job identifier. If a job with specified key does not exist, a new one is created. If it does exists it is updated, in particular it can be moved between stages.
- Parameters:
key
- job's short key, must be unique within the plan.- Throws:
PropertiesValidationException
-
description
Sets the job's description.- Throws:
PropertiesValidationException
-
enabled
Enables/disables the job.- Throws:
PropertiesValidationException
-
artifacts
Adds providedArtifact
s to the list of artifacts produced by the job. -
artifactSubscriptions
Add artifact subscriptions. Subscription can only be defined for shared artifacts.Artifact subscription specify which subsequent jobs rely on this artifact.
-
tasks
Adds providedTask
s to the list of tasks executed by the job. -
finalTasks
Adds providedTask
s to the list of the final tasks executed by the job.Final tasks for a job are always executed, even if previous tasks in the job failed.
-
requirements
Adds custom requirements to the job.Requirements control which Bamboo agents are able to execute the job.
-
cleanWorkingDirectory
Specifies if job should clean working directory after executing. -
pluginConfigurations
Appends plugin configuration to the plan. If the same plugin is specified second time, its configuration is overwritten. -
noPluginConfigurations
Deprecated.Use this method to specify that your job has default plugins configuration. -
dockerConfiguration
Configure Docker for this job.- See Also:
-
getKey
Returns job's key, which serves as identifier for this object.- Throws:
IllegalStateException
- if key is undefined
-
build
- Specified by:
build
in classEntityPropertiesBuilder<JobProperties>
- Throws:
PropertiesValidationException
-