Class Artifact
java.lang.Object
com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<ArtifactProperties>
com.atlassian.bamboo.specs.api.builders.plan.artifact.Artifact
Represents Bamboo artifact definition.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
static final boolean
static final boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ArtifactProperties
build()
copyPattern
(@NotNull String copyPattern) Deprecated.copyPatterns
(@NotNull String... copyPatterns) Specify the pattern according to which Bamboo should copy files when creating an actual artifact.exclusionPatterns
(@NotNull String... exclusionPatterns) Specify the pattern according to which Bamboo should exclude files when creating an actual artifact.@NotNull String
getName()
Returns defined artifact name, which serves as identifier for this object.httpCompressionOn
(boolean httpCompressionOn) Specifies if artifact should be compressed before transfer.Specifies a path in which Bamboo should look for the files when creating an actual artifact.Sets an artifact name.required()
Set artifact to be required.required
(boolean mandatory) Specifies if artifact is required.shared
(boolean shared) Specifies if artifact is shared.
-
Field Details
-
SHARED_BY_DEFAULT
public static final boolean SHARED_BY_DEFAULT -
REQUIRED_BY_DEFAULT
public static final boolean REQUIRED_BY_DEFAULT -
HTTP_COMPRESSION_ON_BY_DEFAULT
public static final boolean HTTP_COMPRESSION_ON_BY_DEFAULT
-
-
Constructor Details
-
Artifact
public Artifact() -
Artifact
Specify an artifact with given name. Name must be unique within the job; if artifact is shared it must be unique within the plan.In the absence of oid, the name is used to identify the artifact. If the artifact with given name does not exist, a new one is created, otherwise existing one is updated.
- Throws:
PropertiesValidationException
-
-
Method Details
-
name
Sets an artifact name. Name must be unique within the job; if artifact is shared it must be unique within the plan.In the absence of oid, the name is used to identify the artifact. If the artifact with given name does not exist, a new one is created, otherwise existing one is updated.
- Throws:
PropertiesValidationException
-
copyPattern
@Deprecated public Artifact copyPattern(@NotNull @NotNull String copyPattern) throws PropertiesValidationException Deprecated.since 8.3, usecopyPatterns(String...)
Specify the pattern according to which Bamboo should copy files when creating an actual artifact. This erases previously specified patterns.- Parameters:
copyPattern
- a copy pattern in Ant file pattern format- Throws:
PropertiesValidationException
-
copyPatterns
public Artifact copyPatterns(@NotNull @NotNull String... copyPatterns) throws PropertiesValidationException Specify the pattern according to which Bamboo should copy files when creating an actual artifact.- Parameters:
copyPatterns
- a set of copy patterns in Ant file pattern format- Throws:
PropertiesValidationException
- Since:
- 8.3
-
exclusionPatterns
public Artifact exclusionPatterns(@NotNull @NotNull String... exclusionPatterns) throws PropertiesValidationException Specify the pattern according to which Bamboo should exclude files when creating an actual artifact.- Parameters:
exclusionPatterns
- a set of exclusion patterns in Ant file pattern format- Throws:
PropertiesValidationException
- Since:
- 8.3
-
required
Set artifact to be required. Build will fail if can't publish required artifact. -
required
Specifies if artifact is required. Build will fail if can't publish required artifact. False by default. -
httpCompressionOn
Specifies if artifact should be compressed before transfer. True by default. -
location
Specifies a path in which Bamboo should look for the files when creating an actual artifact.- Throws:
PropertiesValidationException
-
getName
Returns defined artifact name, which serves as identifier for this object.- Throws:
IllegalStateException
- if name is undefined
-
build
- Specified by:
build
in classEntityPropertiesBuilder<ArtifactProperties>
- Throws:
PropertiesValidationException
-
copyPatterns(String...)