Package io.github.cdklabs.projen.gitlab
Class Artifacts.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.gitlab.Artifacts.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Artifactsbuild()Builds the configured instance.Artifacts.Builderexclude(List<String> exclude)Sets the value ofArtifacts.getExclude()Artifacts.BuilderexpireIn(String expireIn)Sets the value ofArtifacts.getExpireIn()Artifacts.BuilderexposeAs(String exposeAs)Sets the value ofArtifacts.getExposeAs()Artifacts.Buildername(String name)Sets the value ofArtifacts.getName()Artifacts.Builderpaths(List<String> paths)Sets the value ofArtifacts.getPaths()Artifacts.Builderreports(Reports reports)Sets the value ofArtifacts.getReports()Artifacts.Builderuntracked(Boolean untracked)Sets the value ofArtifacts.getUntracked()Artifacts.Builderwhen(CacheWhen when)Sets the value ofArtifacts.getWhen()
-
-
-
Method Detail
-
exclude
@Stability(Experimental) public Artifacts.Builder exclude(List<String> exclude)
Sets the value ofArtifacts.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 ofArtifacts.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 ofArtifacts.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 ofArtifacts.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 ofArtifacts.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 ofArtifacts.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 ofArtifacts.getUntracked()- Parameters:
untracked- Whether to add all untracked files (along with 'artifacts.paths') to the artifact.- Returns:
this
-
when
@Stability(Experimental) public Artifacts.Builder when(CacheWhen when)
Sets the value ofArtifacts.getWhen()- Parameters:
when- Configure when artifacts are uploaded depended on job status.- Returns:
this
-
build
@Stability(Experimental) public Artifacts build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<Artifacts>- Returns:
- a new instance of
Artifacts - Throws:
NullPointerException- if any required attribute was not provided
-
-