published on Wednesday, Nov 18, 2026 by Pulumi
published on Wednesday, Nov 18, 2026 by Pulumi
Declares a command that a run executes in a stage. Delivery checks out the source at the commit of the run and runs the command in directory.
A resource that is not a Delivery resource waits for the job when it uses an output of the job.
The command can read these variables: DELIVERY_RELEASE, DELIVERY_RUN, DELIVERY_STAGE, DELIVERY_COMMIT and DELIVERY_PIPELINE. To publish outputs, write a JSON object to the file that DELIVERY_OUTPUTS names. Each key is one output. The file can be at most 1 MiB. To mark an output as secret, write it as {“value”: …, “secret”: true}.
If one output is secret, the whole map is secret. An output is secret when the job marks it as secret or when it contains a secret environment value.
Example Usage
import * as delivery from "@pulumi/delivery";
new delivery.Job("smoke", {
stage: prod,
source: code,
directory: "delivery",
command: "./scripts/smoke.sh",
});
Create Job Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Job(name: string, args: JobArgs, opts?: ComponentResourceOptions);@overload
def Job(resource_name: str,
args: JobArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Job(resource_name: str,
opts: Optional[ResourceOptions] = None,
command: Optional[str] = None,
directory: Optional[str] = None,
source: Optional[Union[GitHubSource, GitLabSource, BitbucketSource, AzureDevOpsSource]] = None,
stage: Optional[Stage] = None,
environment: Optional[Mapping[str, str]] = None,
image: Optional[ImageArgs] = None,
pre_run_commands: Optional[Sequence[str]] = None,
runtime: Optional[WorkflowsRuntime] = None,
timeout: Optional[str] = None)func NewJob(ctx *Context, name string, args JobArgs, opts ...ResourceOption) (*Job, error)public Job(string name, JobArgs args, ComponentResourceOptions? opts = null)type: delivery:Job
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "delivery_job" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args JobArgs
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args JobArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args JobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args JobArgs
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args JobArgs
- The arguments to resource properties.
- options ComponentResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var jobResource = new Delivery.Job("jobResource", new()
{
Command = "string",
Directory = "string",
Source = gitHubSource,
Stage = stage,
Environment =
{
{ "string", "string" },
},
Image = new Delivery.Inputs.ImageArgs
{
Reference = "string",
Credentials = new Delivery.Inputs.ImageCredentialsArgs
{
Password = "string",
Username = "string",
},
},
PreRunCommands = new[]
{
"string",
},
Runtime = workflowsRuntime,
Timeout = "string",
});
example, err := delivery.NewJob(ctx, "jobResource", &delivery.JobArgs{
Command: pulumi.String("string"),
Directory: pulumi.String("string"),
Source: pulumi.Any(gitHubSource),
Stage: pulumi.Any(stage),
Environment: pulumi.StringMap{
"string": pulumi.String("string"),
},
Image: &delivery.ImageArgs{
Reference: pulumi.String("string"),
Credentials: &delivery.ImageCredentialsArgs{
Password: pulumi.String("string"),
Username: pulumi.String("string"),
},
},
PreRunCommands: pulumi.StringArray{
pulumi.String("string"),
},
Runtime: pulumi.Any(workflowsRuntime),
Timeout: pulumi.String("string"),
})
resource "delivery_job" "jobResource" {
lifecycle {
create_before_destroy = true
}
command = "string"
directory = "string"
source = gitHubSource
stage = stage
environment = {
"string" = "string"
}
image = {
reference = "string"
credentials = {
password = "string"
username = "string"
}
}
pre_run_commands = ["string"]
runtime = workflowsRuntime
timeout = "string"
}
var jobResource = new Job("jobResource", JobArgs.builder()
.command("string")
.directory("string")
.source(gitHubSource)
.stage(stage)
.environment(Map.of("string", "string"))
.image(ImageArgs.builder()
.reference("string")
.credentials(ImageCredentialsArgs.builder()
.password("string")
.username("string")
.build())
.build())
.preRunCommands("string")
.runtime(workflowsRuntime)
.timeout("string")
.build());
job_resource = delivery.Job("jobResource",
command="string",
directory="string",
source=git_hub_source,
stage=stage,
environment={
"string": "string",
},
image={
"reference": "string",
"credentials": {
"password": "string",
"username": "string",
},
},
pre_run_commands=["string"],
runtime=workflows_runtime,
timeout="string")
const jobResource = new delivery.Job("jobResource", {
command: "string",
directory: "string",
source: gitHubSource,
stage: stage,
environment: {
string: "string",
},
image: {
reference: "string",
credentials: {
password: "string",
username: "string",
},
},
preRunCommands: ["string"],
runtime: workflowsRuntime,
timeout: "string",
});
type: delivery:Job
properties:
command: string
directory: string
environment:
string: string
image:
credentials:
password: string
username: string
reference: string
preRunCommands:
- string
runtime: ${workflowsRuntime}
source: ${gitHubSource}
stage: ${stage}
timeout: string
Job Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Job resource accepts the following input properties:
- Command string
- Command to run with sh -c. To publish outputs, the command writes them to the file that DELIVERY_OUTPUTS names.
- Directory string
- Directory to run the command in, relative to the repository root.
- Source
Pulumi.
Delivery. Git Hub Source | Pulumi. Delivery. Git Lab Source | Pulumi. Delivery. Bitbucket Source | Pulumi. Delivery. Azure Dev Ops Source - VCS source to check out.
- Stage
Pulumi.
Delivery. Stage - Stage that the job runs in.
- Environment Dictionary<string, string>
- Environment variables for the command. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
- Image Image
- Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
- Pre
Run List<string>Commands - Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
- Runtime
Pulumi.
Delivery. Workflows Runtime - Pool that runs the job.
- Timeout string
- Maximum run time of the job, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
- Command string
- Command to run with sh -c. To publish outputs, the command writes them to the file that DELIVERY_OUTPUTS names.
- Directory string
- Directory to run the command in, relative to the repository root.
- Source
Git
Hub Source | Git Lab Source | Bitbucket Source | Azure Dev Ops Source - VCS source to check out.
- Stage Stage
- Stage that the job runs in.
- Environment map[string]string
- Environment variables for the command. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
- Image
Image
Args - Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
- Pre
Run []stringCommands - Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
- Runtime
Workflows
Runtime - Pool that runs the job.
- Timeout string
- Maximum run time of the job, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
- command string
- Command to run with sh -c. To publish outputs, the command writes them to the file that DELIVERY_OUTPUTS names.
- directory string
- Directory to run the command in, relative to the repository root.
- source
delivery_
git_ hub_ source | delivery_ git_ lab_ source | delivery_ bitbucket_ source | delivery_ azure_ dev_ ops_ source - VCS source to check out.
- stage
delivery_
stage - Stage that the job runs in.
- environment map(string)
- Environment variables for the command. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
- image object
- Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
- pre_
run_ list(string)commands - Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
- runtime
delivery_
workflows_ runtime - Pool that runs the job.
- timeout string
- Maximum run time of the job, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
- command String
- Command to run with sh -c. To publish outputs, the command writes them to the file that DELIVERY_OUTPUTS names.
- directory String
- Directory to run the command in, relative to the repository root.
- source
Git
Hub Source | Git Lab Source | Bitbucket Source | Azure Dev Ops Source - VCS source to check out.
- stage Stage
- Stage that the job runs in.
- environment Map<String,String>
- Environment variables for the command. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
- image Image
- Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
- pre
Run List<String>Commands - Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
- runtime
Workflows
Runtime - Pool that runs the job.
- timeout String
- Maximum run time of the job, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
- command string
- Command to run with sh -c. To publish outputs, the command writes them to the file that DELIVERY_OUTPUTS names.
- directory string
- Directory to run the command in, relative to the repository root.
- source
Git
Hub Source | Git Lab Source | Bitbucket Source | Azure Dev Ops Source - VCS source to check out.
- stage Stage
- Stage that the job runs in.
- environment {[key: string]: string}
- Environment variables for the command. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
- image Image
- Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
- pre
Run string[]Commands - Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
- runtime
Workflows
Runtime - Pool that runs the job.
- timeout string
- Maximum run time of the job, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
- command str
- Command to run with sh -c. To publish outputs, the command writes them to the file that DELIVERY_OUTPUTS names.
- directory str
- Directory to run the command in, relative to the repository root.
- source
Git
Hub Source | Git Lab Source | Bitbucket Source | Azure Dev Ops Source - VCS source to check out.
- stage Stage
- Stage that the job runs in.
- environment Mapping[str, str]
- Environment variables for the command. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
- image
Image
Args - Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
- pre_
run_ Sequence[str]commands - Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
- runtime
Workflows
Runtime - Pool that runs the job.
- timeout str
- Maximum run time of the job, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
- command String
- Command to run with sh -c. To publish outputs, the command writes them to the file that DELIVERY_OUTPUTS names.
- directory String
- Directory to run the command in, relative to the repository root.
- source
delivery:Git
Hub Source | delivery:Git Lab Source | delivery:Bitbucket Source | delivery:Azure Dev Ops Source - VCS source to check out.
- stage delivery:Stage
- Stage that the job runs in.
- environment Map<String>
- Environment variables for the command. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
- image Property Map
- Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
- pre
Run List<String>Commands - Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
- runtime
delivery:Workflows
Runtime - Pool that runs the job.
- timeout String
- Maximum run time of the job, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
Outputs
All input properties are implicitly available as output properties. Additionally, the Job resource produces the following output properties:
- Outputs Dictionary<string, string>
- Outputs that the command wrote. They are unknown until the job runs.
- Outputs map[string]string
- Outputs that the command wrote. They are unknown until the job runs.
- outputs map(string)
- Outputs that the command wrote. They are unknown until the job runs.
- outputs Map<String,String>
- Outputs that the command wrote. They are unknown until the job runs.
- outputs {[key: string]: string}
- Outputs that the command wrote. They are unknown until the job runs.
- outputs Mapping[str, str]
- Outputs that the command wrote. They are unknown until the job runs.
- outputs Map<String>
- Outputs that the command wrote. They are unknown until the job runs.
Supporting Types
Image, ImageArgs
Container image that a member runs in.- Reference string
- Image reference, for example pulumi/pulumi-nodejs:3.272.0.
- Credentials
Image
Credentials - Credentials for a private registry.
- Reference string
- Image reference, for example pulumi/pulumi-nodejs:3.272.0.
- Credentials
Image
Credentials - Credentials for a private registry.
- reference string
- Image reference, for example pulumi/pulumi-nodejs:3.272.0.
- credentials object
- Credentials for a private registry.
- reference String
- Image reference, for example pulumi/pulumi-nodejs:3.272.0.
- credentials
Image
Credentials - Credentials for a private registry.
- reference string
- Image reference, for example pulumi/pulumi-nodejs:3.272.0.
- credentials
Image
Credentials - Credentials for a private registry.
- reference str
- Image reference, for example pulumi/pulumi-nodejs:3.272.0.
- credentials
Image
Credentials - Credentials for a private registry.
- reference String
- Image reference, for example pulumi/pulumi-nodejs:3.272.0.
- credentials Property Map
- Credentials for a private registry.
ImageCredentials, ImageCredentialsArgs
Credentials for a private registry.Package Details
- Repository
- delivery pulumi/pulumi-delivery
- License
- Apache-2.0
published on Wednesday, Nov 18, 2026 by Pulumi