Class Artifact

    • Field Detail

      • 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 Detail

      • Artifact

        public Artifact()
      • Artifact

        public Artifact​(@NotNull
                        @NotNull java.lang.String name)
                 throws PropertiesValidationException
        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 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
      • 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.
      • 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