Interface Job
-
- All Superinterfaces:
CommonJobDefinition,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.098Z") @Stability(Experimental) public interface Job extends software.amazon.jsii.JsiiSerializable, CommonJobDefinition
(experimental) A GitHub Workflow job definition.
-
-
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 Abstract Methods Default Methods Modifier and Type Method Description static Job.Builderbuilder()default ContainerOptionsgetContainer()(experimental) A container to run any steps in a job that don't already specify a container.default BooleangetContinueOnError()(experimental) Prevents a workflow run from failing when a job fails.default JobDefaultsgetDefaults()(experimental) A map of default settings that will apply to all steps in the job.default Map<String,String>getEnv()(experimental) A map of environment variables that are available to all steps in the job.default ObjectgetEnvironment()(experimental) The environment that the job references.default Map<String,JobStepOutput>getOutputs()(experimental) A map of outputs for a job.default List<String>getRunsOn()(experimental) The type of machine to run the job on.default GroupRunnerOptionsgetRunsOnGroup()(experimental) Github Runner Group selection options.default Map<String,ContainerOptions>getServices()(experimental) Used to host service containers for a job in a workflow.List<JobStep>getSteps()(experimental) A job contains a sequence of tasks called steps.default NumbergetTimeoutMinutes()(experimental) The maximum number of minutes to let a job run before GitHub automatically cancels it.default ToolsgetTools()(experimental) Tools required for this job.-
Methods inherited from interface io.github.cdklabs.projen.github.workflows.CommonJobDefinition
getConcurrency, getIfValue, getName, getNeeds, getPermissions, getStrategy
-
-
-
-
Method Detail
-
getSteps
@Stability(Experimental) @NotNull List<JobStep> getSteps()
(experimental) 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.
-
getContainer
@Stability(Experimental) @Nullable default ContainerOptions getContainer()
(experimental) 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(Experimental) @Nullable default Boolean getContinueOnError()
(experimental) 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(Experimental) @Nullable default JobDefaults getDefaults()
(experimental) 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(Experimental) @Nullable default Map<String,String> getEnv()
(experimental) 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.
-
getEnvironment
@Stability(Experimental) @Nullable default Object getEnvironment()
(experimental) The environment that the job references.All environment protection rules must pass before a job referencing the environment is sent to a runner.
-
getOutputs
@Stability(Experimental) @Nullable default Map<String,JobStepOutput> getOutputs()
(experimental) A map of outputs for a job.Job outputs are available to all downstream jobs that depend on this job.
-
getRunsOn
@Stability(Experimental) @Nullable default List<String> getRunsOn()
(experimental) 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"]
-
getRunsOnGroup
@Stability(Experimental) @Nullable default GroupRunnerOptions getRunsOnGroup()
(experimental) Github Runner Group selection options.
-
getServices
@Stability(Experimental) @Nullable default Map<String,ContainerOptions> getServices()
(experimental) 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.
-
getTimeoutMinutes
@Stability(Experimental) @Nullable default Number getTimeoutMinutes()
(experimental) The maximum number of minutes to let a job run before GitHub automatically cancels it.Default: 360
-
getTools
@Stability(Experimental) @Nullable default Tools getTools()
(experimental) Tools required for this job.Translates into
actions/setup-xxxsteps at the beginning of the job.
-
builder
@Stability(Experimental) static Job.Builder builder()
- Returns:
- a
Job.BuilderofJob
-
-