Module cloudbuild

This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Others

Resources

Resource Trigger

class Trigger extends CustomResource

Configuration for an automated build in response to source repository changes.

To get more information about Trigger, see:

Example Usage - Cloudbuild Trigger Filename

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const filenameTrigger = new gcp.cloudbuild.Trigger("filename-trigger", {
    filename: "cloudbuild.yaml",
    substitutions: {
        _BAZ: "qux",
        _FOO: "bar",
    },
    triggerTemplate: {
        branchName: "master",
        repoName: "my-repo",
    },
});

constructor

new Trigger(name: string, args?: TriggerArgs, opts?: pulumi.CustomResourceOptions)

Create a Trigger resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TriggerState, opts?: pulumi.CustomResourceOptions): Trigger

Get an existing Trigger resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Trigger

Returns true if the given object is an instance of Trigger. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property build

public build: pulumi.Output<TriggerBuild | undefined>;

Contents of the build template. Either a filename or build template must be provided. Structure is documented below.

property createTime

public createTime: pulumi.Output<string>;

Time when the trigger was created.

property description

public description: pulumi.Output<string | undefined>;

Human-readable description of the trigger.

property disabled

public disabled: pulumi.Output<boolean | undefined>;

Whether the trigger is disabled or not. If true, the trigger will never result in a build.

property filename

public filename: pulumi.Output<string | undefined>;

Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided.

property github

public github: pulumi.Output<TriggerGithub | undefined>;

Describes the configuration of a trigger that creates a build whenever a GitHub event is received. One of triggerTemplate or github must be provided. Structure is documented below.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ignoredFiles

public ignoredFiles: pulumi.Output<string[] | undefined>;

ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for **. If ignoredFiles and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignoredFiles is not empty, then we ignore any files that match any of the ignoredFile globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build.

property includedFiles

public includedFiles: pulumi.Output<string[] | undefined>;

ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for **. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is not empty, then we make sure that at least one of those files matches a includedFiles glob. If not, then we do not trigger a build.

property name

public name: pulumi.Output<string>;

Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property substitutions

public substitutions: pulumi.Output<{[key: string]: string} | undefined>;

Substitutions data for Build resource.

property triggerId

public triggerId: pulumi.Output<string>;

The unique identifier for the trigger.

property triggerTemplate

public triggerTemplate: pulumi.Output<TriggerTriggerTemplate | undefined>;

Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. One of triggerTemplate or github must be provided. Structure is documented below.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

interface TriggerArgs

interface TriggerArgs

The set of arguments for constructing a Trigger resource.

property build

build?: pulumi.Input<TriggerBuild>;

Contents of the build template. Either a filename or build template must be provided. Structure is documented below.

property description

description?: pulumi.Input<string>;

Human-readable description of the trigger.

property disabled

disabled?: pulumi.Input<boolean>;

Whether the trigger is disabled or not. If true, the trigger will never result in a build.

property filename

filename?: pulumi.Input<string>;

Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided.

property github

github?: pulumi.Input<TriggerGithub>;

Describes the configuration of a trigger that creates a build whenever a GitHub event is received. One of triggerTemplate or github must be provided. Structure is documented below.

property ignoredFiles

ignoredFiles?: pulumi.Input<pulumi.Input<string>[]>;

ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for **. If ignoredFiles and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignoredFiles is not empty, then we ignore any files that match any of the ignoredFile globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build.

property includedFiles

includedFiles?: pulumi.Input<pulumi.Input<string>[]>;

ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for **. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is not empty, then we make sure that at least one of those files matches a includedFiles glob. If not, then we do not trigger a build.

property name

name?: pulumi.Input<string>;

Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property substitutions

substitutions?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

Substitutions data for Build resource.

property triggerTemplate

triggerTemplate?: pulumi.Input<TriggerTriggerTemplate>;

Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. One of triggerTemplate or github must be provided. Structure is documented below.

interface TriggerState

interface TriggerState

Input properties used for looking up and filtering Trigger resources.

property build

build?: pulumi.Input<TriggerBuild>;

Contents of the build template. Either a filename or build template must be provided. Structure is documented below.

property createTime

createTime?: pulumi.Input<string>;

Time when the trigger was created.

property description

description?: pulumi.Input<string>;

Human-readable description of the trigger.

property disabled

disabled?: pulumi.Input<boolean>;

Whether the trigger is disabled or not. If true, the trigger will never result in a build.

property filename

filename?: pulumi.Input<string>;

Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided.

property github

github?: pulumi.Input<TriggerGithub>;

Describes the configuration of a trigger that creates a build whenever a GitHub event is received. One of triggerTemplate or github must be provided. Structure is documented below.

property ignoredFiles

ignoredFiles?: pulumi.Input<pulumi.Input<string>[]>;

ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for **. If ignoredFiles and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignoredFiles is not empty, then we ignore any files that match any of the ignoredFile globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build.

property includedFiles

includedFiles?: pulumi.Input<pulumi.Input<string>[]>;

ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for **. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is not empty, then we make sure that at least one of those files matches a includedFiles glob. If not, then we do not trigger a build.

property name

name?: pulumi.Input<string>;

Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property substitutions

substitutions?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

Substitutions data for Build resource.

property triggerId

triggerId?: pulumi.Input<string>;

The unique identifier for the trigger.

property triggerTemplate

triggerTemplate?: pulumi.Input<TriggerTriggerTemplate>;

Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. One of triggerTemplate or github must be provided. Structure is documented below.