Class Artifacts.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<Artifacts>
    Enclosing interface:
    Artifacts

    @Stability(Experimental)
    public static final class Artifacts.Builder
    extends Object
    implements software.amazon.jsii.Builder<Artifacts>
    A builder for Artifacts
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • exclude

        @Stability(Experimental)
        public Artifacts.Builder exclude​(List<String> exclude)
        Sets the value of Artifacts.getExclude()
        Parameters:
        exclude - A list of paths to files/folders that should be excluded in the artifact.
        Returns:
        this
      • expireIn

        @Stability(Experimental)
        public Artifacts.Builder expireIn​(String expireIn)
        Sets the value of Artifacts.getExpireIn()
        Parameters:
        expireIn - How long artifacts should be kept. They are saved 30 days by default. Artifacts that have expired are removed periodically via cron job. Supports a wide variety of formats, e.g. '1 week', '3 mins 4 sec', '2 hrs 20 min', '2h20min', '6 mos 1 day', '47 yrs 6 mos and 4d', '3 weeks and 2 days'.
        Returns:
        this
      • exposeAs

        @Stability(Experimental)
        public Artifacts.Builder exposeAs​(String exposeAs)
        Sets the value of Artifacts.getExposeAs()
        Parameters:
        exposeAs - Can be used to expose job artifacts in the merge request UI. GitLab will add a link <expose_as> to the relevant merge request that points to the artifact.
        Returns:
        this
      • name

        @Stability(Experimental)
        public Artifacts.Builder name​(String name)
        Sets the value of Artifacts.getName()
        Parameters:
        name - Name for the archive created on job success. Can use variables in the name, e.g. '$CI_JOB_NAME'
        Returns:
        this
      • paths

        @Stability(Experimental)
        public Artifacts.Builder paths​(List<String> paths)
        Sets the value of Artifacts.getPaths()
        Parameters:
        paths - A list of paths to files/folders that should be included in the artifact.
        Returns:
        this
      • reports

        @Stability(Experimental)
        public Artifacts.Builder reports​(Reports reports)
        Sets the value of Artifacts.getReports()
        Parameters:
        reports - Reports will be uploaded as artifacts, and often displayed in the Gitlab UI, such as in Merge Requests.
        Returns:
        this
      • untracked

        @Stability(Experimental)
        public Artifacts.Builder untracked​(Boolean untracked)
        Sets the value of Artifacts.getUntracked()
        Parameters:
        untracked - Whether to add all untracked files (along with 'artifacts.paths') to the artifact.
        Returns:
        this
      • build

        @Stability(Experimental)
        public Artifacts build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<Artifacts>
        Returns:
        a new instance of Artifacts
        Throws:
        NullPointerException - if any required attribute was not provided