Class Artifact
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<ArtifactProperties>
-
- com.atlassian.bamboo.specs.api.builders.plan.artifact.Artifact
-
public class Artifact extends EntityPropertiesBuilder<ArtifactProperties>
Represents Bamboo artifact definition.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanHTTP_COMPRESSION_ON_BY_DEFAULTstatic booleanREQUIRED_BY_DEFAULTstatic booleanSHARED_BY_DEFAULT
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected ArtifactPropertiesbuild()ArtifactcopyPattern(@NotNull java.lang.String copyPattern)Deprecated.since 8.3, usecopyPatterns(String...)ArtifactcopyPatterns(@NotNull java.lang.String... copyPatterns)Specify the pattern according to which Bamboo should copy files when creating an actual artifact.ArtifactexclusionPatterns(@NotNull java.lang.String... exclusionPatterns)Specify the pattern according to which Bamboo should exclude files when creating an actual artifact.@NotNull java.lang.StringgetName()Returns defined artifact name, which serves as identifier for this object.ArtifacthttpCompressionOn(boolean httpCompressionOn)Specifies if artifact should be compressed before transfer.Artifactlocation(@NotNull java.lang.String location)Specifies a path in which Bamboo should look for the files when creating an actual artifact.Artifactname(@NotNull java.lang.String name)Sets an artifact name.Artifactrequired()Set artifact to be required.Artifactrequired(boolean mandatory)Specifies if artifact is required.Artifactshared(boolean shared)Specifies if artifact is shared.
-
-
-
Constructor Detail
-
Artifact
public Artifact()
-
Artifact
public Artifact(@NotNull @NotNull java.lang.String name) throws PropertiesValidationExceptionSpecify 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 Detail
-
name
public Artifact name(@NotNull @NotNull java.lang.String name) throws PropertiesValidationException
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 java.lang.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 java.lang.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 java.lang.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
-
shared
public Artifact shared(boolean shared)
Specifies if artifact is shared. Shared artifacts can be downloaded by jobs in subsequent stages as well as other plans and deployments. False by default.
-
required
public Artifact required()
Set artifact to be required. Build will fail if can't publish required artifact.
-
required
public Artifact required(boolean mandatory)
Specifies if artifact is required. Build will fail if can't publish required artifact. False by default.
-
httpCompressionOn
public Artifact httpCompressionOn(boolean httpCompressionOn)
Specifies if artifact should be compressed before transfer. True by default.
-
location
public Artifact location(@NotNull @NotNull java.lang.String location) throws PropertiesValidationException
Specifies a path in which Bamboo should look for the files when creating an actual artifact.- Throws:
PropertiesValidationException
-
getName
@NotNull public @NotNull java.lang.String getName()
Returns defined artifact name, which serves as identifier for this object.- Throws:
java.lang.IllegalStateException- if name is undefined
-
build
protected ArtifactProperties build() throws PropertiesValidationException
- Specified by:
buildin classEntityPropertiesBuilder<ArtifactProperties>- Throws:
PropertiesValidationException
-
-