@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-20T00:39:28.777Z") @Stability(value=Experimental) public interface Job extends software.amazon.jsii.JsiiSerializable
| Modifier and Type | Interface and Description |
|---|---|
static class |
Job.Builder
A builder for
Job |
static class |
Job.Jsii$Proxy
An implementation for
Job |
| Modifier and Type | Method and Description |
|---|---|
static Job.Builder |
builder() |
default Object |
getConcurrency()
(experimental) Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time.
|
default ContainerOptions |
getContainer()
(experimental) A container to run any steps in a job that don't already specify a container.
|
default Boolean |
getContinueOnError()
(experimental) Prevents a workflow run from failing when a job fails.
|
default JobDefaults |
getDefaults()
(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 Object |
getEnvironment()
(experimental) The environment that the job references.
|
default String |
getIfValue()
(experimental) You can use the if conditional to prevent a job from running unless a condition is met.
|
default String |
getName()
(experimental) The name of the job displayed on GitHub.
|
default List<String> |
getNeeds()
(experimental) Identifies any jobs that must complete successfully before this job will run.
|
default Map<String,JobStepOutput> |
getOutputs()
(experimental) A map of outputs for a job.
|
JobPermissions |
getPermissions()
(experimental) You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access.
|
List<String> |
getRunsOn()
(experimental) The type of machine to run the job on.
|
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 JobStrategy |
getStrategy()
(experimental) A strategy creates a build matrix for your jobs.
|
default Number |
getTimeoutMinutes()
(experimental) The maximum number of minutes to let a job run before GitHub automatically cancels it.
|
@Stability(value=Experimental) @NotNull JobPermissions getPermissions()
Use { contents: READ } if your job only needs to clone code.
This is intentionally a required field since it is required in order to allow workflows to run in GitHub repositories with restricted default access.
https://docs.github.com/en/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token@Stability(value=Experimental) @NotNull List<String> getRunsOn()
The machine can be either a GitHub-hosted runner or a self-hosted runner.
Example:
// Example automatically generated from non-compiling source. May contain errors. ["ubuntu-latest"]
@Stability(value=Experimental) @NotNull List<JobStep> getSteps()
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.
@Stability(value=Experimental) @Nullable default Object getConcurrency()
A concurrency group can be any string or expression. The expression can use any context except for the secrets context.
@Stability(value=Experimental) @Nullable default ContainerOptions getContainer()
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.
@Stability(value=Experimental) @Nullable default Boolean getContinueOnError()
Set to true to allow a workflow run to pass when this job fails.
@Stability(value=Experimental) @Nullable default JobDefaults getDefaults()
You can also set default settings for the entire workflow.
@Stability(value=Experimental) @Nullable default Map<String,String> getEnv()
You can also set environment variables for the entire workflow or an individual step.
@Stability(value=Experimental) @Nullable default Object getEnvironment()
All environment protection rules must pass before a job referencing the environment is sent to a runner.
https://docs.github.com/en/actions/reference/environments@Stability(value=Experimental) @Nullable default String getIfValue()
You can use any supported context and expression to create a conditional.
@Stability(value=Experimental) @Nullable default String getName()
@Stability(value=Experimental) @Nullable default List<String> getNeeds()
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.
@Stability(value=Experimental) @Nullable default Map<String,JobStepOutput> getOutputs()
Job outputs are available to all downstream jobs that depend on this job.
@Stability(value=Experimental) @Nullable default Map<String,ContainerOptions> getServices()
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.
@Stability(value=Experimental) @Nullable default JobStrategy getStrategy()
You can define different variations to run each job in.
@Stability(value=Experimental) @Nullable default Number getTimeoutMinutes()
Default: 360
@Stability(value=Experimental) static Job.Builder builder()
Job.Builder of JobCopyright © 2021. All rights reserved.