Interface Job

  • All Superinterfaces:
    software.amazon.jsii.JsiiSerializable
    All Known Implementing Classes:
    Job.Jsii$Proxy

    @Generated(value="jsii-pacmak/1.62.0 (build 293ac17)",
               date="2022-07-16T00:20:23.461Z")
    @Stability(Stable)
    public interface Job
    extends software.amazon.jsii.JsiiSerializable
    A GitHub Workflow job definition.
    • Method Detail

      • getRunsOn

        @Stability(Stable)
        @NotNull
        Object getRunsOn()
        The type of machine to run the job on.

        The machine can be either a GitHub-hosted runner or a self-hosted runner.

        Example:

         ["ubuntu-latest"]
         
      • getSteps

        @Stability(Stable)
        @NotNull
        List<JobStep> getSteps()
        A job contains a sequence of tasks called steps.

        Steps can run commands, run setup tasks, or run an action in your repository, a public repository, or an action published in a Docker registry. Not all steps run actions, but all actions run as a step. Each step runs in its own process in the runner environment and has access to the workspace and filesystem. Because steps run in their own process, changes to environment variables are not preserved between steps. GitHub provides built-in steps to set up and complete a job.

      • getConcurrency

        @Stability(Experimental)
        @Nullable
        default Object getConcurrency()
        (experimental) Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time.

        A concurrency group can be any string or expression. The expression can use any context except for the secrets context.

      • getContainer

        @Stability(Stable)
        @Nullable
        default ContainerOptions getContainer()
        A container to run any steps in a job that don't already specify a container.

        If you have steps that use both script and container actions, the container actions will run as sibling containers on the same network with the same volume mounts.

      • getContinueOnError

        @Stability(Stable)
        @Nullable
        default Boolean getContinueOnError()
        Prevents a workflow run from failing when a job fails.

        Set to true to allow a workflow run to pass when this job fails.

      • getDefaults

        @Stability(Stable)
        @Nullable
        default JobDefaults getDefaults()
        A map of default settings that will apply to all steps in the job.

        You can also set default settings for the entire workflow.

      • getEnv

        @Stability(Stable)
        @Nullable
        default Map<String,​String> getEnv()
        A map of environment variables that are available to all steps in the job.

        You can also set environment variables for the entire workflow or an individual step.

      • getIfValue

        @Stability(Stable)
        @Nullable
        default String getIfValue()
        You can use the if conditional to prevent a job from running unless a condition is met.

        You can use any supported context and expression to create a conditional.

      • getName

        @Stability(Stable)
        @Nullable
        default String getName()
        The name of the job displayed on GitHub.
      • getNeeds

        @Stability(Stable)
        @Nullable
        default List<String> getNeeds()
        Identifies any jobs that must complete successfully before this job will run.

        It can be a string or array of strings. If a job fails, all jobs that need it are skipped unless the jobs use a conditional expression that causes the job to continue.

      • getOutputs

        @Stability(Stable)
        @Nullable
        default Map<String,​String> getOutputs()
        A map of outputs for a job.

        Job outputs are available to all downstream jobs that depend on this job.

      • getServices

        @Stability(Stable)
        @Nullable
        default Map<String,​ContainerOptions> getServices()
        Used to host service containers for a job in a workflow.

        Service containers are useful for creating databases or cache services like Redis. The runner automatically creates a Docker network and manages the life cycle of the service containers.

      • getStrategy

        @Stability(Stable)
        @Nullable
        default JobStrategy getStrategy()
        A strategy creates a build matrix for your jobs.

        You can define different variations to run each job in.

      • getTimeoutMinutes

        @Stability(Stable)
        @Nullable
        default Number getTimeoutMinutes()
        The maximum number of minutes to let a job run before GitHub automatically cancels it.

        Default: 360