Interface Job
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
Job.Jsii$Proxy
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.122Z") @Stability(Experimental) public interface Job extends software.amazon.jsii.JsiiSerializable
(experimental) Jobs are the most fundamental element of a .gitlab-ci.yml file.- See Also:
- https://docs.gitlab.com/ee/ci/jobs/
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classJob.BuilderA builder forJobstatic classJob.Jsii$ProxyAn implementation forJob
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static Job.Builderbuilder()default List<String>getAfterScript()default ObjectgetAllowFailure()(experimental) Whether to allow the pipeline to continue running on job failure (Default: false).default ArtifactsgetArtifacts()default List<String>getBeforeScript()default List<Cache>getCache()default StringgetCoverage()(experimental) Must be a regular expression, optionally but recommended to be quoted, and must be surrounded with '/'.default List<String>getDependencies()(experimental) Specify a list of job names from earlier stages from which artifacts should be loaded.default ObjectgetEnvironment()(experimental) Used to associate environment metadata with a deploy.default ObjectgetExcept()(experimental) Job will run except for when these filtering options match.default List<String>getExtendsValue()(experimental) The name of one or more jobs to inherit configuration from.default Map<String,IDToken>getIdTokens()(experimental) Configurable ID tokens (JSON Web Tokens) that are used for CI/CD authentication.default ImagegetImage()default InheritgetInherit()(experimental) Controls inheritance of globally-defined defaults and variables.default BooleangetInterruptible()default List<Object>getNeeds()(experimental) The list of jobs in previous stages whose sole completion is needed to start the current job.default ObjectgetOnly()(experimental) Job will run only when these filtering options match.default ObjectgetParallel()(experimental) Parallel will split up a single job into several, and provideCI_NODE_INDEXandCI_NODE_TOTALenvironment variables for the running jobs.default ReleasegetRelease()(experimental) Indicates that the job creates a Release.default StringgetResourceGroup()(experimental) Limit job concurrency.default RetrygetRetry()default List<IncludeRule>getRules()(experimental) Rules allows for an array of individual rule objects to be evaluated in order, until one matches and dynamically provides attributes to the job.default List<String>getScript()(experimental) Shell scripts executed by the Runner.default Map<String,Map<String,Secret>>getSecrets()(experimental) CI/CD secrets.default List<Service>getServices()default StringgetStage()(experimental) Define what stage the job will run in.default StringgetStartIn()default List<String>getTags()default StringgetTimeout()default ObjectgetTrigger()(experimental) Trigger allows you to define downstream pipeline trigger.default Map<String,String>getVariables()(experimental) Configurable values that are passed to the Job.default JobWhengetWhen()(experimental) Describes the conditions for when to run the job.
-
-
-
Method Detail
-
getAllowFailure
@Stability(Experimental) @Nullable default Object getAllowFailure()
(experimental) Whether to allow the pipeline to continue running on job failure (Default: false).
-
getArtifacts
@Stability(Experimental) @Nullable default Artifacts getArtifacts()
-
getCoverage
@Stability(Experimental) @Nullable default String getCoverage()
(experimental) Must be a regular expression, optionally but recommended to be quoted, and must be surrounded with '/'.Example: '/Code coverage: \d+.\d+/'
-
getDependencies
@Stability(Experimental) @Nullable default List<String> getDependencies()
(experimental) Specify a list of job names from earlier stages from which artifacts should be loaded.By default, all previous artifacts are passed. Use an empty array to skip downloading artifacts.
-
getEnvironment
@Stability(Experimental) @Nullable default Object getEnvironment()
(experimental) Used to associate environment metadata with a deploy.Environment can have a name and URL attached to it, and will be displayed under /environments under the project.
-
getExcept
@Stability(Experimental) @Nullable default Object getExcept()
(experimental) Job will run except for when these filtering options match.
-
getExtendsValue
@Stability(Experimental) @Nullable default List<String> getExtendsValue()
(experimental) The name of one or more jobs to inherit configuration from.
-
getIdTokens
@Stability(Experimental) @Nullable default Map<String,IDToken> getIdTokens()
(experimental) Configurable ID tokens (JSON Web Tokens) that are used for CI/CD authentication.
-
getImage
@Stability(Experimental) @Nullable default Image getImage()
-
getInherit
@Stability(Experimental) @Nullable default Inherit getInherit()
(experimental) Controls inheritance of globally-defined defaults and variables.Boolean values control inheritance of all default: or variables: keywords. To inherit only a subset of default: or variables: keywords, specify what you wish to inherit. Anything not listed is not inherited.
-
getInterruptible
@Stability(Experimental) @Nullable default Boolean getInterruptible()
-
getNeeds
@Stability(Experimental) @Nullable default List<Object> getNeeds()
(experimental) The list of jobs in previous stages whose sole completion is needed to start the current job.
-
getOnly
@Stability(Experimental) @Nullable default Object getOnly()
(experimental) Job will run only when these filtering options match.
-
getParallel
@Stability(Experimental) @Nullable default Object getParallel()
(experimental) Parallel will split up a single job into several, and provideCI_NODE_INDEXandCI_NODE_TOTALenvironment variables for the running jobs.
-
getRelease
@Stability(Experimental) @Nullable default Release getRelease()
(experimental) Indicates that the job creates a Release.
-
getResourceGroup
@Stability(Experimental) @Nullable default String getResourceGroup()
(experimental) Limit job concurrency.Can be used to ensure that the Runner will not run certain jobs simultaneously.
-
getRetry
@Stability(Experimental) @Nullable default Retry getRetry()
-
getRules
@Stability(Experimental) @Nullable default List<IncludeRule> getRules()
(experimental) Rules allows for an array of individual rule objects to be evaluated in order, until one matches and dynamically provides attributes to the job.
-
getScript
@Stability(Experimental) @Nullable default List<String> getScript()
(experimental) Shell scripts executed by the Runner.The only required property of jobs. Be careful with special characters (e.g.
:,{,},&) and use single or double quotes to avoid issues.
-
getSecrets
@Stability(Experimental) @Nullable default Map<String,Map<String,Secret>> getSecrets()
(experimental) CI/CD secrets.
-
getStage
@Stability(Experimental) @Nullable default String getStage()
(experimental) Define what stage the job will run in.
-
getStartIn
@Stability(Experimental) @Nullable default String getStartIn()
-
getTimeout
@Stability(Experimental) @Nullable default String getTimeout()
-
getTrigger
@Stability(Experimental) @Nullable default Object getTrigger()
(experimental) Trigger allows you to define downstream pipeline trigger.When a job created from trigger definition is started by GitLab, a downstream pipeline gets created. Read more: https://docs.gitlab.com/ee/ci/yaml/README.html#trigger
-
getVariables
@Stability(Experimental) @Nullable default Map<String,String> getVariables()
(experimental) Configurable values that are passed to the Job.
-
getWhen
@Stability(Experimental) @Nullable default JobWhen getWhen()
(experimental) Describes the conditions for when to run the job.Defaults to 'on_success'.
-
builder
@Stability(Experimental) static Job.Builder builder()
- Returns:
- a
Job.BuilderofJob
-
-