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

      • getAfterScript

        @Stability(Experimental)
        @Nullable
        default List<String> getAfterScript()
      • 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()
      • getBeforeScript

        @Stability(Experimental)
        @Nullable
        default List<String> getBeforeScript()
      • getCache

        @Stability(Experimental)
        @Nullable
        default List<Cache> getCache()
      • 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 provide CI_NODE_INDEX and CI_NODE_TOTAL environment 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.
      • getServices

        @Stability(Experimental)
        @Nullable
        default List<Service> getServices()
      • getStage

        @Stability(Experimental)
        @Nullable
        default String getStage()
        (experimental) Define what stage the job will run in.
      • getStartIn

        @Stability(Experimental)
        @Nullable
        default String getStartIn()
      • getTags

        @Stability(Experimental)
        @Nullable
        default List<String> getTags()
      • 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'.