Package io.github.cdklabs.projen.gitlab
Class CiConfiguration
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- io.github.cdklabs.projen.Component
-
- io.github.cdklabs.projen.gitlab.CiConfiguration
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
GitlabConfiguration,NestedConfiguration
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.117Z") @Stability(Experimental) public class CiConfiguration extends Component
(experimental) CI for GitLab.A CI is a configurable automated process made up of one or more stages/jobs.
- See Also:
- https://docs.gitlab.com/ee/ci/yaml/
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCiConfiguration.Builder(experimental) A fluent builder forCiConfiguration.
-
Constructor Summary
Constructors Modifier Constructor Description CiConfiguration(Project project, String name)CiConfiguration(Project project, String name, CiConfigurationOptions options)protectedCiConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedCiConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDefaultCaches(List<Cache> caches)(experimental) Adds up to 4 default caches configuration to the CI configuration.voidaddGlobalVariables(Map<String,Object> variables)(experimental) Add a globally defined variable to the CI configuration.voidaddIncludes(@NotNull Include... includes)(experimental) Add additional yml/yaml files to the CI includes.voidaddJobs(Map<String,Job> jobs)(experimental) Add jobs and their stages to the CI configuration.voidaddServices(@NotNull Service... services)(experimental) Add additional services.voidaddStages(@NotNull String... stages)(experimental) Add stages to the CI configuration if not already present.List<String>getDefaultAfterScript()(experimental) Defines default scripts that should run after all jobs.ArtifactsgetDefaultArtifacts()(experimental) Default list of files and directories that should be attached to the job if it succeeds.List<String>getDefaultBeforeScript()(experimental) Defines default scripts that should run before all jobs.List<Cache>getDefaultCache()ImagegetDefaultImage()(experimental) Specifies the default docker image to use globally for all jobs.BooleangetDefaultInterruptible()(experimental) The default behavior for whether a job should be canceled when a newer pipeline starts before the job completes (Default: false).RetrygetDefaultRetry()(experimental) How many times a job is retried if it fails.List<String>getDefaultTags()(experimental) Used to select a specific runner from the list of all runners that are available for the project.StringgetDefaultTimeout()(experimental) A default timeout job written in natural language (Ex.YamlFilegetFile()(experimental) The workflow YAML file.Map<String,Job>getJobs()(experimental) The jobs in the CI configuration.StringgetName()(experimental) The name of the configuration.JobgetPages()(experimental) A special job used to upload static sites to Gitlab pages.StringgetPath()(experimental) Path to CI file generated by the configuration.List<String>getStages()(experimental) Groups jobs into stages.Map<String,Object>getVariables()(experimental) Global variables that are passed to jobs.WorkflowgetWorkflow()(experimental) Used to control pipeline behavior.-
Methods inherited from class io.github.cdklabs.projen.Component
getProject, isComponent, postSynthesize, preSynthesize, synthesize
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
CiConfiguration
protected CiConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
-
CiConfiguration
protected CiConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
CiConfiguration
@Stability(Experimental) public CiConfiguration(@NotNull Project project, @NotNull String name, @Nullable CiConfigurationOptions options)- Parameters:
project- This parameter is required.name- This parameter is required.options-
-
-
Method Detail
-
addDefaultCaches
@Stability(Experimental) public void addDefaultCaches(@NotNull List<Cache> caches)(experimental) Adds up to 4 default caches configuration to the CI configuration.- Parameters:
caches- Caches to add. This parameter is required.
-
addGlobalVariables
@Stability(Experimental) public void addGlobalVariables(@NotNull Map<String,Object> variables)(experimental) Add a globally defined variable to the CI configuration.- Parameters:
variables- The variables to add. This parameter is required.
-
addIncludes
@Stability(Experimental) public void addIncludes(@NotNull @NotNull Include... includes)(experimental) Add additional yml/yaml files to the CI includes.- Parameters:
includes- The includes to add. This parameter is required.
-
addJobs
@Stability(Experimental) public void addJobs(@NotNull Map<String,Job> jobs)(experimental) Add jobs and their stages to the CI configuration.- Parameters:
jobs- Jobs to add. This parameter is required.
-
addServices
@Stability(Experimental) public void addServices(@NotNull @NotNull Service... services)(experimental) Add additional services.- Parameters:
services- The services to add. This parameter is required.
-
addStages
@Stability(Experimental) public void addStages(@NotNull @NotNull String... stages)(experimental) Add stages to the CI configuration if not already present.- Parameters:
stages- stages to add. This parameter is required.
-
getDefaultAfterScript
@Stability(Experimental) @NotNull public List<String> getDefaultAfterScript()
(experimental) Defines default scripts that should run after all jobs.Can be overriden by the job level
afterScript.
-
getDefaultBeforeScript
@Stability(Experimental) @NotNull public List<String> getDefaultBeforeScript()
(experimental) Defines default scripts that should run before all jobs.Can be overriden by the job level
afterScript.
-
getDefaultTags
@Stability(Experimental) @NotNull public List<String> getDefaultTags()
(experimental) Used to select a specific runner from the list of all runners that are available for the project.
-
getFile
@Stability(Experimental) @NotNull public YamlFile getFile()
(experimental) The workflow YAML file.
-
getJobs
@Stability(Experimental) @NotNull public Map<String,Job> getJobs()
(experimental) The jobs in the CI configuration.
-
getName
@Stability(Experimental) @NotNull public String getName()
(experimental) The name of the configuration.
-
getPath
@Stability(Experimental) @NotNull public String getPath()
(experimental) Path to CI file generated by the configuration.
-
getStages
@Stability(Experimental) @NotNull public List<String> getStages()
(experimental) Groups jobs into stages.All jobs in one stage must complete before next stage is executed. Defaults to ['build', 'test', 'deploy'].
-
getVariables
@Stability(Experimental) @NotNull public Map<String,Object> getVariables()
(experimental) Global variables that are passed to jobs.If the job already has that variable defined, the job-level variable takes precedence.
-
getDefaultArtifacts
@Stability(Experimental) @Nullable public Artifacts getDefaultArtifacts()
(experimental) Default list of files and directories that should be attached to the job if it succeeds.Artifacts are sent to Gitlab where they can be downloaded.
-
getDefaultImage
@Stability(Experimental) @Nullable public Image getDefaultImage()
(experimental) Specifies the default docker image to use globally for all jobs.
-
getDefaultInterruptible
@Stability(Experimental) @Nullable public Boolean getDefaultInterruptible()
(experimental) The default behavior for whether a job should be canceled when a newer pipeline starts before the job completes (Default: false).
-
getDefaultRetry
@Stability(Experimental) @Nullable public Retry getDefaultRetry()
(experimental) How many times a job is retried if it fails.If not defined, defaults to 0 and jobs do not retry.
-
getDefaultTimeout
@Stability(Experimental) @Nullable public String getDefaultTimeout()
(experimental) A default timeout job written in natural language (Ex.one hour, 3600 seconds, 60 minutes).
-
getPages
@Stability(Experimental) @Nullable public Job getPages()
(experimental) A special job used to upload static sites to Gitlab pages.Requires a
public/directory withartifacts.pathpointing to it.
-
getWorkflow
@Stability(Experimental) @Nullable public Workflow getWorkflow()
(experimental) Used to control pipeline behavior.
-
-