1. Registry
  2. Packages
  3. Pulumi Delivery
  4. API Docs
  5. Job
Viewing docs for Pulumi Delivery v0.2.0
published on Wednesday, Nov 18, 2026 by Pulumi
Pulumi Delivery
Viewing docs for Pulumi Delivery v0.2.0
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)
    public Job(String name, JobArgs args)
    public Job(String name, JobArgs args, ComponentResourceOptions options)
    
    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.GitHubSource | Pulumi.Delivery.GitLabSource | Pulumi.Delivery.BitbucketSource | Pulumi.Delivery.AzureDevOpsSource
    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.
    PreRunCommands List<string>
    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.WorkflowsRuntime
    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 GitHubSource | GitLabSource | BitbucketSource | AzureDevOpsSource
    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 ImageArgs
    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.
    PreRunCommands []string
    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 WorkflowsRuntime
    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_commands list(string)
    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 GitHubSource | GitLabSource | BitbucketSource | AzureDevOpsSource
    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.
    preRunCommands List<String>
    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 WorkflowsRuntime
    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 GitHubSource | GitLabSource | BitbucketSource | AzureDevOpsSource
    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.
    preRunCommands string[]
    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 WorkflowsRuntime
    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 GitHubSource | GitLabSource | BitbucketSource | AzureDevOpsSource
    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 ImageArgs
    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_commands Sequence[str]
    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 WorkflowsRuntime
    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:GitHubSource | delivery:GitLabSource | delivery:BitbucketSource | delivery:AzureDevOpsSource
    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.
    preRunCommands List<String>
    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:WorkflowsRuntime
    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 ImageCredentials
    Credentials for a private registry.
    Reference string
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    Credentials ImageCredentials
    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 ImageCredentials
    Credentials for a private registry.
    reference string
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    credentials ImageCredentials
    Credentials for a private registry.
    reference str
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    credentials ImageCredentials
    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.
    Password string
    Registry password or token. It is a secret.
    Username string
    Registry user name.
    Password string
    Registry password or token. It is a secret.
    Username string
    Registry user name.
    password string
    Registry password or token. It is a secret.
    username string
    Registry user name.
    password String
    Registry password or token. It is a secret.
    username String
    Registry user name.
    password string
    Registry password or token. It is a secret.
    username string
    Registry user name.
    password str
    Registry password or token. It is a secret.
    username str
    Registry user name.
    password String
    Registry password or token. It is a secret.
    username String
    Registry user name.

    Package Details

    Repository
    delivery pulumi/pulumi-delivery
    License
    Apache-2.0
    Pulumi Delivery
    Viewing docs for Pulumi Delivery v0.2.0
    published on Wednesday, Nov 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial