gcp.cloudbuild.Trigger
Explore with Pulumi AI
Configuration for an automated build in response to source repository changes.
To get more information about Trigger, see:
Note: You can retrieve the email of the Cloud Build Service Account used in jobs by using the
gcp.projects.ServiceIdentity
resource.
Example Usage
Cloudbuild Trigger Filename
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const filename_trigger = new gcp.cloudbuild.Trigger("filename-trigger", {
location: "us-central1",
triggerTemplate: {
branchName: "main",
repoName: "my-repo",
},
substitutions: {
_FOO: "bar",
_BAZ: "qux",
},
filename: "cloudbuild.yaml",
});
import pulumi
import pulumi_gcp as gcp
filename_trigger = gcp.cloudbuild.Trigger("filename-trigger",
location="us-central1",
trigger_template={
"branch_name": "main",
"repo_name": "my-repo",
},
substitutions={
"_FOO": "bar",
"_BAZ": "qux",
},
filename="cloudbuild.yaml")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "filename-trigger", &cloudbuild.TriggerArgs{
Location: pulumi.String("us-central1"),
TriggerTemplate: &cloudbuild.TriggerTriggerTemplateArgs{
BranchName: pulumi.String("main"),
RepoName: pulumi.String("my-repo"),
},
Substitutions: pulumi.StringMap{
"_FOO": pulumi.String("bar"),
"_BAZ": pulumi.String("qux"),
},
Filename: pulumi.String("cloudbuild.yaml"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var filename_trigger = new Gcp.CloudBuild.Trigger("filename-trigger", new()
{
Location = "us-central1",
TriggerTemplate = new Gcp.CloudBuild.Inputs.TriggerTriggerTemplateArgs
{
BranchName = "main",
RepoName = "my-repo",
},
Substitutions =
{
{ "_FOO", "bar" },
{ "_BAZ", "qux" },
},
Filename = "cloudbuild.yaml",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerTriggerTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var filename_trigger = new Trigger("filename-trigger", TriggerArgs.builder()
.location("us-central1")
.triggerTemplate(TriggerTriggerTemplateArgs.builder()
.branchName("main")
.repoName("my-repo")
.build())
.substitutions(Map.ofEntries(
Map.entry("_FOO", "bar"),
Map.entry("_BAZ", "qux")
))
.filename("cloudbuild.yaml")
.build());
}
}
resources:
filename-trigger:
type: gcp:cloudbuild:Trigger
properties:
location: us-central1
triggerTemplate:
branchName: main
repoName: my-repo
substitutions:
_FOO: bar
_BAZ: qux
filename: cloudbuild.yaml
Cloudbuild Trigger Build
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const build_trigger = new gcp.cloudbuild.Trigger("build-trigger", {
name: "my-trigger",
location: "global",
triggerTemplate: {
branchName: "main",
repoName: "my-repo",
},
build: {
steps: [
{
name: "gcr.io/cloud-builders/gsutil",
args: [
"cp",
"gs://mybucket/remotefile.zip",
"localfile.zip",
],
timeout: "120s",
secretEnvs: ["MY_SECRET"],
},
{
name: "ubuntu",
script: "echo hello",
},
],
source: {
storageSource: {
bucket: "mybucket",
object: "source_code.tar.gz",
},
},
tags: [
"build",
"newFeature",
],
substitutions: {
_FOO: "bar",
_BAZ: "qux",
},
queueTtl: "20s",
logsBucket: "gs://mybucket/logs",
secrets: [{
kmsKeyName: "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
secretEnv: {
PASSWORD: "ZW5jcnlwdGVkLXBhc3N3b3JkCg==",
},
}],
availableSecrets: {
secretManagers: [{
env: "MY_SECRET",
versionName: "projects/myProject/secrets/mySecret/versions/latest",
}],
},
artifacts: {
images: ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"],
objects: {
location: "gs://bucket/path/to/somewhere/",
paths: ["path"],
},
npmPackages: [{
packagePath: "package.json",
repository: "https://us-west1-npm.pkg.dev/myProject/quickstart-nodejs-repo",
}],
pythonPackages: [{
paths: ["dist/*"],
repository: "https://us-west1-python.pkg.dev/myProject/quickstart-python-repo",
}],
mavenArtifacts: [{
repository: "https://us-west1-maven.pkg.dev/myProject/quickstart-java-repo",
path: "/workspace/my-app/target/my-app-1.0.SNAPSHOT.jar",
artifactId: "my-app",
groupId: "com.mycompany.app",
version: "1.0",
}],
},
options: {
sourceProvenanceHashes: ["MD5"],
requestedVerifyOption: "VERIFIED",
machineType: "N1_HIGHCPU_8",
diskSizeGb: 100,
substitutionOption: "ALLOW_LOOSE",
dynamicSubstitutions: true,
logStreamingOption: "STREAM_OFF",
workerPool: "pool",
logging: "LEGACY",
envs: ["ekey = evalue"],
secretEnvs: ["secretenv = svalue"],
volumes: [{
name: "v1",
path: "v1",
}],
},
},
});
import pulumi
import pulumi_gcp as gcp
build_trigger = gcp.cloudbuild.Trigger("build-trigger",
name="my-trigger",
location="global",
trigger_template={
"branch_name": "main",
"repo_name": "my-repo",
},
build={
"steps": [
{
"name": "gcr.io/cloud-builders/gsutil",
"args": [
"cp",
"gs://mybucket/remotefile.zip",
"localfile.zip",
],
"timeout": "120s",
"secret_envs": ["MY_SECRET"],
},
{
"name": "ubuntu",
"script": "echo hello",
},
],
"source": {
"storage_source": {
"bucket": "mybucket",
"object": "source_code.tar.gz",
},
},
"tags": [
"build",
"newFeature",
],
"substitutions": {
"__foo": "bar",
"__baz": "qux",
},
"queue_ttl": "20s",
"logs_bucket": "gs://mybucket/logs",
"secrets": [{
"kms_key_name": "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
"secret_env": {
"password": "ZW5jcnlwdGVkLXBhc3N3b3JkCg==",
},
}],
"available_secrets": {
"secret_managers": [{
"env": "MY_SECRET",
"version_name": "projects/myProject/secrets/mySecret/versions/latest",
}],
},
"artifacts": {
"images": ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"],
"objects": {
"location": "gs://bucket/path/to/somewhere/",
"paths": ["path"],
},
"npm_packages": [{
"package_path": "package.json",
"repository": "https://us-west1-npm.pkg.dev/myProject/quickstart-nodejs-repo",
}],
"python_packages": [{
"paths": ["dist/*"],
"repository": "https://us-west1-python.pkg.dev/myProject/quickstart-python-repo",
}],
"maven_artifacts": [{
"repository": "https://us-west1-maven.pkg.dev/myProject/quickstart-java-repo",
"path": "/workspace/my-app/target/my-app-1.0.SNAPSHOT.jar",
"artifact_id": "my-app",
"group_id": "com.mycompany.app",
"version": "1.0",
}],
},
"options": {
"source_provenance_hashes": ["MD5"],
"requested_verify_option": "VERIFIED",
"machine_type": "N1_HIGHCPU_8",
"disk_size_gb": 100,
"substitution_option": "ALLOW_LOOSE",
"dynamic_substitutions": True,
"log_streaming_option": "STREAM_OFF",
"worker_pool": "pool",
"logging": "LEGACY",
"envs": ["ekey = evalue"],
"secret_envs": ["secretenv = svalue"],
"volumes": [{
"name": "v1",
"path": "v1",
}],
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "build-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("my-trigger"),
Location: pulumi.String("global"),
TriggerTemplate: &cloudbuild.TriggerTriggerTemplateArgs{
BranchName: pulumi.String("main"),
RepoName: pulumi.String("my-repo"),
},
Build: &cloudbuild.TriggerBuildArgs{
Steps: cloudbuild.TriggerBuildStepArray{
&cloudbuild.TriggerBuildStepArgs{
Name: pulumi.String("gcr.io/cloud-builders/gsutil"),
Args: pulumi.StringArray{
pulumi.String("cp"),
pulumi.String("gs://mybucket/remotefile.zip"),
pulumi.String("localfile.zip"),
},
Timeout: pulumi.String("120s"),
SecretEnvs: pulumi.StringArray{
pulumi.String("MY_SECRET"),
},
},
&cloudbuild.TriggerBuildStepArgs{
Name: pulumi.String("ubuntu"),
Script: pulumi.String("echo hello"),
},
},
Source: &cloudbuild.TriggerBuildSourceArgs{
StorageSource: &cloudbuild.TriggerBuildSourceStorageSourceArgs{
Bucket: pulumi.String("mybucket"),
Object: pulumi.String("source_code.tar.gz"),
},
},
Tags: pulumi.StringArray{
pulumi.String("build"),
pulumi.String("newFeature"),
},
Substitutions: pulumi.StringMap{
"_FOO": pulumi.String("bar"),
"_BAZ": pulumi.String("qux"),
},
QueueTtl: pulumi.String("20s"),
LogsBucket: pulumi.String("gs://mybucket/logs"),
Secrets: cloudbuild.TriggerBuildSecretArray{
&cloudbuild.TriggerBuildSecretArgs{
KmsKeyName: pulumi.String("projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name"),
SecretEnv: pulumi.StringMap{
"PASSWORD": pulumi.String("ZW5jcnlwdGVkLXBhc3N3b3JkCg=="),
},
},
},
AvailableSecrets: &cloudbuild.TriggerBuildAvailableSecretsArgs{
SecretManagers: cloudbuild.TriggerBuildAvailableSecretsSecretManagerArray{
&cloudbuild.TriggerBuildAvailableSecretsSecretManagerArgs{
Env: pulumi.String("MY_SECRET"),
VersionName: pulumi.String("projects/myProject/secrets/mySecret/versions/latest"),
},
},
},
Artifacts: &cloudbuild.TriggerBuildArtifactsArgs{
Images: pulumi.StringArray{
pulumi.String("gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"),
},
Objects: &cloudbuild.TriggerBuildArtifactsObjectsArgs{
Location: pulumi.String("gs://bucket/path/to/somewhere/"),
Paths: pulumi.StringArray{
pulumi.String("path"),
},
},
NpmPackages: cloudbuild.TriggerBuildArtifactsNpmPackageArray{
&cloudbuild.TriggerBuildArtifactsNpmPackageArgs{
PackagePath: pulumi.String("package.json"),
Repository: pulumi.String("https://us-west1-npm.pkg.dev/myProject/quickstart-nodejs-repo"),
},
},
PythonPackages: cloudbuild.TriggerBuildArtifactsPythonPackageArray{
&cloudbuild.TriggerBuildArtifactsPythonPackageArgs{
Paths: pulumi.StringArray{
pulumi.String("dist/*"),
},
Repository: pulumi.String("https://us-west1-python.pkg.dev/myProject/quickstart-python-repo"),
},
},
MavenArtifacts: cloudbuild.TriggerBuildArtifactsMavenArtifactArray{
&cloudbuild.TriggerBuildArtifactsMavenArtifactArgs{
Repository: pulumi.String("https://us-west1-maven.pkg.dev/myProject/quickstart-java-repo"),
Path: pulumi.String("/workspace/my-app/target/my-app-1.0.SNAPSHOT.jar"),
ArtifactId: pulumi.String("my-app"),
GroupId: pulumi.String("com.mycompany.app"),
Version: pulumi.String("1.0"),
},
},
},
Options: &cloudbuild.TriggerBuildOptionsArgs{
SourceProvenanceHashes: pulumi.StringArray{
pulumi.String("MD5"),
},
RequestedVerifyOption: pulumi.String("VERIFIED"),
MachineType: pulumi.String("N1_HIGHCPU_8"),
DiskSizeGb: pulumi.Int(100),
SubstitutionOption: pulumi.String("ALLOW_LOOSE"),
DynamicSubstitutions: pulumi.Bool(true),
LogStreamingOption: pulumi.String("STREAM_OFF"),
WorkerPool: pulumi.String("pool"),
Logging: pulumi.String("LEGACY"),
Envs: pulumi.StringArray{
pulumi.String("ekey = evalue"),
},
SecretEnvs: pulumi.StringArray{
pulumi.String("secretenv = svalue"),
},
Volumes: cloudbuild.TriggerBuildOptionsVolumeArray{
&cloudbuild.TriggerBuildOptionsVolumeArgs{
Name: pulumi.String("v1"),
Path: pulumi.String("v1"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var build_trigger = new Gcp.CloudBuild.Trigger("build-trigger", new()
{
Name = "my-trigger",
Location = "global",
TriggerTemplate = new Gcp.CloudBuild.Inputs.TriggerTriggerTemplateArgs
{
BranchName = "main",
RepoName = "my-repo",
},
Build = new Gcp.CloudBuild.Inputs.TriggerBuildArgs
{
Steps = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildStepArgs
{
Name = "gcr.io/cloud-builders/gsutil",
Args = new[]
{
"cp",
"gs://mybucket/remotefile.zip",
"localfile.zip",
},
Timeout = "120s",
SecretEnvs = new[]
{
"MY_SECRET",
},
},
new Gcp.CloudBuild.Inputs.TriggerBuildStepArgs
{
Name = "ubuntu",
Script = "echo hello",
},
},
Source = new Gcp.CloudBuild.Inputs.TriggerBuildSourceArgs
{
StorageSource = new Gcp.CloudBuild.Inputs.TriggerBuildSourceStorageSourceArgs
{
Bucket = "mybucket",
Object = "source_code.tar.gz",
},
},
Tags = new[]
{
"build",
"newFeature",
},
Substitutions =
{
{ "_FOO", "bar" },
{ "_BAZ", "qux" },
},
QueueTtl = "20s",
LogsBucket = "gs://mybucket/logs",
Secrets = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildSecretArgs
{
KmsKeyName = "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
SecretEnv =
{
{ "PASSWORD", "ZW5jcnlwdGVkLXBhc3N3b3JkCg==" },
},
},
},
AvailableSecrets = new Gcp.CloudBuild.Inputs.TriggerBuildAvailableSecretsArgs
{
SecretManagers = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildAvailableSecretsSecretManagerArgs
{
Env = "MY_SECRET",
VersionName = "projects/myProject/secrets/mySecret/versions/latest",
},
},
},
Artifacts = new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsArgs
{
Images = new[]
{
"gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA",
},
Objects = new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsObjectsArgs
{
Location = "gs://bucket/path/to/somewhere/",
Paths = new[]
{
"path",
},
},
NpmPackages = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsNpmPackageArgs
{
PackagePath = "package.json",
Repository = "https://us-west1-npm.pkg.dev/myProject/quickstart-nodejs-repo",
},
},
PythonPackages = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsPythonPackageArgs
{
Paths = new[]
{
"dist/*",
},
Repository = "https://us-west1-python.pkg.dev/myProject/quickstart-python-repo",
},
},
MavenArtifacts = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsMavenArtifactArgs
{
Repository = "https://us-west1-maven.pkg.dev/myProject/quickstart-java-repo",
Path = "/workspace/my-app/target/my-app-1.0.SNAPSHOT.jar",
ArtifactId = "my-app",
GroupId = "com.mycompany.app",
Version = "1.0",
},
},
},
Options = new Gcp.CloudBuild.Inputs.TriggerBuildOptionsArgs
{
SourceProvenanceHashes = new[]
{
"MD5",
},
RequestedVerifyOption = "VERIFIED",
MachineType = "N1_HIGHCPU_8",
DiskSizeGb = 100,
SubstitutionOption = "ALLOW_LOOSE",
DynamicSubstitutions = true,
LogStreamingOption = "STREAM_OFF",
WorkerPool = "pool",
Logging = "LEGACY",
Envs = new[]
{
"ekey = evalue",
},
SecretEnvs = new[]
{
"secretenv = svalue",
},
Volumes = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildOptionsVolumeArgs
{
Name = "v1",
Path = "v1",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerTriggerTemplateArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSourceArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSourceStorageSourceArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildAvailableSecretsArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildArtifactsArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildArtifactsObjectsArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildOptionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var build_trigger = new Trigger("build-trigger", TriggerArgs.builder()
.name("my-trigger")
.location("global")
.triggerTemplate(TriggerTriggerTemplateArgs.builder()
.branchName("main")
.repoName("my-repo")
.build())
.build(TriggerBuildArgs.builder()
.steps(
TriggerBuildStepArgs.builder()
.name("gcr.io/cloud-builders/gsutil")
.args(
"cp",
"gs://mybucket/remotefile.zip",
"localfile.zip")
.timeout("120s")
.secretEnvs("MY_SECRET")
.build(),
TriggerBuildStepArgs.builder()
.name("ubuntu")
.script("echo hello")
.build())
.source(TriggerBuildSourceArgs.builder()
.storageSource(TriggerBuildSourceStorageSourceArgs.builder()
.bucket("mybucket")
.object("source_code.tar.gz")
.build())
.build())
.tags(
"build",
"newFeature")
.substitutions(Map.ofEntries(
Map.entry("_FOO", "bar"),
Map.entry("_BAZ", "qux")
))
.queueTtl("20s")
.logsBucket("gs://mybucket/logs")
.secrets(TriggerBuildSecretArgs.builder()
.kmsKeyName("projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name")
.secretEnv(Map.of("PASSWORD", "ZW5jcnlwdGVkLXBhc3N3b3JkCg=="))
.build())
.availableSecrets(TriggerBuildAvailableSecretsArgs.builder()
.secretManagers(TriggerBuildAvailableSecretsSecretManagerArgs.builder()
.env("MY_SECRET")
.versionName("projects/myProject/secrets/mySecret/versions/latest")
.build())
.build())
.artifacts(TriggerBuildArtifactsArgs.builder()
.images("gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA")
.objects(TriggerBuildArtifactsObjectsArgs.builder()
.location("gs://bucket/path/to/somewhere/")
.paths("path")
.build())
.npmPackages(TriggerBuildArtifactsNpmPackageArgs.builder()
.packagePath("package.json")
.repository("https://us-west1-npm.pkg.dev/myProject/quickstart-nodejs-repo")
.build())
.pythonPackages(TriggerBuildArtifactsPythonPackageArgs.builder()
.paths("dist/*")
.repository("https://us-west1-python.pkg.dev/myProject/quickstart-python-repo")
.build())
.mavenArtifacts(TriggerBuildArtifactsMavenArtifactArgs.builder()
.repository("https://us-west1-maven.pkg.dev/myProject/quickstart-java-repo")
.path("/workspace/my-app/target/my-app-1.0.SNAPSHOT.jar")
.artifactId("my-app")
.groupId("com.mycompany.app")
.version("1.0")
.build())
.build())
.options(TriggerBuildOptionsArgs.builder()
.sourceProvenanceHashes("MD5")
.requestedVerifyOption("VERIFIED")
.machineType("N1_HIGHCPU_8")
.diskSizeGb(100)
.substitutionOption("ALLOW_LOOSE")
.dynamicSubstitutions(true)
.logStreamingOption("STREAM_OFF")
.workerPool("pool")
.logging("LEGACY")
.envs("ekey = evalue")
.secretEnvs("secretenv = svalue")
.volumes(TriggerBuildOptionsVolumeArgs.builder()
.name("v1")
.path("v1")
.build())
.build())
.build())
.build());
}
}
resources:
build-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: my-trigger
location: global
triggerTemplate:
branchName: main
repoName: my-repo
build:
steps:
- name: gcr.io/cloud-builders/gsutil
args:
- cp
- gs://mybucket/remotefile.zip
- localfile.zip
timeout: 120s
secretEnvs:
- MY_SECRET
- name: ubuntu
script: echo hello
source:
storageSource:
bucket: mybucket
object: source_code.tar.gz
tags:
- build
- newFeature
substitutions:
_FOO: bar
_BAZ: qux
queueTtl: 20s
logsBucket: gs://mybucket/logs
secrets:
- kmsKeyName: projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name
secretEnv:
PASSWORD: ZW5jcnlwdGVkLXBhc3N3b3JkCg==
availableSecrets:
secretManagers:
- env: MY_SECRET
versionName: projects/myProject/secrets/mySecret/versions/latest
artifacts:
images:
- gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA
objects:
location: gs://bucket/path/to/somewhere/
paths:
- path
npmPackages:
- packagePath: package.json
repository: https://us-west1-npm.pkg.dev/myProject/quickstart-nodejs-repo
pythonPackages:
- paths:
- dist/*
repository: https://us-west1-python.pkg.dev/myProject/quickstart-python-repo
mavenArtifacts:
- repository: https://us-west1-maven.pkg.dev/myProject/quickstart-java-repo
path: /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar
artifactId: my-app
groupId: com.mycompany.app
version: '1.0'
options:
sourceProvenanceHashes:
- MD5
requestedVerifyOption: VERIFIED
machineType: N1_HIGHCPU_8
diskSizeGb: 100
substitutionOption: ALLOW_LOOSE
dynamicSubstitutions: true
logStreamingOption: STREAM_OFF
workerPool: pool
logging: LEGACY
envs:
- ekey = evalue
secretEnvs:
- secretenv = svalue
volumes:
- name: v1
path: v1
Cloudbuild Trigger Service Account
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const cloudbuildServiceAccount = new gcp.serviceaccount.Account("cloudbuild_service_account", {accountId: "cloud-sa"});
const actAs = new gcp.projects.IAMMember("act_as", {
project: project.then(project => project.projectId),
role: "roles/iam.serviceAccountUser",
member: pulumi.interpolate`serviceAccount:${cloudbuildServiceAccount.email}`,
});
const logsWriter = new gcp.projects.IAMMember("logs_writer", {
project: project.then(project => project.projectId),
role: "roles/logging.logWriter",
member: pulumi.interpolate`serviceAccount:${cloudbuildServiceAccount.email}`,
});
const service_account_trigger = new gcp.cloudbuild.Trigger("service-account-trigger", {
triggerTemplate: {
branchName: "main",
repoName: "my-repo",
},
serviceAccount: cloudbuildServiceAccount.id,
filename: "cloudbuild.yaml",
}, {
dependsOn: [
actAs,
logsWriter,
],
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
cloudbuild_service_account = gcp.serviceaccount.Account("cloudbuild_service_account", account_id="cloud-sa")
act_as = gcp.projects.IAMMember("act_as",
project=project.project_id,
role="roles/iam.serviceAccountUser",
member=cloudbuild_service_account.email.apply(lambda email: f"serviceAccount:{email}"))
logs_writer = gcp.projects.IAMMember("logs_writer",
project=project.project_id,
role="roles/logging.logWriter",
member=cloudbuild_service_account.email.apply(lambda email: f"serviceAccount:{email}"))
service_account_trigger = gcp.cloudbuild.Trigger("service-account-trigger",
trigger_template={
"branch_name": "main",
"repo_name": "my-repo",
},
service_account=cloudbuild_service_account.id,
filename="cloudbuild.yaml",
opts = pulumi.ResourceOptions(depends_on=[
act_as,
logs_writer,
]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/serviceaccount"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, nil, nil)
if err != nil {
return err
}
cloudbuildServiceAccount, err := serviceaccount.NewAccount(ctx, "cloudbuild_service_account", &serviceaccount.AccountArgs{
AccountId: pulumi.String("cloud-sa"),
})
if err != nil {
return err
}
actAs, err := projects.NewIAMMember(ctx, "act_as", &projects.IAMMemberArgs{
Project: pulumi.String(project.ProjectId),
Role: pulumi.String("roles/iam.serviceAccountUser"),
Member: cloudbuildServiceAccount.Email.ApplyT(func(email string) (string, error) {
return fmt.Sprintf("serviceAccount:%v", email), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
logsWriter, err := projects.NewIAMMember(ctx, "logs_writer", &projects.IAMMemberArgs{
Project: pulumi.String(project.ProjectId),
Role: pulumi.String("roles/logging.logWriter"),
Member: cloudbuildServiceAccount.Email.ApplyT(func(email string) (string, error) {
return fmt.Sprintf("serviceAccount:%v", email), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
_, err = cloudbuild.NewTrigger(ctx, "service-account-trigger", &cloudbuild.TriggerArgs{
TriggerTemplate: &cloudbuild.TriggerTriggerTemplateArgs{
BranchName: pulumi.String("main"),
RepoName: pulumi.String("my-repo"),
},
ServiceAccount: cloudbuildServiceAccount.ID(),
Filename: pulumi.String("cloudbuild.yaml"),
}, pulumi.DependsOn([]pulumi.Resource{
actAs,
logsWriter,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var cloudbuildServiceAccount = new Gcp.ServiceAccount.Account("cloudbuild_service_account", new()
{
AccountId = "cloud-sa",
});
var actAs = new Gcp.Projects.IAMMember("act_as", new()
{
Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
Role = "roles/iam.serviceAccountUser",
Member = cloudbuildServiceAccount.Email.Apply(email => $"serviceAccount:{email}"),
});
var logsWriter = new Gcp.Projects.IAMMember("logs_writer", new()
{
Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
Role = "roles/logging.logWriter",
Member = cloudbuildServiceAccount.Email.Apply(email => $"serviceAccount:{email}"),
});
var service_account_trigger = new Gcp.CloudBuild.Trigger("service-account-trigger", new()
{
TriggerTemplate = new Gcp.CloudBuild.Inputs.TriggerTriggerTemplateArgs
{
BranchName = "main",
RepoName = "my-repo",
},
ServiceAccount = cloudbuildServiceAccount.Id,
Filename = "cloudbuild.yaml",
}, new CustomResourceOptions
{
DependsOn =
{
actAs,
logsWriter,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.serviceaccount.Account;
import com.pulumi.gcp.serviceaccount.AccountArgs;
import com.pulumi.gcp.projects.IAMMember;
import com.pulumi.gcp.projects.IAMMemberArgs;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerTriggerTemplateArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var project = OrganizationsFunctions.getProject();
var cloudbuildServiceAccount = new Account("cloudbuildServiceAccount", AccountArgs.builder()
.accountId("cloud-sa")
.build());
var actAs = new IAMMember("actAs", IAMMemberArgs.builder()
.project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
.role("roles/iam.serviceAccountUser")
.member(cloudbuildServiceAccount.email().applyValue(email -> String.format("serviceAccount:%s", email)))
.build());
var logsWriter = new IAMMember("logsWriter", IAMMemberArgs.builder()
.project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
.role("roles/logging.logWriter")
.member(cloudbuildServiceAccount.email().applyValue(email -> String.format("serviceAccount:%s", email)))
.build());
var service_account_trigger = new Trigger("service-account-trigger", TriggerArgs.builder()
.triggerTemplate(TriggerTriggerTemplateArgs.builder()
.branchName("main")
.repoName("my-repo")
.build())
.serviceAccount(cloudbuildServiceAccount.id())
.filename("cloudbuild.yaml")
.build(), CustomResourceOptions.builder()
.dependsOn(
actAs,
logsWriter)
.build());
}
}
resources:
service-account-trigger:
type: gcp:cloudbuild:Trigger
properties:
triggerTemplate:
branchName: main
repoName: my-repo
serviceAccount: ${cloudbuildServiceAccount.id}
filename: cloudbuild.yaml
options:
dependson:
- ${actAs}
- ${logsWriter}
cloudbuildServiceAccount:
type: gcp:serviceaccount:Account
name: cloudbuild_service_account
properties:
accountId: cloud-sa
actAs:
type: gcp:projects:IAMMember
name: act_as
properties:
project: ${project.projectId}
role: roles/iam.serviceAccountUser
member: serviceAccount:${cloudbuildServiceAccount.email}
logsWriter:
type: gcp:projects:IAMMember
name: logs_writer
properties:
project: ${project.projectId}
role: roles/logging.logWriter
member: serviceAccount:${cloudbuildServiceAccount.email}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Cloudbuild Trigger Include Build Logs
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const include_build_logs_trigger = new gcp.cloudbuild.Trigger("include-build-logs-trigger", {
location: "us-central1",
name: "include-build-logs-trigger",
filename: "cloudbuild.yaml",
github: {
owner: "hashicorp",
name: "terraform-provider-google-beta",
push: {
branch: "^main$",
},
},
includeBuildLogs: "INCLUDE_BUILD_LOGS_WITH_STATUS",
});
import pulumi
import pulumi_gcp as gcp
include_build_logs_trigger = gcp.cloudbuild.Trigger("include-build-logs-trigger",
location="us-central1",
name="include-build-logs-trigger",
filename="cloudbuild.yaml",
github={
"owner": "hashicorp",
"name": "terraform-provider-google-beta",
"push": {
"branch": "^main$",
},
},
include_build_logs="INCLUDE_BUILD_LOGS_WITH_STATUS")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "include-build-logs-trigger", &cloudbuild.TriggerArgs{
Location: pulumi.String("us-central1"),
Name: pulumi.String("include-build-logs-trigger"),
Filename: pulumi.String("cloudbuild.yaml"),
Github: &cloudbuild.TriggerGithubArgs{
Owner: pulumi.String("hashicorp"),
Name: pulumi.String("terraform-provider-google-beta"),
Push: &cloudbuild.TriggerGithubPushArgs{
Branch: pulumi.String("^main$"),
},
},
IncludeBuildLogs: pulumi.String("INCLUDE_BUILD_LOGS_WITH_STATUS"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var include_build_logs_trigger = new Gcp.CloudBuild.Trigger("include-build-logs-trigger", new()
{
Location = "us-central1",
Name = "include-build-logs-trigger",
Filename = "cloudbuild.yaml",
Github = new Gcp.CloudBuild.Inputs.TriggerGithubArgs
{
Owner = "hashicorp",
Name = "terraform-provider-google-beta",
Push = new Gcp.CloudBuild.Inputs.TriggerGithubPushArgs
{
Branch = "^main$",
},
},
IncludeBuildLogs = "INCLUDE_BUILD_LOGS_WITH_STATUS",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGithubArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGithubPushArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var include_build_logs_trigger = new Trigger("include-build-logs-trigger", TriggerArgs.builder()
.location("us-central1")
.name("include-build-logs-trigger")
.filename("cloudbuild.yaml")
.github(TriggerGithubArgs.builder()
.owner("hashicorp")
.name("terraform-provider-google-beta")
.push(TriggerGithubPushArgs.builder()
.branch("^main$")
.build())
.build())
.includeBuildLogs("INCLUDE_BUILD_LOGS_WITH_STATUS")
.build());
}
}
resources:
include-build-logs-trigger:
type: gcp:cloudbuild:Trigger
properties:
location: us-central1
name: include-build-logs-trigger
filename: cloudbuild.yaml
github:
owner: hashicorp
name: terraform-provider-google-beta
push:
branch: ^main$
includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS
Cloudbuild Trigger Pubsub Config
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const mytopic = new gcp.pubsub.Topic("mytopic", {name: "my-topic"});
const pubsub_config_trigger = new gcp.cloudbuild.Trigger("pubsub-config-trigger", {
location: "us-central1",
name: "pubsub-trigger",
description: "acceptance test example pubsub build trigger",
pubsubConfig: {
topic: mytopic.id,
},
sourceToBuild: {
uri: "https://hashicorp/terraform-provider-google-beta",
ref: "refs/heads/main",
repoType: "GITHUB",
},
gitFileSource: {
path: "cloudbuild.yaml",
uri: "https://hashicorp/terraform-provider-google-beta",
revision: "refs/heads/main",
repoType: "GITHUB",
},
substitutions: {
_ACTION: "$(body.message.data.action)",
},
filter: "_ACTION.matches('INSERT')",
});
import pulumi
import pulumi_gcp as gcp
mytopic = gcp.pubsub.Topic("mytopic", name="my-topic")
pubsub_config_trigger = gcp.cloudbuild.Trigger("pubsub-config-trigger",
location="us-central1",
name="pubsub-trigger",
description="acceptance test example pubsub build trigger",
pubsub_config={
"topic": mytopic.id,
},
source_to_build={
"uri": "https://hashicorp/terraform-provider-google-beta",
"ref": "refs/heads/main",
"repo_type": "GITHUB",
},
git_file_source={
"path": "cloudbuild.yaml",
"uri": "https://hashicorp/terraform-provider-google-beta",
"revision": "refs/heads/main",
"repo_type": "GITHUB",
},
substitutions={
"_ACTION": "$(body.message.data.action)",
},
filter="_ACTION.matches('INSERT')")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/pubsub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
mytopic, err := pubsub.NewTopic(ctx, "mytopic", &pubsub.TopicArgs{
Name: pulumi.String("my-topic"),
})
if err != nil {
return err
}
_, err = cloudbuild.NewTrigger(ctx, "pubsub-config-trigger", &cloudbuild.TriggerArgs{
Location: pulumi.String("us-central1"),
Name: pulumi.String("pubsub-trigger"),
Description: pulumi.String("acceptance test example pubsub build trigger"),
PubsubConfig: &cloudbuild.TriggerPubsubConfigArgs{
Topic: mytopic.ID(),
},
SourceToBuild: &cloudbuild.TriggerSourceToBuildArgs{
Uri: pulumi.String("https://hashicorp/terraform-provider-google-beta"),
Ref: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
},
GitFileSource: &cloudbuild.TriggerGitFileSourceArgs{
Path: pulumi.String("cloudbuild.yaml"),
Uri: pulumi.String("https://hashicorp/terraform-provider-google-beta"),
Revision: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
},
Substitutions: pulumi.StringMap{
"_ACTION": pulumi.String("$(body.message.data.action)"),
},
Filter: pulumi.String("_ACTION.matches('INSERT')"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var mytopic = new Gcp.PubSub.Topic("mytopic", new()
{
Name = "my-topic",
});
var pubsub_config_trigger = new Gcp.CloudBuild.Trigger("pubsub-config-trigger", new()
{
Location = "us-central1",
Name = "pubsub-trigger",
Description = "acceptance test example pubsub build trigger",
PubsubConfig = new Gcp.CloudBuild.Inputs.TriggerPubsubConfigArgs
{
Topic = mytopic.Id,
},
SourceToBuild = new Gcp.CloudBuild.Inputs.TriggerSourceToBuildArgs
{
Uri = "https://hashicorp/terraform-provider-google-beta",
Ref = "refs/heads/main",
RepoType = "GITHUB",
},
GitFileSource = new Gcp.CloudBuild.Inputs.TriggerGitFileSourceArgs
{
Path = "cloudbuild.yaml",
Uri = "https://hashicorp/terraform-provider-google-beta",
Revision = "refs/heads/main",
RepoType = "GITHUB",
},
Substitutions =
{
{ "_ACTION", "$(body.message.data.action)" },
},
Filter = "_ACTION.matches('INSERT')",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerPubsubConfigArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerSourceToBuildArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGitFileSourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var mytopic = new Topic("mytopic", TopicArgs.builder()
.name("my-topic")
.build());
var pubsub_config_trigger = new Trigger("pubsub-config-trigger", TriggerArgs.builder()
.location("us-central1")
.name("pubsub-trigger")
.description("acceptance test example pubsub build trigger")
.pubsubConfig(TriggerPubsubConfigArgs.builder()
.topic(mytopic.id())
.build())
.sourceToBuild(TriggerSourceToBuildArgs.builder()
.uri("https://hashicorp/terraform-provider-google-beta")
.ref("refs/heads/main")
.repoType("GITHUB")
.build())
.gitFileSource(TriggerGitFileSourceArgs.builder()
.path("cloudbuild.yaml")
.uri("https://hashicorp/terraform-provider-google-beta")
.revision("refs/heads/main")
.repoType("GITHUB")
.build())
.substitutions(Map.of("_ACTION", "$(body.message.data.action)"))
.filter("_ACTION.matches('INSERT')")
.build());
}
}
resources:
mytopic:
type: gcp:pubsub:Topic
properties:
name: my-topic
pubsub-config-trigger:
type: gcp:cloudbuild:Trigger
properties:
location: us-central1
name: pubsub-trigger
description: acceptance test example pubsub build trigger
pubsubConfig:
topic: ${mytopic.id}
sourceToBuild:
uri: https://hashicorp/terraform-provider-google-beta
ref: refs/heads/main
repoType: GITHUB
gitFileSource:
path: cloudbuild.yaml
uri: https://hashicorp/terraform-provider-google-beta
revision: refs/heads/main
repoType: GITHUB
substitutions:
_ACTION: $(body.message.data.action)
filter: _ACTION.matches('INSERT')
Cloudbuild Trigger Webhook Config
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const webhookTriggerSecretKey = new gcp.secretmanager.Secret("webhook_trigger_secret_key", {
secretId: "webhook-trigger-secret-key",
replication: {
userManaged: {
replicas: [{
location: "us-central1",
}],
},
},
});
const webhookTriggerSecretKeyData = new gcp.secretmanager.SecretVersion("webhook_trigger_secret_key_data", {
secret: webhookTriggerSecretKey.id,
secretData: "secretkeygoeshere",
});
const project = gcp.organizations.getProject({});
const secretAccessor = project.then(project => gcp.organizations.getIAMPolicy({
bindings: [{
role: "roles/secretmanager.secretAccessor",
members: [`serviceAccount:service-${project.number}@gcp-sa-cloudbuild.iam.gserviceaccount.com`],
}],
}));
const policy = new gcp.secretmanager.SecretIamPolicy("policy", {
project: webhookTriggerSecretKey.project,
secretId: webhookTriggerSecretKey.secretId,
policyData: secretAccessor.then(secretAccessor => secretAccessor.policyData),
});
const webhook_config_trigger = new gcp.cloudbuild.Trigger("webhook-config-trigger", {
name: "webhook-trigger",
description: "acceptance test example webhook build trigger",
webhookConfig: {
secret: webhookTriggerSecretKeyData.id,
},
sourceToBuild: {
uri: "https://hashicorp/terraform-provider-google-beta",
ref: "refs/heads/main",
repoType: "GITHUB",
},
gitFileSource: {
path: "cloudbuild.yaml",
uri: "https://hashicorp/terraform-provider-google-beta",
revision: "refs/heads/main",
repoType: "GITHUB",
},
});
import pulumi
import pulumi_gcp as gcp
webhook_trigger_secret_key = gcp.secretmanager.Secret("webhook_trigger_secret_key",
secret_id="webhook-trigger-secret-key",
replication={
"user_managed": {
"replicas": [{
"location": "us-central1",
}],
},
})
webhook_trigger_secret_key_data = gcp.secretmanager.SecretVersion("webhook_trigger_secret_key_data",
secret=webhook_trigger_secret_key.id,
secret_data="secretkeygoeshere")
project = gcp.organizations.get_project()
secret_accessor = gcp.organizations.get_iam_policy(bindings=[{
"role": "roles/secretmanager.secretAccessor",
"members": [f"serviceAccount:service-{project.number}@gcp-sa-cloudbuild.iam.gserviceaccount.com"],
}])
policy = gcp.secretmanager.SecretIamPolicy("policy",
project=webhook_trigger_secret_key.project,
secret_id=webhook_trigger_secret_key.secret_id,
policy_data=secret_accessor.policy_data)
webhook_config_trigger = gcp.cloudbuild.Trigger("webhook-config-trigger",
name="webhook-trigger",
description="acceptance test example webhook build trigger",
webhook_config={
"secret": webhook_trigger_secret_key_data.id,
},
source_to_build={
"uri": "https://hashicorp/terraform-provider-google-beta",
"ref": "refs/heads/main",
"repo_type": "GITHUB",
},
git_file_source={
"path": "cloudbuild.yaml",
"uri": "https://hashicorp/terraform-provider-google-beta",
"revision": "refs/heads/main",
"repo_type": "GITHUB",
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
webhookTriggerSecretKey, err := secretmanager.NewSecret(ctx, "webhook_trigger_secret_key", &secretmanager.SecretArgs{
SecretId: pulumi.String("webhook-trigger-secret-key"),
Replication: &secretmanager.SecretReplicationArgs{
UserManaged: &secretmanager.SecretReplicationUserManagedArgs{
Replicas: secretmanager.SecretReplicationUserManagedReplicaArray{
&secretmanager.SecretReplicationUserManagedReplicaArgs{
Location: pulumi.String("us-central1"),
},
},
},
},
})
if err != nil {
return err
}
webhookTriggerSecretKeyData, err := secretmanager.NewSecretVersion(ctx, "webhook_trigger_secret_key_data", &secretmanager.SecretVersionArgs{
Secret: webhookTriggerSecretKey.ID(),
SecretData: pulumi.String("secretkeygoeshere"),
})
if err != nil {
return err
}
project, err := organizations.LookupProject(ctx, nil, nil)
if err != nil {
return err
}
secretAccessor, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
Bindings: []organizations.GetIAMPolicyBinding{
{
Role: "roles/secretmanager.secretAccessor",
Members: []string{
fmt.Sprintf("serviceAccount:service-%v@gcp-sa-cloudbuild.iam.gserviceaccount.com", project.Number),
},
},
},
}, nil)
if err != nil {
return err
}
_, err = secretmanager.NewSecretIamPolicy(ctx, "policy", &secretmanager.SecretIamPolicyArgs{
Project: webhookTriggerSecretKey.Project,
SecretId: webhookTriggerSecretKey.SecretId,
PolicyData: pulumi.String(secretAccessor.PolicyData),
})
if err != nil {
return err
}
_, err = cloudbuild.NewTrigger(ctx, "webhook-config-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("webhook-trigger"),
Description: pulumi.String("acceptance test example webhook build trigger"),
WebhookConfig: &cloudbuild.TriggerWebhookConfigArgs{
Secret: webhookTriggerSecretKeyData.ID(),
},
SourceToBuild: &cloudbuild.TriggerSourceToBuildArgs{
Uri: pulumi.String("https://hashicorp/terraform-provider-google-beta"),
Ref: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
},
GitFileSource: &cloudbuild.TriggerGitFileSourceArgs{
Path: pulumi.String("cloudbuild.yaml"),
Uri: pulumi.String("https://hashicorp/terraform-provider-google-beta"),
Revision: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var webhookTriggerSecretKey = new Gcp.SecretManager.Secret("webhook_trigger_secret_key", new()
{
SecretId = "webhook-trigger-secret-key",
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
UserManaged = new Gcp.SecretManager.Inputs.SecretReplicationUserManagedArgs
{
Replicas = new[]
{
new Gcp.SecretManager.Inputs.SecretReplicationUserManagedReplicaArgs
{
Location = "us-central1",
},
},
},
},
});
var webhookTriggerSecretKeyData = new Gcp.SecretManager.SecretVersion("webhook_trigger_secret_key_data", new()
{
Secret = webhookTriggerSecretKey.Id,
SecretData = "secretkeygoeshere",
});
var project = Gcp.Organizations.GetProject.Invoke();
var secretAccessor = Gcp.Organizations.GetIAMPolicy.Invoke(new()
{
Bindings = new[]
{
new Gcp.Organizations.Inputs.GetIAMPolicyBindingInputArgs
{
Role = "roles/secretmanager.secretAccessor",
Members = new[]
{
$"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-cloudbuild.iam.gserviceaccount.com",
},
},
},
});
var policy = new Gcp.SecretManager.SecretIamPolicy("policy", new()
{
Project = webhookTriggerSecretKey.Project,
SecretId = webhookTriggerSecretKey.SecretId,
PolicyData = secretAccessor.Apply(getIAMPolicyResult => getIAMPolicyResult.PolicyData),
});
var webhook_config_trigger = new Gcp.CloudBuild.Trigger("webhook-config-trigger", new()
{
Name = "webhook-trigger",
Description = "acceptance test example webhook build trigger",
WebhookConfig = new Gcp.CloudBuild.Inputs.TriggerWebhookConfigArgs
{
Secret = webhookTriggerSecretKeyData.Id,
},
SourceToBuild = new Gcp.CloudBuild.Inputs.TriggerSourceToBuildArgs
{
Uri = "https://hashicorp/terraform-provider-google-beta",
Ref = "refs/heads/main",
RepoType = "GITHUB",
},
GitFileSource = new Gcp.CloudBuild.Inputs.TriggerGitFileSourceArgs
{
Path = "cloudbuild.yaml",
Uri = "https://hashicorp/terraform-provider-google-beta",
Revision = "refs/heads/main",
RepoType = "GITHUB",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationUserManagedArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.organizations.inputs.GetIAMPolicyArgs;
import com.pulumi.gcp.secretmanager.SecretIamPolicy;
import com.pulumi.gcp.secretmanager.SecretIamPolicyArgs;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerWebhookConfigArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerSourceToBuildArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGitFileSourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var webhookTriggerSecretKey = new Secret("webhookTriggerSecretKey", SecretArgs.builder()
.secretId("webhook-trigger-secret-key")
.replication(SecretReplicationArgs.builder()
.userManaged(SecretReplicationUserManagedArgs.builder()
.replicas(SecretReplicationUserManagedReplicaArgs.builder()
.location("us-central1")
.build())
.build())
.build())
.build());
var webhookTriggerSecretKeyData = new SecretVersion("webhookTriggerSecretKeyData", SecretVersionArgs.builder()
.secret(webhookTriggerSecretKey.id())
.secretData("secretkeygoeshere")
.build());
final var project = OrganizationsFunctions.getProject();
final var secretAccessor = OrganizationsFunctions.getIAMPolicy(GetIAMPolicyArgs.builder()
.bindings(GetIAMPolicyBindingArgs.builder()
.role("roles/secretmanager.secretAccessor")
.members(String.format("serviceAccount:service-%s@gcp-sa-cloudbuild.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build())
.build());
var policy = new SecretIamPolicy("policy", SecretIamPolicyArgs.builder()
.project(webhookTriggerSecretKey.project())
.secretId(webhookTriggerSecretKey.secretId())
.policyData(secretAccessor.applyValue(getIAMPolicyResult -> getIAMPolicyResult.policyData()))
.build());
var webhook_config_trigger = new Trigger("webhook-config-trigger", TriggerArgs.builder()
.name("webhook-trigger")
.description("acceptance test example webhook build trigger")
.webhookConfig(TriggerWebhookConfigArgs.builder()
.secret(webhookTriggerSecretKeyData.id())
.build())
.sourceToBuild(TriggerSourceToBuildArgs.builder()
.uri("https://hashicorp/terraform-provider-google-beta")
.ref("refs/heads/main")
.repoType("GITHUB")
.build())
.gitFileSource(TriggerGitFileSourceArgs.builder()
.path("cloudbuild.yaml")
.uri("https://hashicorp/terraform-provider-google-beta")
.revision("refs/heads/main")
.repoType("GITHUB")
.build())
.build());
}
}
resources:
webhookTriggerSecretKey:
type: gcp:secretmanager:Secret
name: webhook_trigger_secret_key
properties:
secretId: webhook-trigger-secret-key
replication:
userManaged:
replicas:
- location: us-central1
webhookTriggerSecretKeyData:
type: gcp:secretmanager:SecretVersion
name: webhook_trigger_secret_key_data
properties:
secret: ${webhookTriggerSecretKey.id}
secretData: secretkeygoeshere
policy:
type: gcp:secretmanager:SecretIamPolicy
properties:
project: ${webhookTriggerSecretKey.project}
secretId: ${webhookTriggerSecretKey.secretId}
policyData: ${secretAccessor.policyData}
webhook-config-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: webhook-trigger
description: acceptance test example webhook build trigger
webhookConfig:
secret: ${webhookTriggerSecretKeyData.id}
sourceToBuild:
uri: https://hashicorp/terraform-provider-google-beta
ref: refs/heads/main
repoType: GITHUB
gitFileSource:
path: cloudbuild.yaml
uri: https://hashicorp/terraform-provider-google-beta
revision: refs/heads/main
repoType: GITHUB
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
secretAccessor:
fn::invoke:
Function: gcp:organizations:getIAMPolicy
Arguments:
bindings:
- role: roles/secretmanager.secretAccessor
members:
- serviceAccount:service-${project.number}@gcp-sa-cloudbuild.iam.gserviceaccount.com
Cloudbuild Trigger Manual
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const manual_trigger = new gcp.cloudbuild.Trigger("manual-trigger", {
name: "manual-trigger",
sourceToBuild: {
uri: "https://hashicorp/terraform-provider-google-beta",
ref: "refs/heads/main",
repoType: "GITHUB",
},
gitFileSource: {
path: "cloudbuild.yaml",
uri: "https://hashicorp/terraform-provider-google-beta",
revision: "refs/heads/main",
repoType: "GITHUB",
},
approvalConfig: {
approvalRequired: true,
},
});
import pulumi
import pulumi_gcp as gcp
manual_trigger = gcp.cloudbuild.Trigger("manual-trigger",
name="manual-trigger",
source_to_build={
"uri": "https://hashicorp/terraform-provider-google-beta",
"ref": "refs/heads/main",
"repo_type": "GITHUB",
},
git_file_source={
"path": "cloudbuild.yaml",
"uri": "https://hashicorp/terraform-provider-google-beta",
"revision": "refs/heads/main",
"repo_type": "GITHUB",
},
approval_config={
"approval_required": True,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "manual-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("manual-trigger"),
SourceToBuild: &cloudbuild.TriggerSourceToBuildArgs{
Uri: pulumi.String("https://hashicorp/terraform-provider-google-beta"),
Ref: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
},
GitFileSource: &cloudbuild.TriggerGitFileSourceArgs{
Path: pulumi.String("cloudbuild.yaml"),
Uri: pulumi.String("https://hashicorp/terraform-provider-google-beta"),
Revision: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
},
ApprovalConfig: &cloudbuild.TriggerApprovalConfigArgs{
ApprovalRequired: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var manual_trigger = new Gcp.CloudBuild.Trigger("manual-trigger", new()
{
Name = "manual-trigger",
SourceToBuild = new Gcp.CloudBuild.Inputs.TriggerSourceToBuildArgs
{
Uri = "https://hashicorp/terraform-provider-google-beta",
Ref = "refs/heads/main",
RepoType = "GITHUB",
},
GitFileSource = new Gcp.CloudBuild.Inputs.TriggerGitFileSourceArgs
{
Path = "cloudbuild.yaml",
Uri = "https://hashicorp/terraform-provider-google-beta",
Revision = "refs/heads/main",
RepoType = "GITHUB",
},
ApprovalConfig = new Gcp.CloudBuild.Inputs.TriggerApprovalConfigArgs
{
ApprovalRequired = true,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerSourceToBuildArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGitFileSourceArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerApprovalConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var manual_trigger = new Trigger("manual-trigger", TriggerArgs.builder()
.name("manual-trigger")
.sourceToBuild(TriggerSourceToBuildArgs.builder()
.uri("https://hashicorp/terraform-provider-google-beta")
.ref("refs/heads/main")
.repoType("GITHUB")
.build())
.gitFileSource(TriggerGitFileSourceArgs.builder()
.path("cloudbuild.yaml")
.uri("https://hashicorp/terraform-provider-google-beta")
.revision("refs/heads/main")
.repoType("GITHUB")
.build())
.approvalConfig(TriggerApprovalConfigArgs.builder()
.approvalRequired(true)
.build())
.build());
}
}
resources:
manual-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: manual-trigger
sourceToBuild:
uri: https://hashicorp/terraform-provider-google-beta
ref: refs/heads/main
repoType: GITHUB
gitFileSource:
path: cloudbuild.yaml
uri: https://hashicorp/terraform-provider-google-beta
revision: refs/heads/main
repoType: GITHUB
approvalConfig:
approvalRequired: true
Cloudbuild Trigger Manual Github Enterprise
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const manual_ghe_trigger = new gcp.cloudbuild.Trigger("manual-ghe-trigger", {
name: "",
sourceToBuild: {
uri: "https://hashicorp/terraform-provider-google-beta",
ref: "refs/heads/main",
repoType: "GITHUB",
githubEnterpriseConfig: "projects/myProject/locations/global/githubEnterpriseConfigs/configID",
},
gitFileSource: {
path: "cloudbuild.yaml",
uri: "https://hashicorp/terraform-provider-google-beta",
revision: "refs/heads/main",
repoType: "GITHUB",
githubEnterpriseConfig: "projects/myProject/locations/global/githubEnterpriseConfigs/configID",
},
});
import pulumi
import pulumi_gcp as gcp
manual_ghe_trigger = gcp.cloudbuild.Trigger("manual-ghe-trigger",
name="",
source_to_build={
"uri": "https://hashicorp/terraform-provider-google-beta",
"ref": "refs/heads/main",
"repo_type": "GITHUB",
"github_enterprise_config": "projects/myProject/locations/global/githubEnterpriseConfigs/configID",
},
git_file_source={
"path": "cloudbuild.yaml",
"uri": "https://hashicorp/terraform-provider-google-beta",
"revision": "refs/heads/main",
"repo_type": "GITHUB",
"github_enterprise_config": "projects/myProject/locations/global/githubEnterpriseConfigs/configID",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "manual-ghe-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String(""),
SourceToBuild: &cloudbuild.TriggerSourceToBuildArgs{
Uri: pulumi.String("https://hashicorp/terraform-provider-google-beta"),
Ref: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
GithubEnterpriseConfig: pulumi.String("projects/myProject/locations/global/githubEnterpriseConfigs/configID"),
},
GitFileSource: &cloudbuild.TriggerGitFileSourceArgs{
Path: pulumi.String("cloudbuild.yaml"),
Uri: pulumi.String("https://hashicorp/terraform-provider-google-beta"),
Revision: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
GithubEnterpriseConfig: pulumi.String("projects/myProject/locations/global/githubEnterpriseConfigs/configID"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var manual_ghe_trigger = new Gcp.CloudBuild.Trigger("manual-ghe-trigger", new()
{
Name = "",
SourceToBuild = new Gcp.CloudBuild.Inputs.TriggerSourceToBuildArgs
{
Uri = "https://hashicorp/terraform-provider-google-beta",
Ref = "refs/heads/main",
RepoType = "GITHUB",
GithubEnterpriseConfig = "projects/myProject/locations/global/githubEnterpriseConfigs/configID",
},
GitFileSource = new Gcp.CloudBuild.Inputs.TriggerGitFileSourceArgs
{
Path = "cloudbuild.yaml",
Uri = "https://hashicorp/terraform-provider-google-beta",
Revision = "refs/heads/main",
RepoType = "GITHUB",
GithubEnterpriseConfig = "projects/myProject/locations/global/githubEnterpriseConfigs/configID",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerSourceToBuildArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGitFileSourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var manual_ghe_trigger = new Trigger("manual-ghe-trigger", TriggerArgs.builder()
.name("")
.sourceToBuild(TriggerSourceToBuildArgs.builder()
.uri("https://hashicorp/terraform-provider-google-beta")
.ref("refs/heads/main")
.repoType("GITHUB")
.githubEnterpriseConfig("projects/myProject/locations/global/githubEnterpriseConfigs/configID")
.build())
.gitFileSource(TriggerGitFileSourceArgs.builder()
.path("cloudbuild.yaml")
.uri("https://hashicorp/terraform-provider-google-beta")
.revision("refs/heads/main")
.repoType("GITHUB")
.githubEnterpriseConfig("projects/myProject/locations/global/githubEnterpriseConfigs/configID")
.build())
.build());
}
}
resources:
manual-ghe-trigger:
type: gcp:cloudbuild:Trigger
properties:
name:
sourceToBuild:
uri: https://hashicorp/terraform-provider-google-beta
ref: refs/heads/main
repoType: GITHUB
githubEnterpriseConfig: projects/myProject/locations/global/githubEnterpriseConfigs/configID
gitFileSource:
path: cloudbuild.yaml
uri: https://hashicorp/terraform-provider-google-beta
revision: refs/heads/main
repoType: GITHUB
githubEnterpriseConfig: projects/myProject/locations/global/githubEnterpriseConfigs/configID
Cloudbuild Trigger Manual Bitbucket Server
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const manual_bitbucket_trigger = new gcp.cloudbuild.Trigger("manual-bitbucket-trigger", {
name: "terraform-manual-bbs-trigger",
sourceToBuild: {
uri: "https://bbs.com/scm/stag/test-repo.git",
ref: "refs/heads/main",
repoType: "BITBUCKET_SERVER",
bitbucketServerConfig: "projects/myProject/locations/global/bitbucketServerConfigs/configID",
},
gitFileSource: {
path: "cloudbuild.yaml",
uri: "https://bbs.com/scm/stag/test-repo.git",
revision: "refs/heads/main",
repoType: "BITBUCKET_SERVER",
bitbucketServerConfig: "projects/myProject/locations/global/bitbucketServerConfigs/configID",
},
});
import pulumi
import pulumi_gcp as gcp
manual_bitbucket_trigger = gcp.cloudbuild.Trigger("manual-bitbucket-trigger",
name="terraform-manual-bbs-trigger",
source_to_build={
"uri": "https://bbs.com/scm/stag/test-repo.git",
"ref": "refs/heads/main",
"repo_type": "BITBUCKET_SERVER",
"bitbucket_server_config": "projects/myProject/locations/global/bitbucketServerConfigs/configID",
},
git_file_source={
"path": "cloudbuild.yaml",
"uri": "https://bbs.com/scm/stag/test-repo.git",
"revision": "refs/heads/main",
"repo_type": "BITBUCKET_SERVER",
"bitbucket_server_config": "projects/myProject/locations/global/bitbucketServerConfigs/configID",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "manual-bitbucket-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("terraform-manual-bbs-trigger"),
SourceToBuild: &cloudbuild.TriggerSourceToBuildArgs{
Uri: pulumi.String("https://bbs.com/scm/stag/test-repo.git"),
Ref: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("BITBUCKET_SERVER"),
BitbucketServerConfig: pulumi.String("projects/myProject/locations/global/bitbucketServerConfigs/configID"),
},
GitFileSource: &cloudbuild.TriggerGitFileSourceArgs{
Path: pulumi.String("cloudbuild.yaml"),
Uri: pulumi.String("https://bbs.com/scm/stag/test-repo.git"),
Revision: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("BITBUCKET_SERVER"),
BitbucketServerConfig: pulumi.String("projects/myProject/locations/global/bitbucketServerConfigs/configID"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var manual_bitbucket_trigger = new Gcp.CloudBuild.Trigger("manual-bitbucket-trigger", new()
{
Name = "terraform-manual-bbs-trigger",
SourceToBuild = new Gcp.CloudBuild.Inputs.TriggerSourceToBuildArgs
{
Uri = "https://bbs.com/scm/stag/test-repo.git",
Ref = "refs/heads/main",
RepoType = "BITBUCKET_SERVER",
BitbucketServerConfig = "projects/myProject/locations/global/bitbucketServerConfigs/configID",
},
GitFileSource = new Gcp.CloudBuild.Inputs.TriggerGitFileSourceArgs
{
Path = "cloudbuild.yaml",
Uri = "https://bbs.com/scm/stag/test-repo.git",
Revision = "refs/heads/main",
RepoType = "BITBUCKET_SERVER",
BitbucketServerConfig = "projects/myProject/locations/global/bitbucketServerConfigs/configID",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerSourceToBuildArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGitFileSourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var manual_bitbucket_trigger = new Trigger("manual-bitbucket-trigger", TriggerArgs.builder()
.name("terraform-manual-bbs-trigger")
.sourceToBuild(TriggerSourceToBuildArgs.builder()
.uri("https://bbs.com/scm/stag/test-repo.git")
.ref("refs/heads/main")
.repoType("BITBUCKET_SERVER")
.bitbucketServerConfig("projects/myProject/locations/global/bitbucketServerConfigs/configID")
.build())
.gitFileSource(TriggerGitFileSourceArgs.builder()
.path("cloudbuild.yaml")
.uri("https://bbs.com/scm/stag/test-repo.git")
.revision("refs/heads/main")
.repoType("BITBUCKET_SERVER")
.bitbucketServerConfig("projects/myProject/locations/global/bitbucketServerConfigs/configID")
.build())
.build());
}
}
resources:
manual-bitbucket-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: terraform-manual-bbs-trigger
sourceToBuild:
uri: https://bbs.com/scm/stag/test-repo.git
ref: refs/heads/main
repoType: BITBUCKET_SERVER
bitbucketServerConfig: projects/myProject/locations/global/bitbucketServerConfigs/configID
gitFileSource:
path: cloudbuild.yaml
uri: https://bbs.com/scm/stag/test-repo.git
revision: refs/heads/main
repoType: BITBUCKET_SERVER
bitbucketServerConfig: projects/myProject/locations/global/bitbucketServerConfigs/configID
Cloudbuild Trigger Repo
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_connection = new gcp.cloudbuildv2.Connection("my-connection", {
location: "us-central1",
name: "my-connection",
githubConfig: {
appInstallationId: 123123,
authorizerCredential: {
oauthTokenSecretVersion: "projects/my-project/secrets/github-pat-secret/versions/latest",
},
},
});
const my_repository = new gcp.cloudbuildv2.Repository("my-repository", {
name: "my-repo",
parentConnection: my_connection.id,
remoteUri: "https://github.com/myuser/my-repo.git",
});
const repo_trigger = new gcp.cloudbuild.Trigger("repo-trigger", {
location: "us-central1",
repositoryEventConfig: {
repository: my_repository.id,
push: {
branch: "feature-.*",
},
},
filename: "cloudbuild.yaml",
});
import pulumi
import pulumi_gcp as gcp
my_connection = gcp.cloudbuildv2.Connection("my-connection",
location="us-central1",
name="my-connection",
github_config={
"app_installation_id": 123123,
"authorizer_credential": {
"oauth_token_secret_version": "projects/my-project/secrets/github-pat-secret/versions/latest",
},
})
my_repository = gcp.cloudbuildv2.Repository("my-repository",
name="my-repo",
parent_connection=my_connection.id,
remote_uri="https://github.com/myuser/my-repo.git")
repo_trigger = gcp.cloudbuild.Trigger("repo-trigger",
location="us-central1",
repository_event_config={
"repository": my_repository.id,
"push": {
"branch": "feature-.*",
},
},
filename="cloudbuild.yaml")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuildv2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuildv2.NewConnection(ctx, "my-connection", &cloudbuildv2.ConnectionArgs{
Location: pulumi.String("us-central1"),
Name: pulumi.String("my-connection"),
GithubConfig: &cloudbuildv2.ConnectionGithubConfigArgs{
AppInstallationId: pulumi.Int(123123),
AuthorizerCredential: &cloudbuildv2.ConnectionGithubConfigAuthorizerCredentialArgs{
OauthTokenSecretVersion: pulumi.String("projects/my-project/secrets/github-pat-secret/versions/latest"),
},
},
})
if err != nil {
return err
}
_, err = cloudbuildv2.NewRepository(ctx, "my-repository", &cloudbuildv2.RepositoryArgs{
Name: pulumi.String("my-repo"),
ParentConnection: my_connection.ID(),
RemoteUri: pulumi.String("https://github.com/myuser/my-repo.git"),
})
if err != nil {
return err
}
_, err = cloudbuild.NewTrigger(ctx, "repo-trigger", &cloudbuild.TriggerArgs{
Location: pulumi.String("us-central1"),
RepositoryEventConfig: &cloudbuild.TriggerRepositoryEventConfigArgs{
Repository: my_repository.ID(),
Push: &cloudbuild.TriggerRepositoryEventConfigPushArgs{
Branch: pulumi.String("feature-.*"),
},
},
Filename: pulumi.String("cloudbuild.yaml"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_connection = new Gcp.CloudBuildV2.Connection("my-connection", new()
{
Location = "us-central1",
Name = "my-connection",
GithubConfig = new Gcp.CloudBuildV2.Inputs.ConnectionGithubConfigArgs
{
AppInstallationId = 123123,
AuthorizerCredential = new Gcp.CloudBuildV2.Inputs.ConnectionGithubConfigAuthorizerCredentialArgs
{
OauthTokenSecretVersion = "projects/my-project/secrets/github-pat-secret/versions/latest",
},
},
});
var my_repository = new Gcp.CloudBuildV2.Repository("my-repository", new()
{
Name = "my-repo",
ParentConnection = my_connection.Id,
RemoteUri = "https://github.com/myuser/my-repo.git",
});
var repo_trigger = new Gcp.CloudBuild.Trigger("repo-trigger", new()
{
Location = "us-central1",
RepositoryEventConfig = new Gcp.CloudBuild.Inputs.TriggerRepositoryEventConfigArgs
{
Repository = my_repository.Id,
Push = new Gcp.CloudBuild.Inputs.TriggerRepositoryEventConfigPushArgs
{
Branch = "feature-.*",
},
},
Filename = "cloudbuild.yaml",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuildv2.Connection;
import com.pulumi.gcp.cloudbuildv2.ConnectionArgs;
import com.pulumi.gcp.cloudbuildv2.inputs.ConnectionGithubConfigArgs;
import com.pulumi.gcp.cloudbuildv2.inputs.ConnectionGithubConfigAuthorizerCredentialArgs;
import com.pulumi.gcp.cloudbuildv2.Repository;
import com.pulumi.gcp.cloudbuildv2.RepositoryArgs;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerRepositoryEventConfigArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerRepositoryEventConfigPushArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var my_connection = new Connection("my-connection", ConnectionArgs.builder()
.location("us-central1")
.name("my-connection")
.githubConfig(ConnectionGithubConfigArgs.builder()
.appInstallationId(123123)
.authorizerCredential(ConnectionGithubConfigAuthorizerCredentialArgs.builder()
.oauthTokenSecretVersion("projects/my-project/secrets/github-pat-secret/versions/latest")
.build())
.build())
.build());
var my_repository = new Repository("my-repository", RepositoryArgs.builder()
.name("my-repo")
.parentConnection(my_connection.id())
.remoteUri("https://github.com/myuser/my-repo.git")
.build());
var repo_trigger = new Trigger("repo-trigger", TriggerArgs.builder()
.location("us-central1")
.repositoryEventConfig(TriggerRepositoryEventConfigArgs.builder()
.repository(my_repository.id())
.push(TriggerRepositoryEventConfigPushArgs.builder()
.branch("feature-.*")
.build())
.build())
.filename("cloudbuild.yaml")
.build());
}
}
resources:
my-connection:
type: gcp:cloudbuildv2:Connection
properties:
location: us-central1
name: my-connection
githubConfig:
appInstallationId: 123123
authorizerCredential:
oauthTokenSecretVersion: projects/my-project/secrets/github-pat-secret/versions/latest
my-repository:
type: gcp:cloudbuildv2:Repository
properties:
name: my-repo
parentConnection: ${["my-connection"].id}
remoteUri: https://github.com/myuser/my-repo.git
repo-trigger:
type: gcp:cloudbuild:Trigger
properties:
location: us-central1
repositoryEventConfig:
repository: ${["my-repository"].id}
push:
branch: feature-.*
filename: cloudbuild.yaml
Cloudbuild Trigger Bitbucket Server Push
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const bbs_push_trigger = new gcp.cloudbuild.Trigger("bbs-push-trigger", {
name: "bbs-push-trigger",
location: "us-central1",
bitbucketServerTriggerConfig: {
repoSlug: "bbs-push-trigger",
projectKey: "STAG",
bitbucketServerConfigResource: "projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig",
push: {
tag: "^0.1.*",
invertRegex: true,
},
},
filename: "cloudbuild.yaml",
});
import pulumi
import pulumi_gcp as gcp
bbs_push_trigger = gcp.cloudbuild.Trigger("bbs-push-trigger",
name="bbs-push-trigger",
location="us-central1",
bitbucket_server_trigger_config={
"repo_slug": "bbs-push-trigger",
"project_key": "STAG",
"bitbucket_server_config_resource": "projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig",
"push": {
"tag": "^0.1.*",
"invert_regex": True,
},
},
filename="cloudbuild.yaml")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "bbs-push-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("bbs-push-trigger"),
Location: pulumi.String("us-central1"),
BitbucketServerTriggerConfig: &cloudbuild.TriggerBitbucketServerTriggerConfigArgs{
RepoSlug: pulumi.String("bbs-push-trigger"),
ProjectKey: pulumi.String("STAG"),
BitbucketServerConfigResource: pulumi.String("projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig"),
Push: &cloudbuild.TriggerBitbucketServerTriggerConfigPushArgs{
Tag: pulumi.String("^0.1.*"),
InvertRegex: pulumi.Bool(true),
},
},
Filename: pulumi.String("cloudbuild.yaml"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var bbs_push_trigger = new Gcp.CloudBuild.Trigger("bbs-push-trigger", new()
{
Name = "bbs-push-trigger",
Location = "us-central1",
BitbucketServerTriggerConfig = new Gcp.CloudBuild.Inputs.TriggerBitbucketServerTriggerConfigArgs
{
RepoSlug = "bbs-push-trigger",
ProjectKey = "STAG",
BitbucketServerConfigResource = "projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig",
Push = new Gcp.CloudBuild.Inputs.TriggerBitbucketServerTriggerConfigPushArgs
{
Tag = "^0.1.*",
InvertRegex = true,
},
},
Filename = "cloudbuild.yaml",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBitbucketServerTriggerConfigArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBitbucketServerTriggerConfigPushArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var bbs_push_trigger = new Trigger("bbs-push-trigger", TriggerArgs.builder()
.name("bbs-push-trigger")
.location("us-central1")
.bitbucketServerTriggerConfig(TriggerBitbucketServerTriggerConfigArgs.builder()
.repoSlug("bbs-push-trigger")
.projectKey("STAG")
.bitbucketServerConfigResource("projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig")
.push(TriggerBitbucketServerTriggerConfigPushArgs.builder()
.tag("^0.1.*")
.invertRegex(true)
.build())
.build())
.filename("cloudbuild.yaml")
.build());
}
}
resources:
bbs-push-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: bbs-push-trigger
location: us-central1
bitbucketServerTriggerConfig:
repoSlug: bbs-push-trigger
projectKey: STAG
bitbucketServerConfigResource: projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig
push:
tag: ^0.1.*
invertRegex: true
filename: cloudbuild.yaml
Cloudbuild Trigger Bitbucket Server Pull Request
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const bbs_pull_request_trigger = new gcp.cloudbuild.Trigger("bbs-pull-request-trigger", {
name: "ghe-trigger",
location: "us-central1",
bitbucketServerTriggerConfig: {
repoSlug: "terraform-provider-google",
projectKey: "STAG",
bitbucketServerConfigResource: "projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig",
pullRequest: {
branch: "^master$",
invertRegex: false,
commentControl: "COMMENTS_ENABLED",
},
},
filename: "cloudbuild.yaml",
});
import pulumi
import pulumi_gcp as gcp
bbs_pull_request_trigger = gcp.cloudbuild.Trigger("bbs-pull-request-trigger",
name="ghe-trigger",
location="us-central1",
bitbucket_server_trigger_config={
"repo_slug": "terraform-provider-google",
"project_key": "STAG",
"bitbucket_server_config_resource": "projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig",
"pull_request": {
"branch": "^master$",
"invert_regex": False,
"comment_control": "COMMENTS_ENABLED",
},
},
filename="cloudbuild.yaml")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "bbs-pull-request-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("ghe-trigger"),
Location: pulumi.String("us-central1"),
BitbucketServerTriggerConfig: &cloudbuild.TriggerBitbucketServerTriggerConfigArgs{
RepoSlug: pulumi.String("terraform-provider-google"),
ProjectKey: pulumi.String("STAG"),
BitbucketServerConfigResource: pulumi.String("projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig"),
PullRequest: &cloudbuild.TriggerBitbucketServerTriggerConfigPullRequestArgs{
Branch: pulumi.String("^master$"),
InvertRegex: pulumi.Bool(false),
CommentControl: pulumi.String("COMMENTS_ENABLED"),
},
},
Filename: pulumi.String("cloudbuild.yaml"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var bbs_pull_request_trigger = new Gcp.CloudBuild.Trigger("bbs-pull-request-trigger", new()
{
Name = "ghe-trigger",
Location = "us-central1",
BitbucketServerTriggerConfig = new Gcp.CloudBuild.Inputs.TriggerBitbucketServerTriggerConfigArgs
{
RepoSlug = "terraform-provider-google",
ProjectKey = "STAG",
BitbucketServerConfigResource = "projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig",
PullRequest = new Gcp.CloudBuild.Inputs.TriggerBitbucketServerTriggerConfigPullRequestArgs
{
Branch = "^master$",
InvertRegex = false,
CommentControl = "COMMENTS_ENABLED",
},
},
Filename = "cloudbuild.yaml",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBitbucketServerTriggerConfigArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBitbucketServerTriggerConfigPullRequestArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var bbs_pull_request_trigger = new Trigger("bbs-pull-request-trigger", TriggerArgs.builder()
.name("ghe-trigger")
.location("us-central1")
.bitbucketServerTriggerConfig(TriggerBitbucketServerTriggerConfigArgs.builder()
.repoSlug("terraform-provider-google")
.projectKey("STAG")
.bitbucketServerConfigResource("projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig")
.pullRequest(TriggerBitbucketServerTriggerConfigPullRequestArgs.builder()
.branch("^master$")
.invertRegex(false)
.commentControl("COMMENTS_ENABLED")
.build())
.build())
.filename("cloudbuild.yaml")
.build());
}
}
resources:
bbs-pull-request-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: ghe-trigger
location: us-central1
bitbucketServerTriggerConfig:
repoSlug: terraform-provider-google
projectKey: STAG
bitbucketServerConfigResource: projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig
pullRequest:
branch: ^master$
invertRegex: false
commentControl: COMMENTS_ENABLED
filename: cloudbuild.yaml
Cloudbuild Trigger Github Enterprise
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const ghe_trigger = new gcp.cloudbuild.Trigger("ghe-trigger", {
name: "ghe-trigger",
location: "us-central1",
github: {
owner: "hashicorp",
name: "terraform-provider-google",
push: {
branch: "^main$",
},
enterpriseConfigResourceName: "projects/123456789/locations/us-central1/githubEnterpriseConfigs/configID",
},
filename: "cloudbuild.yaml",
});
import pulumi
import pulumi_gcp as gcp
ghe_trigger = gcp.cloudbuild.Trigger("ghe-trigger",
name="ghe-trigger",
location="us-central1",
github={
"owner": "hashicorp",
"name": "terraform-provider-google",
"push": {
"branch": "^main$",
},
"enterprise_config_resource_name": "projects/123456789/locations/us-central1/githubEnterpriseConfigs/configID",
},
filename="cloudbuild.yaml")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "ghe-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("ghe-trigger"),
Location: pulumi.String("us-central1"),
Github: &cloudbuild.TriggerGithubArgs{
Owner: pulumi.String("hashicorp"),
Name: pulumi.String("terraform-provider-google"),
Push: &cloudbuild.TriggerGithubPushArgs{
Branch: pulumi.String("^main$"),
},
EnterpriseConfigResourceName: pulumi.String("projects/123456789/locations/us-central1/githubEnterpriseConfigs/configID"),
},
Filename: pulumi.String("cloudbuild.yaml"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var ghe_trigger = new Gcp.CloudBuild.Trigger("ghe-trigger", new()
{
Name = "ghe-trigger",
Location = "us-central1",
Github = new Gcp.CloudBuild.Inputs.TriggerGithubArgs
{
Owner = "hashicorp",
Name = "terraform-provider-google",
Push = new Gcp.CloudBuild.Inputs.TriggerGithubPushArgs
{
Branch = "^main$",
},
EnterpriseConfigResourceName = "projects/123456789/locations/us-central1/githubEnterpriseConfigs/configID",
},
Filename = "cloudbuild.yaml",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGithubArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGithubPushArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ghe_trigger = new Trigger("ghe-trigger", TriggerArgs.builder()
.name("ghe-trigger")
.location("us-central1")
.github(TriggerGithubArgs.builder()
.owner("hashicorp")
.name("terraform-provider-google")
.push(TriggerGithubPushArgs.builder()
.branch("^main$")
.build())
.enterpriseConfigResourceName("projects/123456789/locations/us-central1/githubEnterpriseConfigs/configID")
.build())
.filename("cloudbuild.yaml")
.build());
}
}
resources:
ghe-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: ghe-trigger
location: us-central1
github:
owner: hashicorp
name: terraform-provider-google
push:
branch: ^main$
enterpriseConfigResourceName: projects/123456789/locations/us-central1/githubEnterpriseConfigs/configID
filename: cloudbuild.yaml
Cloudbuild Trigger Allow Failure
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const allow_failure_trigger = new gcp.cloudbuild.Trigger("allow-failure-trigger", {
name: "my-trigger",
location: "global",
triggerTemplate: {
branchName: "main",
repoName: "my-repo",
},
build: {
steps: [{
name: "ubuntu",
args: [
"-c",
"exit 1",
],
allowFailure: true,
}],
source: {
storageSource: {
bucket: "mybucket",
object: "source_code.tar.gz",
},
},
tags: [
"build",
"newFeature",
],
substitutions: {
_FOO: "bar",
_BAZ: "qux",
},
queueTtl: "20s",
logsBucket: "gs://mybucket/logs",
secrets: [{
kmsKeyName: "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
secretEnv: {
PASSWORD: "ZW5jcnlwdGVkLXBhc3N3b3JkCg==",
},
}],
availableSecrets: {
secretManagers: [{
env: "MY_SECRET",
versionName: "projects/myProject/secrets/mySecret/versions/latest",
}],
},
artifacts: {
images: ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"],
objects: {
location: "gs://bucket/path/to/somewhere/",
paths: ["path"],
},
},
options: {
sourceProvenanceHashes: ["MD5"],
requestedVerifyOption: "VERIFIED",
machineType: "N1_HIGHCPU_8",
diskSizeGb: 100,
substitutionOption: "ALLOW_LOOSE",
dynamicSubstitutions: true,
logStreamingOption: "STREAM_OFF",
workerPool: "pool",
logging: "LEGACY",
envs: ["ekey = evalue"],
secretEnvs: ["secretenv = svalue"],
volumes: [{
name: "v1",
path: "v1",
}],
},
},
});
import pulumi
import pulumi_gcp as gcp
allow_failure_trigger = gcp.cloudbuild.Trigger("allow-failure-trigger",
name="my-trigger",
location="global",
trigger_template={
"branch_name": "main",
"repo_name": "my-repo",
},
build={
"steps": [{
"name": "ubuntu",
"args": [
"-c",
"exit 1",
],
"allow_failure": True,
}],
"source": {
"storage_source": {
"bucket": "mybucket",
"object": "source_code.tar.gz",
},
},
"tags": [
"build",
"newFeature",
],
"substitutions": {
"__foo": "bar",
"__baz": "qux",
},
"queue_ttl": "20s",
"logs_bucket": "gs://mybucket/logs",
"secrets": [{
"kms_key_name": "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
"secret_env": {
"password": "ZW5jcnlwdGVkLXBhc3N3b3JkCg==",
},
}],
"available_secrets": {
"secret_managers": [{
"env": "MY_SECRET",
"version_name": "projects/myProject/secrets/mySecret/versions/latest",
}],
},
"artifacts": {
"images": ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"],
"objects": {
"location": "gs://bucket/path/to/somewhere/",
"paths": ["path"],
},
},
"options": {
"source_provenance_hashes": ["MD5"],
"requested_verify_option": "VERIFIED",
"machine_type": "N1_HIGHCPU_8",
"disk_size_gb": 100,
"substitution_option": "ALLOW_LOOSE",
"dynamic_substitutions": True,
"log_streaming_option": "STREAM_OFF",
"worker_pool": "pool",
"logging": "LEGACY",
"envs": ["ekey = evalue"],
"secret_envs": ["secretenv = svalue"],
"volumes": [{
"name": "v1",
"path": "v1",
}],
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "allow-failure-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("my-trigger"),
Location: pulumi.String("global"),
TriggerTemplate: &cloudbuild.TriggerTriggerTemplateArgs{
BranchName: pulumi.String("main"),
RepoName: pulumi.String("my-repo"),
},
Build: &cloudbuild.TriggerBuildArgs{
Steps: cloudbuild.TriggerBuildStepArray{
&cloudbuild.TriggerBuildStepArgs{
Name: pulumi.String("ubuntu"),
Args: pulumi.StringArray{
pulumi.String("-c"),
pulumi.String("exit 1"),
},
AllowFailure: pulumi.Bool(true),
},
},
Source: &cloudbuild.TriggerBuildSourceArgs{
StorageSource: &cloudbuild.TriggerBuildSourceStorageSourceArgs{
Bucket: pulumi.String("mybucket"),
Object: pulumi.String("source_code.tar.gz"),
},
},
Tags: pulumi.StringArray{
pulumi.String("build"),
pulumi.String("newFeature"),
},
Substitutions: pulumi.StringMap{
"_FOO": pulumi.String("bar"),
"_BAZ": pulumi.String("qux"),
},
QueueTtl: pulumi.String("20s"),
LogsBucket: pulumi.String("gs://mybucket/logs"),
Secrets: cloudbuild.TriggerBuildSecretArray{
&cloudbuild.TriggerBuildSecretArgs{
KmsKeyName: pulumi.String("projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name"),
SecretEnv: pulumi.StringMap{
"PASSWORD": pulumi.String("ZW5jcnlwdGVkLXBhc3N3b3JkCg=="),
},
},
},
AvailableSecrets: &cloudbuild.TriggerBuildAvailableSecretsArgs{
SecretManagers: cloudbuild.TriggerBuildAvailableSecretsSecretManagerArray{
&cloudbuild.TriggerBuildAvailableSecretsSecretManagerArgs{
Env: pulumi.String("MY_SECRET"),
VersionName: pulumi.String("projects/myProject/secrets/mySecret/versions/latest"),
},
},
},
Artifacts: &cloudbuild.TriggerBuildArtifactsArgs{
Images: pulumi.StringArray{
pulumi.String("gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"),
},
Objects: &cloudbuild.TriggerBuildArtifactsObjectsArgs{
Location: pulumi.String("gs://bucket/path/to/somewhere/"),
Paths: pulumi.StringArray{
pulumi.String("path"),
},
},
},
Options: &cloudbuild.TriggerBuildOptionsArgs{
SourceProvenanceHashes: pulumi.StringArray{
pulumi.String("MD5"),
},
RequestedVerifyOption: pulumi.String("VERIFIED"),
MachineType: pulumi.String("N1_HIGHCPU_8"),
DiskSizeGb: pulumi.Int(100),
SubstitutionOption: pulumi.String("ALLOW_LOOSE"),
DynamicSubstitutions: pulumi.Bool(true),
LogStreamingOption: pulumi.String("STREAM_OFF"),
WorkerPool: pulumi.String("pool"),
Logging: pulumi.String("LEGACY"),
Envs: pulumi.StringArray{
pulumi.String("ekey = evalue"),
},
SecretEnvs: pulumi.StringArray{
pulumi.String("secretenv = svalue"),
},
Volumes: cloudbuild.TriggerBuildOptionsVolumeArray{
&cloudbuild.TriggerBuildOptionsVolumeArgs{
Name: pulumi.String("v1"),
Path: pulumi.String("v1"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var allow_failure_trigger = new Gcp.CloudBuild.Trigger("allow-failure-trigger", new()
{
Name = "my-trigger",
Location = "global",
TriggerTemplate = new Gcp.CloudBuild.Inputs.TriggerTriggerTemplateArgs
{
BranchName = "main",
RepoName = "my-repo",
},
Build = new Gcp.CloudBuild.Inputs.TriggerBuildArgs
{
Steps = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildStepArgs
{
Name = "ubuntu",
Args = new[]
{
"-c",
"exit 1",
},
AllowFailure = true,
},
},
Source = new Gcp.CloudBuild.Inputs.TriggerBuildSourceArgs
{
StorageSource = new Gcp.CloudBuild.Inputs.TriggerBuildSourceStorageSourceArgs
{
Bucket = "mybucket",
Object = "source_code.tar.gz",
},
},
Tags = new[]
{
"build",
"newFeature",
},
Substitutions =
{
{ "_FOO", "bar" },
{ "_BAZ", "qux" },
},
QueueTtl = "20s",
LogsBucket = "gs://mybucket/logs",
Secrets = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildSecretArgs
{
KmsKeyName = "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
SecretEnv =
{
{ "PASSWORD", "ZW5jcnlwdGVkLXBhc3N3b3JkCg==" },
},
},
},
AvailableSecrets = new Gcp.CloudBuild.Inputs.TriggerBuildAvailableSecretsArgs
{
SecretManagers = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildAvailableSecretsSecretManagerArgs
{
Env = "MY_SECRET",
VersionName = "projects/myProject/secrets/mySecret/versions/latest",
},
},
},
Artifacts = new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsArgs
{
Images = new[]
{
"gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA",
},
Objects = new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsObjectsArgs
{
Location = "gs://bucket/path/to/somewhere/",
Paths = new[]
{
"path",
},
},
},
Options = new Gcp.CloudBuild.Inputs.TriggerBuildOptionsArgs
{
SourceProvenanceHashes = new[]
{
"MD5",
},
RequestedVerifyOption = "VERIFIED",
MachineType = "N1_HIGHCPU_8",
DiskSizeGb = 100,
SubstitutionOption = "ALLOW_LOOSE",
DynamicSubstitutions = true,
LogStreamingOption = "STREAM_OFF",
WorkerPool = "pool",
Logging = "LEGACY",
Envs = new[]
{
"ekey = evalue",
},
SecretEnvs = new[]
{
"secretenv = svalue",
},
Volumes = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildOptionsVolumeArgs
{
Name = "v1",
Path = "v1",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerTriggerTemplateArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSourceArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSourceStorageSourceArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildAvailableSecretsArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildArtifactsArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildArtifactsObjectsArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildOptionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var allow_failure_trigger = new Trigger("allow-failure-trigger", TriggerArgs.builder()
.name("my-trigger")
.location("global")
.triggerTemplate(TriggerTriggerTemplateArgs.builder()
.branchName("main")
.repoName("my-repo")
.build())
.build(TriggerBuildArgs.builder()
.steps(TriggerBuildStepArgs.builder()
.name("ubuntu")
.args(
"-c",
"exit 1")
.allowFailure(true)
.build())
.source(TriggerBuildSourceArgs.builder()
.storageSource(TriggerBuildSourceStorageSourceArgs.builder()
.bucket("mybucket")
.object("source_code.tar.gz")
.build())
.build())
.tags(
"build",
"newFeature")
.substitutions(Map.ofEntries(
Map.entry("_FOO", "bar"),
Map.entry("_BAZ", "qux")
))
.queueTtl("20s")
.logsBucket("gs://mybucket/logs")
.secrets(TriggerBuildSecretArgs.builder()
.kmsKeyName("projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name")
.secretEnv(Map.of("PASSWORD", "ZW5jcnlwdGVkLXBhc3N3b3JkCg=="))
.build())
.availableSecrets(TriggerBuildAvailableSecretsArgs.builder()
.secretManagers(TriggerBuildAvailableSecretsSecretManagerArgs.builder()
.env("MY_SECRET")
.versionName("projects/myProject/secrets/mySecret/versions/latest")
.build())
.build())
.artifacts(TriggerBuildArtifactsArgs.builder()
.images("gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA")
.objects(TriggerBuildArtifactsObjectsArgs.builder()
.location("gs://bucket/path/to/somewhere/")
.paths("path")
.build())
.build())
.options(TriggerBuildOptionsArgs.builder()
.sourceProvenanceHashes("MD5")
.requestedVerifyOption("VERIFIED")
.machineType("N1_HIGHCPU_8")
.diskSizeGb(100)
.substitutionOption("ALLOW_LOOSE")
.dynamicSubstitutions(true)
.logStreamingOption("STREAM_OFF")
.workerPool("pool")
.logging("LEGACY")
.envs("ekey = evalue")
.secretEnvs("secretenv = svalue")
.volumes(TriggerBuildOptionsVolumeArgs.builder()
.name("v1")
.path("v1")
.build())
.build())
.build())
.build());
}
}
resources:
allow-failure-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: my-trigger
location: global
triggerTemplate:
branchName: main
repoName: my-repo
build:
steps:
- name: ubuntu
args:
- -c
- exit 1
allowFailure: true
source:
storageSource:
bucket: mybucket
object: source_code.tar.gz
tags:
- build
- newFeature
substitutions:
_FOO: bar
_BAZ: qux
queueTtl: 20s
logsBucket: gs://mybucket/logs
secrets:
- kmsKeyName: projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name
secretEnv:
PASSWORD: ZW5jcnlwdGVkLXBhc3N3b3JkCg==
availableSecrets:
secretManagers:
- env: MY_SECRET
versionName: projects/myProject/secrets/mySecret/versions/latest
artifacts:
images:
- gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA
objects:
location: gs://bucket/path/to/somewhere/
paths:
- path
options:
sourceProvenanceHashes:
- MD5
requestedVerifyOption: VERIFIED
machineType: N1_HIGHCPU_8
diskSizeGb: 100
substitutionOption: ALLOW_LOOSE
dynamicSubstitutions: true
logStreamingOption: STREAM_OFF
workerPool: pool
logging: LEGACY
envs:
- ekey = evalue
secretEnvs:
- secretenv = svalue
volumes:
- name: v1
path: v1
Cloudbuild Trigger Allow Exit Codes
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const allow_exit_codes_trigger = new gcp.cloudbuild.Trigger("allow-exit-codes-trigger", {
name: "my-trigger",
location: "global",
triggerTemplate: {
branchName: "main",
repoName: "my-repo",
},
build: {
steps: [{
name: "ubuntu",
args: [
"-c",
"exit 1",
],
allowExitCodes: [
1,
3,
],
}],
source: {
storageSource: {
bucket: "mybucket",
object: "source_code.tar.gz",
},
},
tags: [
"build",
"newFeature",
],
substitutions: {
_FOO: "bar",
_BAZ: "qux",
},
queueTtl: "20s",
logsBucket: "gs://mybucket/logs",
secrets: [{
kmsKeyName: "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
secretEnv: {
PASSWORD: "ZW5jcnlwdGVkLXBhc3N3b3JkCg==",
},
}],
availableSecrets: {
secretManagers: [{
env: "MY_SECRET",
versionName: "projects/myProject/secrets/mySecret/versions/latest",
}],
},
artifacts: {
images: ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"],
objects: {
location: "gs://bucket/path/to/somewhere/",
paths: ["path"],
},
},
options: {
sourceProvenanceHashes: ["MD5"],
requestedVerifyOption: "VERIFIED",
machineType: "N1_HIGHCPU_8",
diskSizeGb: 100,
substitutionOption: "ALLOW_LOOSE",
dynamicSubstitutions: true,
logStreamingOption: "STREAM_OFF",
workerPool: "pool",
logging: "LEGACY",
envs: ["ekey = evalue"],
secretEnvs: ["secretenv = svalue"],
volumes: [{
name: "v1",
path: "v1",
}],
},
},
});
import pulumi
import pulumi_gcp as gcp
allow_exit_codes_trigger = gcp.cloudbuild.Trigger("allow-exit-codes-trigger",
name="my-trigger",
location="global",
trigger_template={
"branch_name": "main",
"repo_name": "my-repo",
},
build={
"steps": [{
"name": "ubuntu",
"args": [
"-c",
"exit 1",
],
"allow_exit_codes": [
1,
3,
],
}],
"source": {
"storage_source": {
"bucket": "mybucket",
"object": "source_code.tar.gz",
},
},
"tags": [
"build",
"newFeature",
],
"substitutions": {
"__foo": "bar",
"__baz": "qux",
},
"queue_ttl": "20s",
"logs_bucket": "gs://mybucket/logs",
"secrets": [{
"kms_key_name": "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
"secret_env": {
"password": "ZW5jcnlwdGVkLXBhc3N3b3JkCg==",
},
}],
"available_secrets": {
"secret_managers": [{
"env": "MY_SECRET",
"version_name": "projects/myProject/secrets/mySecret/versions/latest",
}],
},
"artifacts": {
"images": ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"],
"objects": {
"location": "gs://bucket/path/to/somewhere/",
"paths": ["path"],
},
},
"options": {
"source_provenance_hashes": ["MD5"],
"requested_verify_option": "VERIFIED",
"machine_type": "N1_HIGHCPU_8",
"disk_size_gb": 100,
"substitution_option": "ALLOW_LOOSE",
"dynamic_substitutions": True,
"log_streaming_option": "STREAM_OFF",
"worker_pool": "pool",
"logging": "LEGACY",
"envs": ["ekey = evalue"],
"secret_envs": ["secretenv = svalue"],
"volumes": [{
"name": "v1",
"path": "v1",
}],
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewTrigger(ctx, "allow-exit-codes-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("my-trigger"),
Location: pulumi.String("global"),
TriggerTemplate: &cloudbuild.TriggerTriggerTemplateArgs{
BranchName: pulumi.String("main"),
RepoName: pulumi.String("my-repo"),
},
Build: &cloudbuild.TriggerBuildArgs{
Steps: cloudbuild.TriggerBuildStepArray{
&cloudbuild.TriggerBuildStepArgs{
Name: pulumi.String("ubuntu"),
Args: pulumi.StringArray{
pulumi.String("-c"),
pulumi.String("exit 1"),
},
AllowExitCodes: pulumi.IntArray{
pulumi.Int(1),
pulumi.Int(3),
},
},
},
Source: &cloudbuild.TriggerBuildSourceArgs{
StorageSource: &cloudbuild.TriggerBuildSourceStorageSourceArgs{
Bucket: pulumi.String("mybucket"),
Object: pulumi.String("source_code.tar.gz"),
},
},
Tags: pulumi.StringArray{
pulumi.String("build"),
pulumi.String("newFeature"),
},
Substitutions: pulumi.StringMap{
"_FOO": pulumi.String("bar"),
"_BAZ": pulumi.String("qux"),
},
QueueTtl: pulumi.String("20s"),
LogsBucket: pulumi.String("gs://mybucket/logs"),
Secrets: cloudbuild.TriggerBuildSecretArray{
&cloudbuild.TriggerBuildSecretArgs{
KmsKeyName: pulumi.String("projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name"),
SecretEnv: pulumi.StringMap{
"PASSWORD": pulumi.String("ZW5jcnlwdGVkLXBhc3N3b3JkCg=="),
},
},
},
AvailableSecrets: &cloudbuild.TriggerBuildAvailableSecretsArgs{
SecretManagers: cloudbuild.TriggerBuildAvailableSecretsSecretManagerArray{
&cloudbuild.TriggerBuildAvailableSecretsSecretManagerArgs{
Env: pulumi.String("MY_SECRET"),
VersionName: pulumi.String("projects/myProject/secrets/mySecret/versions/latest"),
},
},
},
Artifacts: &cloudbuild.TriggerBuildArtifactsArgs{
Images: pulumi.StringArray{
pulumi.String("gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"),
},
Objects: &cloudbuild.TriggerBuildArtifactsObjectsArgs{
Location: pulumi.String("gs://bucket/path/to/somewhere/"),
Paths: pulumi.StringArray{
pulumi.String("path"),
},
},
},
Options: &cloudbuild.TriggerBuildOptionsArgs{
SourceProvenanceHashes: pulumi.StringArray{
pulumi.String("MD5"),
},
RequestedVerifyOption: pulumi.String("VERIFIED"),
MachineType: pulumi.String("N1_HIGHCPU_8"),
DiskSizeGb: pulumi.Int(100),
SubstitutionOption: pulumi.String("ALLOW_LOOSE"),
DynamicSubstitutions: pulumi.Bool(true),
LogStreamingOption: pulumi.String("STREAM_OFF"),
WorkerPool: pulumi.String("pool"),
Logging: pulumi.String("LEGACY"),
Envs: pulumi.StringArray{
pulumi.String("ekey = evalue"),
},
SecretEnvs: pulumi.StringArray{
pulumi.String("secretenv = svalue"),
},
Volumes: cloudbuild.TriggerBuildOptionsVolumeArray{
&cloudbuild.TriggerBuildOptionsVolumeArgs{
Name: pulumi.String("v1"),
Path: pulumi.String("v1"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var allow_exit_codes_trigger = new Gcp.CloudBuild.Trigger("allow-exit-codes-trigger", new()
{
Name = "my-trigger",
Location = "global",
TriggerTemplate = new Gcp.CloudBuild.Inputs.TriggerTriggerTemplateArgs
{
BranchName = "main",
RepoName = "my-repo",
},
Build = new Gcp.CloudBuild.Inputs.TriggerBuildArgs
{
Steps = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildStepArgs
{
Name = "ubuntu",
Args = new[]
{
"-c",
"exit 1",
},
AllowExitCodes = new[]
{
1,
3,
},
},
},
Source = new Gcp.CloudBuild.Inputs.TriggerBuildSourceArgs
{
StorageSource = new Gcp.CloudBuild.Inputs.TriggerBuildSourceStorageSourceArgs
{
Bucket = "mybucket",
Object = "source_code.tar.gz",
},
},
Tags = new[]
{
"build",
"newFeature",
},
Substitutions =
{
{ "_FOO", "bar" },
{ "_BAZ", "qux" },
},
QueueTtl = "20s",
LogsBucket = "gs://mybucket/logs",
Secrets = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildSecretArgs
{
KmsKeyName = "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
SecretEnv =
{
{ "PASSWORD", "ZW5jcnlwdGVkLXBhc3N3b3JkCg==" },
},
},
},
AvailableSecrets = new Gcp.CloudBuild.Inputs.TriggerBuildAvailableSecretsArgs
{
SecretManagers = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildAvailableSecretsSecretManagerArgs
{
Env = "MY_SECRET",
VersionName = "projects/myProject/secrets/mySecret/versions/latest",
},
},
},
Artifacts = new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsArgs
{
Images = new[]
{
"gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA",
},
Objects = new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsObjectsArgs
{
Location = "gs://bucket/path/to/somewhere/",
Paths = new[]
{
"path",
},
},
},
Options = new Gcp.CloudBuild.Inputs.TriggerBuildOptionsArgs
{
SourceProvenanceHashes = new[]
{
"MD5",
},
RequestedVerifyOption = "VERIFIED",
MachineType = "N1_HIGHCPU_8",
DiskSizeGb = 100,
SubstitutionOption = "ALLOW_LOOSE",
DynamicSubstitutions = true,
LogStreamingOption = "STREAM_OFF",
WorkerPool = "pool",
Logging = "LEGACY",
Envs = new[]
{
"ekey = evalue",
},
SecretEnvs = new[]
{
"secretenv = svalue",
},
Volumes = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildOptionsVolumeArgs
{
Name = "v1",
Path = "v1",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerTriggerTemplateArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSourceArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSourceStorageSourceArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildAvailableSecretsArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildArtifactsArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildArtifactsObjectsArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildOptionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var allow_exit_codes_trigger = new Trigger("allow-exit-codes-trigger", TriggerArgs.builder()
.name("my-trigger")
.location("global")
.triggerTemplate(TriggerTriggerTemplateArgs.builder()
.branchName("main")
.repoName("my-repo")
.build())
.build(TriggerBuildArgs.builder()
.steps(TriggerBuildStepArgs.builder()
.name("ubuntu")
.args(
"-c",
"exit 1")
.allowExitCodes(
1,
3)
.build())
.source(TriggerBuildSourceArgs.builder()
.storageSource(TriggerBuildSourceStorageSourceArgs.builder()
.bucket("mybucket")
.object("source_code.tar.gz")
.build())
.build())
.tags(
"build",
"newFeature")
.substitutions(Map.ofEntries(
Map.entry("_FOO", "bar"),
Map.entry("_BAZ", "qux")
))
.queueTtl("20s")
.logsBucket("gs://mybucket/logs")
.secrets(TriggerBuildSecretArgs.builder()
.kmsKeyName("projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name")
.secretEnv(Map.of("PASSWORD", "ZW5jcnlwdGVkLXBhc3N3b3JkCg=="))
.build())
.availableSecrets(TriggerBuildAvailableSecretsArgs.builder()
.secretManagers(TriggerBuildAvailableSecretsSecretManagerArgs.builder()
.env("MY_SECRET")
.versionName("projects/myProject/secrets/mySecret/versions/latest")
.build())
.build())
.artifacts(TriggerBuildArtifactsArgs.builder()
.images("gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA")
.objects(TriggerBuildArtifactsObjectsArgs.builder()
.location("gs://bucket/path/to/somewhere/")
.paths("path")
.build())
.build())
.options(TriggerBuildOptionsArgs.builder()
.sourceProvenanceHashes("MD5")
.requestedVerifyOption("VERIFIED")
.machineType("N1_HIGHCPU_8")
.diskSizeGb(100)
.substitutionOption("ALLOW_LOOSE")
.dynamicSubstitutions(true)
.logStreamingOption("STREAM_OFF")
.workerPool("pool")
.logging("LEGACY")
.envs("ekey = evalue")
.secretEnvs("secretenv = svalue")
.volumes(TriggerBuildOptionsVolumeArgs.builder()
.name("v1")
.path("v1")
.build())
.build())
.build())
.build());
}
}
resources:
allow-exit-codes-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: my-trigger
location: global
triggerTemplate:
branchName: main
repoName: my-repo
build:
steps:
- name: ubuntu
args:
- -c
- exit 1
allowExitCodes:
- 1
- 3
source:
storageSource:
bucket: mybucket
object: source_code.tar.gz
tags:
- build
- newFeature
substitutions:
_FOO: bar
_BAZ: qux
queueTtl: 20s
logsBucket: gs://mybucket/logs
secrets:
- kmsKeyName: projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name
secretEnv:
PASSWORD: ZW5jcnlwdGVkLXBhc3N3b3JkCg==
availableSecrets:
secretManagers:
- env: MY_SECRET
versionName: projects/myProject/secrets/mySecret/versions/latest
artifacts:
images:
- gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA
objects:
location: gs://bucket/path/to/somewhere/
paths:
- path
options:
sourceProvenanceHashes:
- MD5
requestedVerifyOption: VERIFIED
machineType: N1_HIGHCPU_8
diskSizeGb: 100
substitutionOption: ALLOW_LOOSE
dynamicSubstitutions: true
logStreamingOption: STREAM_OFF
workerPool: pool
logging: LEGACY
envs:
- ekey = evalue
secretEnvs:
- secretenv = svalue
volumes:
- name: v1
path: v1
Cloudbuild Trigger Pubsub With Repo
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_connection = new gcp.cloudbuildv2.Connection("my-connection", {
location: "us-central1",
name: "my-connection",
githubConfig: {
appInstallationId: 123123,
authorizerCredential: {
oauthTokenSecretVersion: "projects/my-project/secrets/github-pat-secret/versions/latest",
},
},
});
const my_repository = new gcp.cloudbuildv2.Repository("my-repository", {
name: "my-repo",
parentConnection: my_connection.id,
remoteUri: "https://github.com/myuser/my-repo.git",
});
const mytopic = new gcp.pubsub.Topic("mytopic", {name: "my-topic"});
const pubsub_with_repo_trigger = new gcp.cloudbuild.Trigger("pubsub-with-repo-trigger", {
name: "pubsub-with-repo-trigger",
location: "us-central1",
pubsubConfig: {
topic: mytopic.id,
},
sourceToBuild: {
repository: my_repository.id,
ref: "refs/heads/main",
repoType: "GITHUB",
},
gitFileSource: {
path: "cloudbuild.yaml",
repository: my_repository.id,
revision: "refs/heads/main",
repoType: "GITHUB",
},
});
import pulumi
import pulumi_gcp as gcp
my_connection = gcp.cloudbuildv2.Connection("my-connection",
location="us-central1",
name="my-connection",
github_config={
"app_installation_id": 123123,
"authorizer_credential": {
"oauth_token_secret_version": "projects/my-project/secrets/github-pat-secret/versions/latest",
},
})
my_repository = gcp.cloudbuildv2.Repository("my-repository",
name="my-repo",
parent_connection=my_connection.id,
remote_uri="https://github.com/myuser/my-repo.git")
mytopic = gcp.pubsub.Topic("mytopic", name="my-topic")
pubsub_with_repo_trigger = gcp.cloudbuild.Trigger("pubsub-with-repo-trigger",
name="pubsub-with-repo-trigger",
location="us-central1",
pubsub_config={
"topic": mytopic.id,
},
source_to_build={
"repository": my_repository.id,
"ref": "refs/heads/main",
"repo_type": "GITHUB",
},
git_file_source={
"path": "cloudbuild.yaml",
"repository": my_repository.id,
"revision": "refs/heads/main",
"repo_type": "GITHUB",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuildv2"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/pubsub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuildv2.NewConnection(ctx, "my-connection", &cloudbuildv2.ConnectionArgs{
Location: pulumi.String("us-central1"),
Name: pulumi.String("my-connection"),
GithubConfig: &cloudbuildv2.ConnectionGithubConfigArgs{
AppInstallationId: pulumi.Int(123123),
AuthorizerCredential: &cloudbuildv2.ConnectionGithubConfigAuthorizerCredentialArgs{
OauthTokenSecretVersion: pulumi.String("projects/my-project/secrets/github-pat-secret/versions/latest"),
},
},
})
if err != nil {
return err
}
_, err = cloudbuildv2.NewRepository(ctx, "my-repository", &cloudbuildv2.RepositoryArgs{
Name: pulumi.String("my-repo"),
ParentConnection: my_connection.ID(),
RemoteUri: pulumi.String("https://github.com/myuser/my-repo.git"),
})
if err != nil {
return err
}
mytopic, err := pubsub.NewTopic(ctx, "mytopic", &pubsub.TopicArgs{
Name: pulumi.String("my-topic"),
})
if err != nil {
return err
}
_, err = cloudbuild.NewTrigger(ctx, "pubsub-with-repo-trigger", &cloudbuild.TriggerArgs{
Name: pulumi.String("pubsub-with-repo-trigger"),
Location: pulumi.String("us-central1"),
PubsubConfig: &cloudbuild.TriggerPubsubConfigArgs{
Topic: mytopic.ID(),
},
SourceToBuild: &cloudbuild.TriggerSourceToBuildArgs{
Repository: my_repository.ID(),
Ref: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
},
GitFileSource: &cloudbuild.TriggerGitFileSourceArgs{
Path: pulumi.String("cloudbuild.yaml"),
Repository: my_repository.ID(),
Revision: pulumi.String("refs/heads/main"),
RepoType: pulumi.String("GITHUB"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_connection = new Gcp.CloudBuildV2.Connection("my-connection", new()
{
Location = "us-central1",
Name = "my-connection",
GithubConfig = new Gcp.CloudBuildV2.Inputs.ConnectionGithubConfigArgs
{
AppInstallationId = 123123,
AuthorizerCredential = new Gcp.CloudBuildV2.Inputs.ConnectionGithubConfigAuthorizerCredentialArgs
{
OauthTokenSecretVersion = "projects/my-project/secrets/github-pat-secret/versions/latest",
},
},
});
var my_repository = new Gcp.CloudBuildV2.Repository("my-repository", new()
{
Name = "my-repo",
ParentConnection = my_connection.Id,
RemoteUri = "https://github.com/myuser/my-repo.git",
});
var mytopic = new Gcp.PubSub.Topic("mytopic", new()
{
Name = "my-topic",
});
var pubsub_with_repo_trigger = new Gcp.CloudBuild.Trigger("pubsub-with-repo-trigger", new()
{
Name = "pubsub-with-repo-trigger",
Location = "us-central1",
PubsubConfig = new Gcp.CloudBuild.Inputs.TriggerPubsubConfigArgs
{
Topic = mytopic.Id,
},
SourceToBuild = new Gcp.CloudBuild.Inputs.TriggerSourceToBuildArgs
{
Repository = my_repository.Id,
Ref = "refs/heads/main",
RepoType = "GITHUB",
},
GitFileSource = new Gcp.CloudBuild.Inputs.TriggerGitFileSourceArgs
{
Path = "cloudbuild.yaml",
Repository = my_repository.Id,
Revision = "refs/heads/main",
RepoType = "GITHUB",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuildv2.Connection;
import com.pulumi.gcp.cloudbuildv2.ConnectionArgs;
import com.pulumi.gcp.cloudbuildv2.inputs.ConnectionGithubConfigArgs;
import com.pulumi.gcp.cloudbuildv2.inputs.ConnectionGithubConfigAuthorizerCredentialArgs;
import com.pulumi.gcp.cloudbuildv2.Repository;
import com.pulumi.gcp.cloudbuildv2.RepositoryArgs;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.cloudbuild.Trigger;
import com.pulumi.gcp.cloudbuild.TriggerArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerPubsubConfigArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerSourceToBuildArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGitFileSourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var my_connection = new Connection("my-connection", ConnectionArgs.builder()
.location("us-central1")
.name("my-connection")
.githubConfig(ConnectionGithubConfigArgs.builder()
.appInstallationId(123123)
.authorizerCredential(ConnectionGithubConfigAuthorizerCredentialArgs.builder()
.oauthTokenSecretVersion("projects/my-project/secrets/github-pat-secret/versions/latest")
.build())
.build())
.build());
var my_repository = new Repository("my-repository", RepositoryArgs.builder()
.name("my-repo")
.parentConnection(my_connection.id())
.remoteUri("https://github.com/myuser/my-repo.git")
.build());
var mytopic = new Topic("mytopic", TopicArgs.builder()
.name("my-topic")
.build());
var pubsub_with_repo_trigger = new Trigger("pubsub-with-repo-trigger", TriggerArgs.builder()
.name("pubsub-with-repo-trigger")
.location("us-central1")
.pubsubConfig(TriggerPubsubConfigArgs.builder()
.topic(mytopic.id())
.build())
.sourceToBuild(TriggerSourceToBuildArgs.builder()
.repository(my_repository.id())
.ref("refs/heads/main")
.repoType("GITHUB")
.build())
.gitFileSource(TriggerGitFileSourceArgs.builder()
.path("cloudbuild.yaml")
.repository(my_repository.id())
.revision("refs/heads/main")
.repoType("GITHUB")
.build())
.build());
}
}
resources:
my-connection:
type: gcp:cloudbuildv2:Connection
properties:
location: us-central1
name: my-connection
githubConfig:
appInstallationId: 123123
authorizerCredential:
oauthTokenSecretVersion: projects/my-project/secrets/github-pat-secret/versions/latest
my-repository:
type: gcp:cloudbuildv2:Repository
properties:
name: my-repo
parentConnection: ${["my-connection"].id}
remoteUri: https://github.com/myuser/my-repo.git
mytopic:
type: gcp:pubsub:Topic
properties:
name: my-topic
pubsub-with-repo-trigger:
type: gcp:cloudbuild:Trigger
properties:
name: pubsub-with-repo-trigger
location: us-central1
pubsubConfig:
topic: ${mytopic.id}
sourceToBuild:
repository: ${["my-repository"].id}
ref: refs/heads/main
repoType: GITHUB
gitFileSource:
path: cloudbuild.yaml
repository: ${["my-repository"].id}
revision: refs/heads/main
repoType: GITHUB
Create Trigger Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Trigger(name: string, args?: TriggerArgs, opts?: CustomResourceOptions);
@overload
def Trigger(resource_name: str,
args: Optional[TriggerArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Trigger(resource_name: str,
opts: Optional[ResourceOptions] = None,
approval_config: Optional[TriggerApprovalConfigArgs] = None,
bitbucket_server_trigger_config: Optional[TriggerBitbucketServerTriggerConfigArgs] = None,
build: Optional[TriggerBuildArgs] = None,
description: Optional[str] = None,
disabled: Optional[bool] = None,
filename: Optional[str] = None,
filter: Optional[str] = None,
git_file_source: Optional[TriggerGitFileSourceArgs] = None,
github: Optional[TriggerGithubArgs] = None,
ignored_files: Optional[Sequence[str]] = None,
include_build_logs: Optional[str] = None,
included_files: Optional[Sequence[str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pubsub_config: Optional[TriggerPubsubConfigArgs] = None,
repository_event_config: Optional[TriggerRepositoryEventConfigArgs] = None,
service_account: Optional[str] = None,
source_to_build: Optional[TriggerSourceToBuildArgs] = None,
substitutions: Optional[Mapping[str, str]] = None,
tags: Optional[Sequence[str]] = None,
trigger_template: Optional[TriggerTriggerTemplateArgs] = None,
webhook_config: Optional[TriggerWebhookConfigArgs] = None)
func NewTrigger(ctx *Context, name string, args *TriggerArgs, opts ...ResourceOption) (*Trigger, error)
public Trigger(string name, TriggerArgs? args = null, CustomResourceOptions? opts = null)
public Trigger(String name, TriggerArgs args)
public Trigger(String name, TriggerArgs args, CustomResourceOptions options)
type: gcp:cloudbuild:Trigger
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TriggerArgs
- 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 TriggerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var triggerResource = new Gcp.CloudBuild.Trigger("triggerResource", new()
{
ApprovalConfig = new Gcp.CloudBuild.Inputs.TriggerApprovalConfigArgs
{
ApprovalRequired = false,
},
BitbucketServerTriggerConfig = new Gcp.CloudBuild.Inputs.TriggerBitbucketServerTriggerConfigArgs
{
BitbucketServerConfigResource = "string",
ProjectKey = "string",
RepoSlug = "string",
PullRequest = new Gcp.CloudBuild.Inputs.TriggerBitbucketServerTriggerConfigPullRequestArgs
{
Branch = "string",
CommentControl = "string",
InvertRegex = false,
},
Push = new Gcp.CloudBuild.Inputs.TriggerBitbucketServerTriggerConfigPushArgs
{
Branch = "string",
InvertRegex = false,
Tag = "string",
},
},
Build = new Gcp.CloudBuild.Inputs.TriggerBuildArgs
{
Steps = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildStepArgs
{
Name = "string",
Id = "string",
Args = new[]
{
"string",
},
Dir = "string",
Entrypoint = "string",
Envs = new[]
{
"string",
},
AllowExitCodes = new[]
{
0,
},
AllowFailure = false,
Script = "string",
SecretEnvs = new[]
{
"string",
},
Timeout = "string",
Timing = "string",
Volumes = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildStepVolumeArgs
{
Name = "string",
Path = "string",
},
},
WaitFors = new[]
{
"string",
},
},
},
Artifacts = new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsArgs
{
Images = new[]
{
"string",
},
MavenArtifacts = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsMavenArtifactArgs
{
ArtifactId = "string",
GroupId = "string",
Path = "string",
Repository = "string",
Version = "string",
},
},
NpmPackages = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsNpmPackageArgs
{
PackagePath = "string",
Repository = "string",
},
},
Objects = new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsObjectsArgs
{
Location = "string",
Paths = new[]
{
"string",
},
Timings = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsObjectsTimingArgs
{
EndTime = "string",
StartTime = "string",
},
},
},
PythonPackages = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildArtifactsPythonPackageArgs
{
Paths = new[]
{
"string",
},
Repository = "string",
},
},
},
AvailableSecrets = new Gcp.CloudBuild.Inputs.TriggerBuildAvailableSecretsArgs
{
SecretManagers = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildAvailableSecretsSecretManagerArgs
{
Env = "string",
VersionName = "string",
},
},
},
Images = new[]
{
"string",
},
LogsBucket = "string",
Options = new Gcp.CloudBuild.Inputs.TriggerBuildOptionsArgs
{
DiskSizeGb = 0,
DynamicSubstitutions = false,
Envs = new[]
{
"string",
},
LogStreamingOption = "string",
Logging = "string",
MachineType = "string",
RequestedVerifyOption = "string",
SecretEnvs = new[]
{
"string",
},
SourceProvenanceHashes = new[]
{
"string",
},
SubstitutionOption = "string",
Volumes = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildOptionsVolumeArgs
{
Name = "string",
Path = "string",
},
},
WorkerPool = "string",
},
QueueTtl = "string",
Secrets = new[]
{
new Gcp.CloudBuild.Inputs.TriggerBuildSecretArgs
{
KmsKeyName = "string",
SecretEnv =
{
{ "string", "string" },
},
},
},
Source = new Gcp.CloudBuild.Inputs.TriggerBuildSourceArgs
{
RepoSource = new Gcp.CloudBuild.Inputs.TriggerBuildSourceRepoSourceArgs
{
RepoName = "string",
BranchName = "string",
CommitSha = "string",
Dir = "string",
InvertRegex = false,
ProjectId = "string",
Substitutions =
{
{ "string", "string" },
},
TagName = "string",
},
StorageSource = new Gcp.CloudBuild.Inputs.TriggerBuildSourceStorageSourceArgs
{
Bucket = "string",
Object = "string",
Generation = "string",
},
},
Substitutions =
{
{ "string", "string" },
},
Tags = new[]
{
"string",
},
Timeout = "string",
},
Description = "string",
Disabled = false,
Filename = "string",
Filter = "string",
GitFileSource = new Gcp.CloudBuild.Inputs.TriggerGitFileSourceArgs
{
Path = "string",
RepoType = "string",
BitbucketServerConfig = "string",
GithubEnterpriseConfig = "string",
Repository = "string",
Revision = "string",
Uri = "string",
},
Github = new Gcp.CloudBuild.Inputs.TriggerGithubArgs
{
EnterpriseConfigResourceName = "string",
Name = "string",
Owner = "string",
PullRequest = new Gcp.CloudBuild.Inputs.TriggerGithubPullRequestArgs
{
Branch = "string",
CommentControl = "string",
InvertRegex = false,
},
Push = new Gcp.CloudBuild.Inputs.TriggerGithubPushArgs
{
Branch = "string",
InvertRegex = false,
Tag = "string",
},
},
IgnoredFiles = new[]
{
"string",
},
IncludeBuildLogs = "string",
IncludedFiles = new[]
{
"string",
},
Location = "string",
Name = "string",
Project = "string",
PubsubConfig = new Gcp.CloudBuild.Inputs.TriggerPubsubConfigArgs
{
Topic = "string",
ServiceAccountEmail = "string",
State = "string",
Subscription = "string",
},
RepositoryEventConfig = new Gcp.CloudBuild.Inputs.TriggerRepositoryEventConfigArgs
{
PullRequest = new Gcp.CloudBuild.Inputs.TriggerRepositoryEventConfigPullRequestArgs
{
Branch = "string",
CommentControl = "string",
InvertRegex = false,
},
Push = new Gcp.CloudBuild.Inputs.TriggerRepositoryEventConfigPushArgs
{
Branch = "string",
InvertRegex = false,
Tag = "string",
},
Repository = "string",
},
ServiceAccount = "string",
SourceToBuild = new Gcp.CloudBuild.Inputs.TriggerSourceToBuildArgs
{
Ref = "string",
RepoType = "string",
BitbucketServerConfig = "string",
GithubEnterpriseConfig = "string",
Repository = "string",
Uri = "string",
},
Substitutions =
{
{ "string", "string" },
},
Tags = new[]
{
"string",
},
TriggerTemplate = new Gcp.CloudBuild.Inputs.TriggerTriggerTemplateArgs
{
BranchName = "string",
CommitSha = "string",
Dir = "string",
InvertRegex = false,
ProjectId = "string",
RepoName = "string",
TagName = "string",
},
WebhookConfig = new Gcp.CloudBuild.Inputs.TriggerWebhookConfigArgs
{
Secret = "string",
State = "string",
},
});
example, err := cloudbuild.NewTrigger(ctx, "triggerResource", &cloudbuild.TriggerArgs{
ApprovalConfig: &cloudbuild.TriggerApprovalConfigArgs{
ApprovalRequired: pulumi.Bool(false),
},
BitbucketServerTriggerConfig: &cloudbuild.TriggerBitbucketServerTriggerConfigArgs{
BitbucketServerConfigResource: pulumi.String("string"),
ProjectKey: pulumi.String("string"),
RepoSlug: pulumi.String("string"),
PullRequest: &cloudbuild.TriggerBitbucketServerTriggerConfigPullRequestArgs{
Branch: pulumi.String("string"),
CommentControl: pulumi.String("string"),
InvertRegex: pulumi.Bool(false),
},
Push: &cloudbuild.TriggerBitbucketServerTriggerConfigPushArgs{
Branch: pulumi.String("string"),
InvertRegex: pulumi.Bool(false),
Tag: pulumi.String("string"),
},
},
Build: &cloudbuild.TriggerBuildArgs{
Steps: cloudbuild.TriggerBuildStepArray{
&cloudbuild.TriggerBuildStepArgs{
Name: pulumi.String("string"),
Id: pulumi.String("string"),
Args: pulumi.StringArray{
pulumi.String("string"),
},
Dir: pulumi.String("string"),
Entrypoint: pulumi.String("string"),
Envs: pulumi.StringArray{
pulumi.String("string"),
},
AllowExitCodes: pulumi.IntArray{
pulumi.Int(0),
},
AllowFailure: pulumi.Bool(false),
Script: pulumi.String("string"),
SecretEnvs: pulumi.StringArray{
pulumi.String("string"),
},
Timeout: pulumi.String("string"),
Timing: pulumi.String("string"),
Volumes: cloudbuild.TriggerBuildStepVolumeArray{
&cloudbuild.TriggerBuildStepVolumeArgs{
Name: pulumi.String("string"),
Path: pulumi.String("string"),
},
},
WaitFors: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Artifacts: &cloudbuild.TriggerBuildArtifactsArgs{
Images: pulumi.StringArray{
pulumi.String("string"),
},
MavenArtifacts: cloudbuild.TriggerBuildArtifactsMavenArtifactArray{
&cloudbuild.TriggerBuildArtifactsMavenArtifactArgs{
ArtifactId: pulumi.String("string"),
GroupId: pulumi.String("string"),
Path: pulumi.String("string"),
Repository: pulumi.String("string"),
Version: pulumi.String("string"),
},
},
NpmPackages: cloudbuild.TriggerBuildArtifactsNpmPackageArray{
&cloudbuild.TriggerBuildArtifactsNpmPackageArgs{
PackagePath: pulumi.String("string"),
Repository: pulumi.String("string"),
},
},
Objects: &cloudbuild.TriggerBuildArtifactsObjectsArgs{
Location: pulumi.String("string"),
Paths: pulumi.StringArray{
pulumi.String("string"),
},
Timings: cloudbuild.TriggerBuildArtifactsObjectsTimingArray{
&cloudbuild.TriggerBuildArtifactsObjectsTimingArgs{
EndTime: pulumi.String("string"),
StartTime: pulumi.String("string"),
},
},
},
PythonPackages: cloudbuild.TriggerBuildArtifactsPythonPackageArray{
&cloudbuild.TriggerBuildArtifactsPythonPackageArgs{
Paths: pulumi.StringArray{
pulumi.String("string"),
},
Repository: pulumi.String("string"),
},
},
},
AvailableSecrets: &cloudbuild.TriggerBuildAvailableSecretsArgs{
SecretManagers: cloudbuild.TriggerBuildAvailableSecretsSecretManagerArray{
&cloudbuild.TriggerBuildAvailableSecretsSecretManagerArgs{
Env: pulumi.String("string"),
VersionName: pulumi.String("string"),
},
},
},
Images: pulumi.StringArray{
pulumi.String("string"),
},
LogsBucket: pulumi.String("string"),
Options: &cloudbuild.TriggerBuildOptionsArgs{
DiskSizeGb: pulumi.Int(0),
DynamicSubstitutions: pulumi.Bool(false),
Envs: pulumi.StringArray{
pulumi.String("string"),
},
LogStreamingOption: pulumi.String("string"),
Logging: pulumi.String("string"),
MachineType: pulumi.String("string"),
RequestedVerifyOption: pulumi.String("string"),
SecretEnvs: pulumi.StringArray{
pulumi.String("string"),
},
SourceProvenanceHashes: pulumi.StringArray{
pulumi.String("string"),
},
SubstitutionOption: pulumi.String("string"),
Volumes: cloudbuild.TriggerBuildOptionsVolumeArray{
&cloudbuild.TriggerBuildOptionsVolumeArgs{
Name: pulumi.String("string"),
Path: pulumi.String("string"),
},
},
WorkerPool: pulumi.String("string"),
},
QueueTtl: pulumi.String("string"),
Secrets: cloudbuild.TriggerBuildSecretArray{
&cloudbuild.TriggerBuildSecretArgs{
KmsKeyName: pulumi.String("string"),
SecretEnv: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
Source: &cloudbuild.TriggerBuildSourceArgs{
RepoSource: &cloudbuild.TriggerBuildSourceRepoSourceArgs{
RepoName: pulumi.String("string"),
BranchName: pulumi.String("string"),
CommitSha: pulumi.String("string"),
Dir: pulumi.String("string"),
InvertRegex: pulumi.Bool(false),
ProjectId: pulumi.String("string"),
Substitutions: pulumi.StringMap{
"string": pulumi.String("string"),
},
TagName: pulumi.String("string"),
},
StorageSource: &cloudbuild.TriggerBuildSourceStorageSourceArgs{
Bucket: pulumi.String("string"),
Object: pulumi.String("string"),
Generation: pulumi.String("string"),
},
},
Substitutions: pulumi.StringMap{
"string": pulumi.String("string"),
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Timeout: pulumi.String("string"),
},
Description: pulumi.String("string"),
Disabled: pulumi.Bool(false),
Filename: pulumi.String("string"),
Filter: pulumi.String("string"),
GitFileSource: &cloudbuild.TriggerGitFileSourceArgs{
Path: pulumi.String("string"),
RepoType: pulumi.String("string"),
BitbucketServerConfig: pulumi.String("string"),
GithubEnterpriseConfig: pulumi.String("string"),
Repository: pulumi.String("string"),
Revision: pulumi.String("string"),
Uri: pulumi.String("string"),
},
Github: &cloudbuild.TriggerGithubArgs{
EnterpriseConfigResourceName: pulumi.String("string"),
Name: pulumi.String("string"),
Owner: pulumi.String("string"),
PullRequest: &cloudbuild.TriggerGithubPullRequestArgs{
Branch: pulumi.String("string"),
CommentControl: pulumi.String("string"),
InvertRegex: pulumi.Bool(false),
},
Push: &cloudbuild.TriggerGithubPushArgs{
Branch: pulumi.String("string"),
InvertRegex: pulumi.Bool(false),
Tag: pulumi.String("string"),
},
},
IgnoredFiles: pulumi.StringArray{
pulumi.String("string"),
},
IncludeBuildLogs: pulumi.String("string"),
IncludedFiles: pulumi.StringArray{
pulumi.String("string"),
},
Location: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
PubsubConfig: &cloudbuild.TriggerPubsubConfigArgs{
Topic: pulumi.String("string"),
ServiceAccountEmail: pulumi.String("string"),
State: pulumi.String("string"),
Subscription: pulumi.String("string"),
},
RepositoryEventConfig: &cloudbuild.TriggerRepositoryEventConfigArgs{
PullRequest: &cloudbuild.TriggerRepositoryEventConfigPullRequestArgs{
Branch: pulumi.String("string"),
CommentControl: pulumi.String("string"),
InvertRegex: pulumi.Bool(false),
},
Push: &cloudbuild.TriggerRepositoryEventConfigPushArgs{
Branch: pulumi.String("string"),
InvertRegex: pulumi.Bool(false),
Tag: pulumi.String("string"),
},
Repository: pulumi.String("string"),
},
ServiceAccount: pulumi.String("string"),
SourceToBuild: &cloudbuild.TriggerSourceToBuildArgs{
Ref: pulumi.String("string"),
RepoType: pulumi.String("string"),
BitbucketServerConfig: pulumi.String("string"),
GithubEnterpriseConfig: pulumi.String("string"),
Repository: pulumi.String("string"),
Uri: pulumi.String("string"),
},
Substitutions: pulumi.StringMap{
"string": pulumi.String("string"),
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
TriggerTemplate: &cloudbuild.TriggerTriggerTemplateArgs{
BranchName: pulumi.String("string"),
CommitSha: pulumi.String("string"),
Dir: pulumi.String("string"),
InvertRegex: pulumi.Bool(false),
ProjectId: pulumi.String("string"),
RepoName: pulumi.String("string"),
TagName: pulumi.String("string"),
},
WebhookConfig: &cloudbuild.TriggerWebhookConfigArgs{
Secret: pulumi.String("string"),
State: pulumi.String("string"),
},
})
var triggerResource = new Trigger("triggerResource", TriggerArgs.builder()
.approvalConfig(TriggerApprovalConfigArgs.builder()
.approvalRequired(false)
.build())
.bitbucketServerTriggerConfig(TriggerBitbucketServerTriggerConfigArgs.builder()
.bitbucketServerConfigResource("string")
.projectKey("string")
.repoSlug("string")
.pullRequest(TriggerBitbucketServerTriggerConfigPullRequestArgs.builder()
.branch("string")
.commentControl("string")
.invertRegex(false)
.build())
.push(TriggerBitbucketServerTriggerConfigPushArgs.builder()
.branch("string")
.invertRegex(false)
.tag("string")
.build())
.build())
.build(TriggerBuildArgs.builder()
.steps(TriggerBuildStepArgs.builder()
.name("string")
.id("string")
.args("string")
.dir("string")
.entrypoint("string")
.envs("string")
.allowExitCodes(0)
.allowFailure(false)
.script("string")
.secretEnvs("string")
.timeout("string")
.timing("string")
.volumes(TriggerBuildStepVolumeArgs.builder()
.name("string")
.path("string")
.build())
.waitFors("string")
.build())
.artifacts(TriggerBuildArtifactsArgs.builder()
.images("string")
.mavenArtifacts(TriggerBuildArtifactsMavenArtifactArgs.builder()
.artifactId("string")
.groupId("string")
.path("string")
.repository("string")
.version("string")
.build())
.npmPackages(TriggerBuildArtifactsNpmPackageArgs.builder()
.packagePath("string")
.repository("string")
.build())
.objects(TriggerBuildArtifactsObjectsArgs.builder()
.location("string")
.paths("string")
.timings(TriggerBuildArtifactsObjectsTimingArgs.builder()
.endTime("string")
.startTime("string")
.build())
.build())
.pythonPackages(TriggerBuildArtifactsPythonPackageArgs.builder()
.paths("string")
.repository("string")
.build())
.build())
.availableSecrets(TriggerBuildAvailableSecretsArgs.builder()
.secretManagers(TriggerBuildAvailableSecretsSecretManagerArgs.builder()
.env("string")
.versionName("string")
.build())
.build())
.images("string")
.logsBucket("string")
.options(TriggerBuildOptionsArgs.builder()
.diskSizeGb(0)
.dynamicSubstitutions(false)
.envs("string")
.logStreamingOption("string")
.logging("string")
.machineType("string")
.requestedVerifyOption("string")
.secretEnvs("string")
.sourceProvenanceHashes("string")
.substitutionOption("string")
.volumes(TriggerBuildOptionsVolumeArgs.builder()
.name("string")
.path("string")
.build())
.workerPool("string")
.build())
.queueTtl("string")
.secrets(TriggerBuildSecretArgs.builder()
.kmsKeyName("string")
.secretEnv(Map.of("string", "string"))
.build())
.source(TriggerBuildSourceArgs.builder()
.repoSource(TriggerBuildSourceRepoSourceArgs.builder()
.repoName("string")
.branchName("string")
.commitSha("string")
.dir("string")
.invertRegex(false)
.projectId("string")
.substitutions(Map.of("string", "string"))
.tagName("string")
.build())
.storageSource(TriggerBuildSourceStorageSourceArgs.builder()
.bucket("string")
.object("string")
.generation("string")
.build())
.build())
.substitutions(Map.of("string", "string"))
.tags("string")
.timeout("string")
.build())
.description("string")
.disabled(false)
.filename("string")
.filter("string")
.gitFileSource(TriggerGitFileSourceArgs.builder()
.path("string")
.repoType("string")
.bitbucketServerConfig("string")
.githubEnterpriseConfig("string")
.repository("string")
.revision("string")
.uri("string")
.build())
.github(TriggerGithubArgs.builder()
.enterpriseConfigResourceName("string")
.name("string")
.owner("string")
.pullRequest(TriggerGithubPullRequestArgs.builder()
.branch("string")
.commentControl("string")
.invertRegex(false)
.build())
.push(TriggerGithubPushArgs.builder()
.branch("string")
.invertRegex(false)
.tag("string")
.build())
.build())
.ignoredFiles("string")
.includeBuildLogs("string")
.includedFiles("string")
.location("string")
.name("string")
.project("string")
.pubsubConfig(TriggerPubsubConfigArgs.builder()
.topic("string")
.serviceAccountEmail("string")
.state("string")
.subscription("string")
.build())
.repositoryEventConfig(TriggerRepositoryEventConfigArgs.builder()
.pullRequest(TriggerRepositoryEventConfigPullRequestArgs.builder()
.branch("string")
.commentControl("string")
.invertRegex(false)
.build())
.push(TriggerRepositoryEventConfigPushArgs.builder()
.branch("string")
.invertRegex(false)
.tag("string")
.build())
.repository("string")
.build())
.serviceAccount("string")
.sourceToBuild(TriggerSourceToBuildArgs.builder()
.ref("string")
.repoType("string")
.bitbucketServerConfig("string")
.githubEnterpriseConfig("string")
.repository("string")
.uri("string")
.build())
.substitutions(Map.of("string", "string"))
.tags("string")
.triggerTemplate(TriggerTriggerTemplateArgs.builder()
.branchName("string")
.commitSha("string")
.dir("string")
.invertRegex(false)
.projectId("string")
.repoName("string")
.tagName("string")
.build())
.webhookConfig(TriggerWebhookConfigArgs.builder()
.secret("string")
.state("string")
.build())
.build());
trigger_resource = gcp.cloudbuild.Trigger("triggerResource",
approval_config={
"approvalRequired": False,
},
bitbucket_server_trigger_config={
"bitbucketServerConfigResource": "string",
"projectKey": "string",
"repoSlug": "string",
"pullRequest": {
"branch": "string",
"commentControl": "string",
"invertRegex": False,
},
"push": {
"branch": "string",
"invertRegex": False,
"tag": "string",
},
},
build={
"steps": [{
"name": "string",
"id": "string",
"args": ["string"],
"dir": "string",
"entrypoint": "string",
"envs": ["string"],
"allowExitCodes": [0],
"allowFailure": False,
"script": "string",
"secretEnvs": ["string"],
"timeout": "string",
"timing": "string",
"volumes": [{
"name": "string",
"path": "string",
}],
"waitFors": ["string"],
}],
"artifacts": {
"images": ["string"],
"mavenArtifacts": [{
"artifactId": "string",
"groupId": "string",
"path": "string",
"repository": "string",
"version": "string",
}],
"npmPackages": [{
"packagePath": "string",
"repository": "string",
}],
"objects": {
"location": "string",
"paths": ["string"],
"timings": [{
"endTime": "string",
"startTime": "string",
}],
},
"pythonPackages": [{
"paths": ["string"],
"repository": "string",
}],
},
"availableSecrets": {
"secretManagers": [{
"env": "string",
"versionName": "string",
}],
},
"images": ["string"],
"logsBucket": "string",
"options": {
"diskSizeGb": 0,
"dynamicSubstitutions": False,
"envs": ["string"],
"logStreamingOption": "string",
"logging": "string",
"machineType": "string",
"requestedVerifyOption": "string",
"secretEnvs": ["string"],
"sourceProvenanceHashes": ["string"],
"substitutionOption": "string",
"volumes": [{
"name": "string",
"path": "string",
}],
"workerPool": "string",
},
"queueTtl": "string",
"secrets": [{
"kmsKeyName": "string",
"secretEnv": {
"string": "string",
},
}],
"source": {
"repoSource": {
"repoName": "string",
"branchName": "string",
"commitSha": "string",
"dir": "string",
"invertRegex": False,
"projectId": "string",
"substitutions": {
"string": "string",
},
"tagName": "string",
},
"storageSource": {
"bucket": "string",
"object": "string",
"generation": "string",
},
},
"substitutions": {
"string": "string",
},
"tags": ["string"],
"timeout": "string",
},
description="string",
disabled=False,
filename="string",
filter="string",
git_file_source={
"path": "string",
"repoType": "string",
"bitbucketServerConfig": "string",
"githubEnterpriseConfig": "string",
"repository": "string",
"revision": "string",
"uri": "string",
},
github={
"enterpriseConfigResourceName": "string",
"name": "string",
"owner": "string",
"pullRequest": {
"branch": "string",
"commentControl": "string",
"invertRegex": False,
},
"push": {
"branch": "string",
"invertRegex": False,
"tag": "string",
},
},
ignored_files=["string"],
include_build_logs="string",
included_files=["string"],
location="string",
name="string",
project="string",
pubsub_config={
"topic": "string",
"serviceAccountEmail": "string",
"state": "string",
"subscription": "string",
},
repository_event_config={
"pullRequest": {
"branch": "string",
"commentControl": "string",
"invertRegex": False,
},
"push": {
"branch": "string",
"invertRegex": False,
"tag": "string",
},
"repository": "string",
},
service_account="string",
source_to_build={
"ref": "string",
"repoType": "string",
"bitbucketServerConfig": "string",
"githubEnterpriseConfig": "string",
"repository": "string",
"uri": "string",
},
substitutions={
"string": "string",
},
tags=["string"],
trigger_template={
"branchName": "string",
"commitSha": "string",
"dir": "string",
"invertRegex": False,
"projectId": "string",
"repoName": "string",
"tagName": "string",
},
webhook_config={
"secret": "string",
"state": "string",
})
const triggerResource = new gcp.cloudbuild.Trigger("triggerResource", {
approvalConfig: {
approvalRequired: false,
},
bitbucketServerTriggerConfig: {
bitbucketServerConfigResource: "string",
projectKey: "string",
repoSlug: "string",
pullRequest: {
branch: "string",
commentControl: "string",
invertRegex: false,
},
push: {
branch: "string",
invertRegex: false,
tag: "string",
},
},
build: {
steps: [{
name: "string",
id: "string",
args: ["string"],
dir: "string",
entrypoint: "string",
envs: ["string"],
allowExitCodes: [0],
allowFailure: false,
script: "string",
secretEnvs: ["string"],
timeout: "string",
timing: "string",
volumes: [{
name: "string",
path: "string",
}],
waitFors: ["string"],
}],
artifacts: {
images: ["string"],
mavenArtifacts: [{
artifactId: "string",
groupId: "string",
path: "string",
repository: "string",
version: "string",
}],
npmPackages: [{
packagePath: "string",
repository: "string",
}],
objects: {
location: "string",
paths: ["string"],
timings: [{
endTime: "string",
startTime: "string",
}],
},
pythonPackages: [{
paths: ["string"],
repository: "string",
}],
},
availableSecrets: {
secretManagers: [{
env: "string",
versionName: "string",
}],
},
images: ["string"],
logsBucket: "string",
options: {
diskSizeGb: 0,
dynamicSubstitutions: false,
envs: ["string"],
logStreamingOption: "string",
logging: "string",
machineType: "string",
requestedVerifyOption: "string",
secretEnvs: ["string"],
sourceProvenanceHashes: ["string"],
substitutionOption: "string",
volumes: [{
name: "string",
path: "string",
}],
workerPool: "string",
},
queueTtl: "string",
secrets: [{
kmsKeyName: "string",
secretEnv: {
string: "string",
},
}],
source: {
repoSource: {
repoName: "string",
branchName: "string",
commitSha: "string",
dir: "string",
invertRegex: false,
projectId: "string",
substitutions: {
string: "string",
},
tagName: "string",
},
storageSource: {
bucket: "string",
object: "string",
generation: "string",
},
},
substitutions: {
string: "string",
},
tags: ["string"],
timeout: "string",
},
description: "string",
disabled: false,
filename: "string",
filter: "string",
gitFileSource: {
path: "string",
repoType: "string",
bitbucketServerConfig: "string",
githubEnterpriseConfig: "string",
repository: "string",
revision: "string",
uri: "string",
},
github: {
enterpriseConfigResourceName: "string",
name: "string",
owner: "string",
pullRequest: {
branch: "string",
commentControl: "string",
invertRegex: false,
},
push: {
branch: "string",
invertRegex: false,
tag: "string",
},
},
ignoredFiles: ["string"],
includeBuildLogs: "string",
includedFiles: ["string"],
location: "string",
name: "string",
project: "string",
pubsubConfig: {
topic: "string",
serviceAccountEmail: "string",
state: "string",
subscription: "string",
},
repositoryEventConfig: {
pullRequest: {
branch: "string",
commentControl: "string",
invertRegex: false,
},
push: {
branch: "string",
invertRegex: false,
tag: "string",
},
repository: "string",
},
serviceAccount: "string",
sourceToBuild: {
ref: "string",
repoType: "string",
bitbucketServerConfig: "string",
githubEnterpriseConfig: "string",
repository: "string",
uri: "string",
},
substitutions: {
string: "string",
},
tags: ["string"],
triggerTemplate: {
branchName: "string",
commitSha: "string",
dir: "string",
invertRegex: false,
projectId: "string",
repoName: "string",
tagName: "string",
},
webhookConfig: {
secret: "string",
state: "string",
},
});
type: gcp:cloudbuild:Trigger
properties:
approvalConfig:
approvalRequired: false
bitbucketServerTriggerConfig:
bitbucketServerConfigResource: string
projectKey: string
pullRequest:
branch: string
commentControl: string
invertRegex: false
push:
branch: string
invertRegex: false
tag: string
repoSlug: string
build:
artifacts:
images:
- string
mavenArtifacts:
- artifactId: string
groupId: string
path: string
repository: string
version: string
npmPackages:
- packagePath: string
repository: string
objects:
location: string
paths:
- string
timings:
- endTime: string
startTime: string
pythonPackages:
- paths:
- string
repository: string
availableSecrets:
secretManagers:
- env: string
versionName: string
images:
- string
logsBucket: string
options:
diskSizeGb: 0
dynamicSubstitutions: false
envs:
- string
logStreamingOption: string
logging: string
machineType: string
requestedVerifyOption: string
secretEnvs:
- string
sourceProvenanceHashes:
- string
substitutionOption: string
volumes:
- name: string
path: string
workerPool: string
queueTtl: string
secrets:
- kmsKeyName: string
secretEnv:
string: string
source:
repoSource:
branchName: string
commitSha: string
dir: string
invertRegex: false
projectId: string
repoName: string
substitutions:
string: string
tagName: string
storageSource:
bucket: string
generation: string
object: string
steps:
- allowExitCodes:
- 0
allowFailure: false
args:
- string
dir: string
entrypoint: string
envs:
- string
id: string
name: string
script: string
secretEnvs:
- string
timeout: string
timing: string
volumes:
- name: string
path: string
waitFors:
- string
substitutions:
string: string
tags:
- string
timeout: string
description: string
disabled: false
filename: string
filter: string
gitFileSource:
bitbucketServerConfig: string
githubEnterpriseConfig: string
path: string
repoType: string
repository: string
revision: string
uri: string
github:
enterpriseConfigResourceName: string
name: string
owner: string
pullRequest:
branch: string
commentControl: string
invertRegex: false
push:
branch: string
invertRegex: false
tag: string
ignoredFiles:
- string
includeBuildLogs: string
includedFiles:
- string
location: string
name: string
project: string
pubsubConfig:
serviceAccountEmail: string
state: string
subscription: string
topic: string
repositoryEventConfig:
pullRequest:
branch: string
commentControl: string
invertRegex: false
push:
branch: string
invertRegex: false
tag: string
repository: string
serviceAccount: string
sourceToBuild:
bitbucketServerConfig: string
githubEnterpriseConfig: string
ref: string
repoType: string
repository: string
uri: string
substitutions:
string: string
tags:
- string
triggerTemplate:
branchName: string
commitSha: string
dir: string
invertRegex: false
projectId: string
repoName: string
tagName: string
webhookConfig:
secret: string
state: string
Trigger Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Trigger resource accepts the following input properties:
- Approval
Config TriggerApproval Config - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- Bitbucket
Server TriggerTrigger Config Bitbucket Server Trigger Config - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- Build
Trigger
Build - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- Description string
- Human-readable description of the trigger.
- Disabled bool
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- Filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- Filter string
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- Git
File TriggerSource Git File Source - The file source describing the local or remote Build template. Structure is documented below.
- Github
Trigger
Github - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - Ignored
Files List<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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - Include
Build stringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - Included
Files List<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. - Location string
- The Cloud Build location for the trigger. If not specified, "global" is used.
- Name string
- Name of the trigger. Must be unique within the project.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pubsub
Config TriggerPubsub Config - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - Repository
Event TriggerConfig Repository Event Config - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- Service
Account string - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- Source
To TriggerBuild Source To Build - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - Substitutions Dictionary<string, string>
- Substitutions data for Build resource.
- List<string>
- Tags for annotation of a BuildTrigger
- Trigger
Template TriggerTrigger Template - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - Webhook
Config TriggerWebhook Config - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- Approval
Config TriggerApproval Config Args - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- Bitbucket
Server TriggerTrigger Config Bitbucket Server Trigger Config Args - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- Build
Trigger
Build Args - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- Description string
- Human-readable description of the trigger.
- Disabled bool
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- Filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- Filter string
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- Git
File TriggerSource Git File Source Args - The file source describing the local or remote Build template. Structure is documented below.
- Github
Trigger
Github Args - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - Ignored
Files []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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - Include
Build stringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - Included
Files []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. - Location string
- The Cloud Build location for the trigger. If not specified, "global" is used.
- Name string
- Name of the trigger. Must be unique within the project.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pubsub
Config TriggerPubsub Config Args - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - Repository
Event TriggerConfig Repository Event Config Args - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- Service
Account string - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- Source
To TriggerBuild Source To Build Args - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - Substitutions map[string]string
- Substitutions data for Build resource.
- []string
- Tags for annotation of a BuildTrigger
- Trigger
Template TriggerTrigger Template Args - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - Webhook
Config TriggerWebhook Config Args - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- approval
Config TriggerApproval Config - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- bitbucket
Server TriggerTrigger Config Bitbucket Server Trigger Config - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- build
Trigger
Build - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- description String
- Human-readable description of the trigger.
- disabled Boolean
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- filter String
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- git
File TriggerSource Git File Source - The file source describing the local or remote Build template. Structure is documented below.
- github
Trigger
Github - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - ignored
Files List<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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - include
Build StringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - included
Files List<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. - location String
- The Cloud Build location for the trigger. If not specified, "global" is used.
- name String
- Name of the trigger. Must be unique within the project.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pubsub
Config TriggerPubsub Config - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - repository
Event TriggerConfig Repository Event Config - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- service
Account String - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- source
To TriggerBuild Source To Build - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - substitutions Map<String,String>
- Substitutions data for Build resource.
- List<String>
- Tags for annotation of a BuildTrigger
- trigger
Template TriggerTrigger Template - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - webhook
Config TriggerWebhook Config - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- approval
Config TriggerApproval Config - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- bitbucket
Server TriggerTrigger Config Bitbucket Server Trigger Config - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- build
Trigger
Build - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- description string
- Human-readable description of the trigger.
- disabled boolean
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- filter string
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- git
File TriggerSource Git File Source - The file source describing the local or remote Build template. Structure is documented below.
- github
Trigger
Github - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - ignored
Files 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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - include
Build stringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - included
Files 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. - location string
- The Cloud Build location for the trigger. If not specified, "global" is used.
- name string
- Name of the trigger. Must be unique within the project.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pubsub
Config TriggerPubsub Config - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - repository
Event TriggerConfig Repository Event Config - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- service
Account string - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- source
To TriggerBuild Source To Build - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - substitutions {[key: string]: string}
- Substitutions data for Build resource.
- string[]
- Tags for annotation of a BuildTrigger
- trigger
Template TriggerTrigger Template - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - webhook
Config TriggerWebhook Config - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- approval_
config TriggerApproval Config Args - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- bitbucket_
server_ Triggertrigger_ config Bitbucket Server Trigger Config Args - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- build
Trigger
Build Args - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- description str
- Human-readable description of the trigger.
- disabled bool
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- filename str
- Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- filter str
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- git_
file_ Triggersource Git File Source Args - The file source describing the local or remote Build template. Structure is documented below.
- github
Trigger
Github Args - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - ignored_
files Sequence[str] - 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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - include_
build_ strlogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - included_
files Sequence[str] - 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. - location str
- The Cloud Build location for the trigger. If not specified, "global" is used.
- name str
- Name of the trigger. Must be unique within the project.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pubsub_
config TriggerPubsub Config Args - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - repository_
event_ Triggerconfig Repository Event Config Args - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- service_
account str - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- source_
to_ Triggerbuild Source To Build Args - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - substitutions Mapping[str, str]
- Substitutions data for Build resource.
- Sequence[str]
- Tags for annotation of a BuildTrigger
- trigger_
template TriggerTrigger Template Args - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - webhook_
config TriggerWebhook Config Args - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- approval
Config Property Map - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- bitbucket
Server Property MapTrigger Config - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- build Property Map
- Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- description String
- Human-readable description of the trigger.
- disabled Boolean
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- filter String
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- git
File Property MapSource - The file source describing the local or remote Build template. Structure is documented below.
- github Property Map
- Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - ignored
Files List<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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - include
Build StringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - included
Files List<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. - location String
- The Cloud Build location for the trigger. If not specified, "global" is used.
- name String
- Name of the trigger. Must be unique within the project.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pubsub
Config Property Map - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - repository
Event Property MapConfig - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- service
Account String - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- source
To Property MapBuild - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - substitutions Map<String>
- Substitutions data for Build resource.
- List<String>
- Tags for annotation of a BuildTrigger
- trigger
Template Property Map - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - webhook
Config Property Map - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Trigger resource produces the following output properties:
- Create
Time string - Time when the trigger was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Trigger
Id string - The unique identifier for the trigger.
- Create
Time string - Time when the trigger was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Trigger
Id string - The unique identifier for the trigger.
- create
Time String - Time when the trigger was created.
- id String
- The provider-assigned unique ID for this managed resource.
- trigger
Id String - The unique identifier for the trigger.
- create
Time string - Time when the trigger was created.
- id string
- The provider-assigned unique ID for this managed resource.
- trigger
Id string - The unique identifier for the trigger.
- create_
time str - Time when the trigger was created.
- id str
- The provider-assigned unique ID for this managed resource.
- trigger_
id str - The unique identifier for the trigger.
- create
Time String - Time when the trigger was created.
- id String
- The provider-assigned unique ID for this managed resource.
- trigger
Id String - The unique identifier for the trigger.
Look up Existing Trigger Resource
Get an existing Trigger resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TriggerState, opts?: CustomResourceOptions): Trigger
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
approval_config: Optional[TriggerApprovalConfigArgs] = None,
bitbucket_server_trigger_config: Optional[TriggerBitbucketServerTriggerConfigArgs] = None,
build: Optional[TriggerBuildArgs] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
disabled: Optional[bool] = None,
filename: Optional[str] = None,
filter: Optional[str] = None,
git_file_source: Optional[TriggerGitFileSourceArgs] = None,
github: Optional[TriggerGithubArgs] = None,
ignored_files: Optional[Sequence[str]] = None,
include_build_logs: Optional[str] = None,
included_files: Optional[Sequence[str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pubsub_config: Optional[TriggerPubsubConfigArgs] = None,
repository_event_config: Optional[TriggerRepositoryEventConfigArgs] = None,
service_account: Optional[str] = None,
source_to_build: Optional[TriggerSourceToBuildArgs] = None,
substitutions: Optional[Mapping[str, str]] = None,
tags: Optional[Sequence[str]] = None,
trigger_id: Optional[str] = None,
trigger_template: Optional[TriggerTriggerTemplateArgs] = None,
webhook_config: Optional[TriggerWebhookConfigArgs] = None) -> Trigger
func GetTrigger(ctx *Context, name string, id IDInput, state *TriggerState, opts ...ResourceOption) (*Trigger, error)
public static Trigger Get(string name, Input<string> id, TriggerState? state, CustomResourceOptions? opts = null)
public static Trigger get(String name, Output<String> id, TriggerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Approval
Config TriggerApproval Config - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- Bitbucket
Server TriggerTrigger Config Bitbucket Server Trigger Config - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- Build
Trigger
Build - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- Create
Time string - Time when the trigger was created.
- Description string
- Human-readable description of the trigger.
- Disabled bool
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- Filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- Filter string
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- Git
File TriggerSource Git File Source - The file source describing the local or remote Build template. Structure is documented below.
- Github
Trigger
Github - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - Ignored
Files List<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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - Include
Build stringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - Included
Files List<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. - Location string
- The Cloud Build location for the trigger. If not specified, "global" is used.
- Name string
- Name of the trigger. Must be unique within the project.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pubsub
Config TriggerPubsub Config - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - Repository
Event TriggerConfig Repository Event Config - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- Service
Account string - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- Source
To TriggerBuild Source To Build - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - Substitutions Dictionary<string, string>
- Substitutions data for Build resource.
- List<string>
- Tags for annotation of a BuildTrigger
- Trigger
Id string - The unique identifier for the trigger.
- Trigger
Template TriggerTrigger Template - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - Webhook
Config TriggerWebhook Config - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- Approval
Config TriggerApproval Config Args - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- Bitbucket
Server TriggerTrigger Config Bitbucket Server Trigger Config Args - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- Build
Trigger
Build Args - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- Create
Time string - Time when the trigger was created.
- Description string
- Human-readable description of the trigger.
- Disabled bool
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- Filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- Filter string
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- Git
File TriggerSource Git File Source Args - The file source describing the local or remote Build template. Structure is documented below.
- Github
Trigger
Github Args - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - Ignored
Files []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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - Include
Build stringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - Included
Files []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. - Location string
- The Cloud Build location for the trigger. If not specified, "global" is used.
- Name string
- Name of the trigger. Must be unique within the project.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pubsub
Config TriggerPubsub Config Args - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - Repository
Event TriggerConfig Repository Event Config Args - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- Service
Account string - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- Source
To TriggerBuild Source To Build Args - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - Substitutions map[string]string
- Substitutions data for Build resource.
- []string
- Tags for annotation of a BuildTrigger
- Trigger
Id string - The unique identifier for the trigger.
- Trigger
Template TriggerTrigger Template Args - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - Webhook
Config TriggerWebhook Config Args - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- approval
Config TriggerApproval Config - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- bitbucket
Server TriggerTrigger Config Bitbucket Server Trigger Config - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- build
Trigger
Build - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- create
Time String - Time when the trigger was created.
- description String
- Human-readable description of the trigger.
- disabled Boolean
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- filter String
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- git
File TriggerSource Git File Source - The file source describing the local or remote Build template. Structure is documented below.
- github
Trigger
Github - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - ignored
Files List<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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - include
Build StringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - included
Files List<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. - location String
- The Cloud Build location for the trigger. If not specified, "global" is used.
- name String
- Name of the trigger. Must be unique within the project.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pubsub
Config TriggerPubsub Config - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - repository
Event TriggerConfig Repository Event Config - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- service
Account String - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- source
To TriggerBuild Source To Build - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - substitutions Map<String,String>
- Substitutions data for Build resource.
- List<String>
- Tags for annotation of a BuildTrigger
- trigger
Id String - The unique identifier for the trigger.
- trigger
Template TriggerTrigger Template - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - webhook
Config TriggerWebhook Config - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- approval
Config TriggerApproval Config - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- bitbucket
Server TriggerTrigger Config Bitbucket Server Trigger Config - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- build
Trigger
Build - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- create
Time string - Time when the trigger was created.
- description string
- Human-readable description of the trigger.
- disabled boolean
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- filter string
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- git
File TriggerSource Git File Source - The file source describing the local or remote Build template. Structure is documented below.
- github
Trigger
Github - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - ignored
Files 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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - include
Build stringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - included
Files 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. - location string
- The Cloud Build location for the trigger. If not specified, "global" is used.
- name string
- Name of the trigger. Must be unique within the project.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pubsub
Config TriggerPubsub Config - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - repository
Event TriggerConfig Repository Event Config - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- service
Account string - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- source
To TriggerBuild Source To Build - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - substitutions {[key: string]: string}
- Substitutions data for Build resource.
- string[]
- Tags for annotation of a BuildTrigger
- trigger
Id string - The unique identifier for the trigger.
- trigger
Template TriggerTrigger Template - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - webhook
Config TriggerWebhook Config - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- approval_
config TriggerApproval Config Args - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- bitbucket_
server_ Triggertrigger_ config Bitbucket Server Trigger Config Args - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- build
Trigger
Build Args - Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- create_
time str - Time when the trigger was created.
- description str
- Human-readable description of the trigger.
- disabled bool
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- filename str
- Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- filter str
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- git_
file_ Triggersource Git File Source Args - The file source describing the local or remote Build template. Structure is documented below.
- github
Trigger
Github Args - Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - ignored_
files Sequence[str] - 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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - include_
build_ strlogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - included_
files Sequence[str] - 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. - location str
- The Cloud Build location for the trigger. If not specified, "global" is used.
- name str
- Name of the trigger. Must be unique within the project.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pubsub_
config TriggerPubsub Config Args - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - repository_
event_ Triggerconfig Repository Event Config Args - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- service_
account str - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- source_
to_ Triggerbuild Source To Build Args - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - substitutions Mapping[str, str]
- Substitutions data for Build resource.
- Sequence[str]
- Tags for annotation of a BuildTrigger
- trigger_
id str - The unique identifier for the trigger.
- trigger_
template TriggerTrigger Template Args - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - webhook_
config TriggerWebhook Config Args - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
- approval
Config Property Map - Configuration for manual approval to start a build invocation of this BuildTrigger. Builds created by this trigger will require approval before they execute. Any user with a Cloud Build Approver role for the project can approve a build. Structure is documented below.
- bitbucket
Server Property MapTrigger Config - BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. Structure is documented below.
- build Property Map
- Contents of the build template. Either a filename or build template must be provided. Structure is documented below.
- create
Time String - Time when the trigger was created.
- description String
- Human-readable description of the trigger.
- disabled Boolean
- Whether the trigger is disabled or not. If true, the trigger will never result in a build.
- filename 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. Set this only when using trigger_template or github. When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
- filter String
- A Common Expression Language string. Used only with Pub/Sub and Webhook.
- git
File Property MapSource - The file source describing the local or remote Build template. Structure is documented below.
- github Property Map
- Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
One of
trigger_template
,github
,pubsub_config
orwebhook_config
must be provided. Structure is documented below. - ignored
Files List<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 ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. - include
Build StringLogs - Build logs will be sent back to GitHub as part of the checkrun
result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
INCLUDE_BUILD_LOGS_WITH_STATUS
Possible values are:
INCLUDE_BUILD_LOGS_UNSPECIFIED
,INCLUDE_BUILD_LOGS_WITH_STATUS
. - included
Files List<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. - location String
- The Cloud Build location for the trigger. If not specified, "global" is used.
- name String
- Name of the trigger. Must be unique within the project.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pubsub
Config Property Map - PubsubConfig describes the configuration of a trigger that creates
a build whenever a Pub/Sub message is published.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - repository
Event Property MapConfig - The configuration of a trigger that creates a build whenever an event from Repo API is received. Structure is documented below.
- service
Account String - The service account used for all user-controlled operations including triggers.patch, triggers.run, builds.create, and builds.cancel. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- source
To Property MapBuild - The repo and ref of the repository from which to build.
This field is used only for those triggers that do not respond to SCM events.
Triggers that respond to such events build source at whatever commit caused the event.
This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below. - substitutions Map<String>
- Substitutions data for Build resource.
- List<String>
- Tags for annotation of a BuildTrigger
- trigger
Id String - The unique identifier for the trigger.
- trigger
Template Property Map - 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
trigger_template
,github
,pubsub_config
,webhook_config
orsource_to_build
must be provided. Structure is documented below. - webhook
Config Property Map - WebhookConfig describes the configuration of a trigger that creates
a build whenever a webhook is sent to a trigger's webhook URL.
One of
trigger_template
,github
,pubsub_config
webhook_config
orsource_to_build
must be provided. Structure is documented below.
Supporting Types
TriggerApprovalConfig, TriggerApprovalConfigArgs
- Approval
Required bool - Whether or not approval is needed. If this is set on a build, it will become pending when run, and will need to be explicitly approved to start.
- Approval
Required bool - Whether or not approval is needed. If this is set on a build, it will become pending when run, and will need to be explicitly approved to start.
- approval
Required Boolean - Whether or not approval is needed. If this is set on a build, it will become pending when run, and will need to be explicitly approved to start.
- approval
Required boolean - Whether or not approval is needed. If this is set on a build, it will become pending when run, and will need to be explicitly approved to start.
- approval_
required bool - Whether or not approval is needed. If this is set on a build, it will become pending when run, and will need to be explicitly approved to start.
- approval
Required Boolean - Whether or not approval is needed. If this is set on a build, it will become pending when run, and will need to be explicitly approved to start.
TriggerBitbucketServerTriggerConfig, TriggerBitbucketServerTriggerConfigArgs
- Bitbucket
Server stringConfig Resource - The Bitbucket server config resource that this trigger config maps to.
- Project
Key string - Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
- Repo
Slug string - Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL. For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
- Pull
Request TriggerBitbucket Server Trigger Config Pull Request - Filter to match changes in pull requests. Structure is documented below.
- Push
Trigger
Bitbucket Server Trigger Config Push - Filter to match changes in refs like branches, tags. Structure is documented below.
- Bitbucket
Server stringConfig Resource - The Bitbucket server config resource that this trigger config maps to.
- Project
Key string - Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
- Repo
Slug string - Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL. For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
- Pull
Request TriggerBitbucket Server Trigger Config Pull Request - Filter to match changes in pull requests. Structure is documented below.
- Push
Trigger
Bitbucket Server Trigger Config Push - Filter to match changes in refs like branches, tags. Structure is documented below.
- bitbucket
Server StringConfig Resource - The Bitbucket server config resource that this trigger config maps to.
- project
Key String - Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
- repo
Slug String - Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL. For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
- pull
Request TriggerBitbucket Server Trigger Config Pull Request - Filter to match changes in pull requests. Structure is documented below.
- push
Trigger
Bitbucket Server Trigger Config Push - Filter to match changes in refs like branches, tags. Structure is documented below.
- bitbucket
Server stringConfig Resource - The Bitbucket server config resource that this trigger config maps to.
- project
Key string - Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
- repo
Slug string - Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL. For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
- pull
Request TriggerBitbucket Server Trigger Config Pull Request - Filter to match changes in pull requests. Structure is documented below.
- push
Trigger
Bitbucket Server Trigger Config Push - Filter to match changes in refs like branches, tags. Structure is documented below.
- bitbucket_
server_ strconfig_ resource - The Bitbucket server config resource that this trigger config maps to.
- project_
key str - Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
- repo_
slug str - Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL. For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
- pull_
request TriggerBitbucket Server Trigger Config Pull Request - Filter to match changes in pull requests. Structure is documented below.
- push
Trigger
Bitbucket Server Trigger Config Push - Filter to match changes in refs like branches, tags. Structure is documented below.
- bitbucket
Server StringConfig Resource - The Bitbucket server config resource that this trigger config maps to.
- project
Key String - Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
- repo
Slug String - Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL. For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
- pull
Request Property Map - Filter to match changes in pull requests. Structure is documented below.
- push Property Map
- Filter to match changes in refs like branches, tags. Structure is documented below.
TriggerBitbucketServerTriggerConfigPullRequest, TriggerBitbucketServerTriggerConfigPullRequestArgs
- Branch string
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- Comment
Control string - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - Invert
Regex bool - If true, branches that do NOT match the git_ref will trigger a build.
- Branch string
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- Comment
Control string - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - Invert
Regex bool - If true, branches that do NOT match the git_ref will trigger a build.
- branch String
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment
Control String - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert
Regex Boolean - If true, branches that do NOT match the git_ref will trigger a build.
- branch string
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment
Control string - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert
Regex boolean - If true, branches that do NOT match the git_ref will trigger a build.
- branch str
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment_
control str - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert_
regex bool - If true, branches that do NOT match the git_ref will trigger a build.
- branch String
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment
Control String - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert
Regex Boolean - If true, branches that do NOT match the git_ref will trigger a build.
TriggerBitbucketServerTriggerConfigPush, TriggerBitbucketServerTriggerConfigPushArgs
- Branch string
- Regex of branches to match. Specify only one of branch or tag.
- Invert
Regex bool - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- Tag string
- Regex of tags to match. Specify only one of branch or tag.
- Branch string
- Regex of branches to match. Specify only one of branch or tag.
- Invert
Regex bool - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- Tag string
- Regex of tags to match. Specify only one of branch or tag.
- branch String
- Regex of branches to match. Specify only one of branch or tag.
- invert
Regex Boolean - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag String
- Regex of tags to match. Specify only one of branch or tag.
- branch string
- Regex of branches to match. Specify only one of branch or tag.
- invert
Regex boolean - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag string
- Regex of tags to match. Specify only one of branch or tag.
- branch str
- Regex of branches to match. Specify only one of branch or tag.
- invert_
regex bool - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag str
- Regex of tags to match. Specify only one of branch or tag.
- branch String
- Regex of branches to match. Specify only one of branch or tag.
- invert
Regex Boolean - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag String
- Regex of tags to match. Specify only one of branch or tag.
TriggerBuild, TriggerBuildArgs
- Steps
List<Trigger
Build Step> - The operations to be performed on the workspace. Structure is documented below.
- Artifacts
Trigger
Build Artifacts - Artifacts produced by the build that should be uploaded upon successful completion of all build steps. Structure is documented below.
- Available
Secrets TriggerBuild Available Secrets - Secrets and secret environment variables. Structure is documented below.
- Images List<string>
- A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.
- Logs
Bucket string - Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build_id}.txt.
- Options
Trigger
Build Options - Special options for this build. Structure is documented below.
- Queue
Ttl string - TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- Secrets
List<Trigger
Build Secret> - Secrets to decrypt using Cloud Key Management Service. Structure is documented below.
- Source
Trigger
Build Source - The location of the source files to build.
One of
storageSource
orrepoSource
must be provided. Structure is documented below. - Substitutions Dictionary<string, string>
- Substitutions data for Build resource.
- List<string>
- Tags for annotation of a Build. These are not docker tags.
- Timeout string
- Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s).
- Steps
[]Trigger
Build Step - The operations to be performed on the workspace. Structure is documented below.
- Artifacts
Trigger
Build Artifacts - Artifacts produced by the build that should be uploaded upon successful completion of all build steps. Structure is documented below.
- Available
Secrets TriggerBuild Available Secrets - Secrets and secret environment variables. Structure is documented below.
- Images []string
- A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.
- Logs
Bucket string - Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build_id}.txt.
- Options
Trigger
Build Options - Special options for this build. Structure is documented below.
- Queue
Ttl string - TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- Secrets
[]Trigger
Build Secret - Secrets to decrypt using Cloud Key Management Service. Structure is documented below.
- Source
Trigger
Build Source - The location of the source files to build.
One of
storageSource
orrepoSource
must be provided. Structure is documented below. - Substitutions map[string]string
- Substitutions data for Build resource.
- []string
- Tags for annotation of a Build. These are not docker tags.
- Timeout string
- Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s).
- steps
List<Trigger
Build Step> - The operations to be performed on the workspace. Structure is documented below.
- artifacts
Trigger
Build Artifacts - Artifacts produced by the build that should be uploaded upon successful completion of all build steps. Structure is documented below.
- available
Secrets TriggerBuild Available Secrets - Secrets and secret environment variables. Structure is documented below.
- images List<String>
- A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.
- logs
Bucket String - Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build_id}.txt.
- options
Trigger
Build Options - Special options for this build. Structure is documented below.
- queue
Ttl String - TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- secrets
List<Trigger
Build Secret> - Secrets to decrypt using Cloud Key Management Service. Structure is documented below.
- source
Trigger
Build Source - The location of the source files to build.
One of
storageSource
orrepoSource
must be provided. Structure is documented below. - substitutions Map<String,String>
- Substitutions data for Build resource.
- List<String>
- Tags for annotation of a Build. These are not docker tags.
- timeout String
- Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s).
- steps
Trigger
Build Step[] - The operations to be performed on the workspace. Structure is documented below.
- artifacts
Trigger
Build Artifacts - Artifacts produced by the build that should be uploaded upon successful completion of all build steps. Structure is documented below.
- available
Secrets TriggerBuild Available Secrets - Secrets and secret environment variables. Structure is documented below.
- images string[]
- A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.
- logs
Bucket string - Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build_id}.txt.
- options
Trigger
Build Options - Special options for this build. Structure is documented below.
- queue
Ttl string - TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- secrets
Trigger
Build Secret[] - Secrets to decrypt using Cloud Key Management Service. Structure is documented below.
- source
Trigger
Build Source - The location of the source files to build.
One of
storageSource
orrepoSource
must be provided. Structure is documented below. - substitutions {[key: string]: string}
- Substitutions data for Build resource.
- string[]
- Tags for annotation of a Build. These are not docker tags.
- timeout string
- Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s).
- steps
Sequence[Trigger
Build Step] - The operations to be performed on the workspace. Structure is documented below.
- artifacts
Trigger
Build Artifacts - Artifacts produced by the build that should be uploaded upon successful completion of all build steps. Structure is documented below.
- available_
secrets TriggerBuild Available Secrets - Secrets and secret environment variables. Structure is documented below.
- images Sequence[str]
- A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.
- logs_
bucket str - Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build_id}.txt.
- options
Trigger
Build Options - Special options for this build. Structure is documented below.
- queue_
ttl str - TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- secrets
Sequence[Trigger
Build Secret] - Secrets to decrypt using Cloud Key Management Service. Structure is documented below.
- source
Trigger
Build Source - The location of the source files to build.
One of
storageSource
orrepoSource
must be provided. Structure is documented below. - substitutions Mapping[str, str]
- Substitutions data for Build resource.
- Sequence[str]
- Tags for annotation of a Build. These are not docker tags.
- timeout str
- Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s).
- steps List<Property Map>
- The operations to be performed on the workspace. Structure is documented below.
- artifacts Property Map
- Artifacts produced by the build that should be uploaded upon successful completion of all build steps. Structure is documented below.
- available
Secrets Property Map - Secrets and secret environment variables. Structure is documented below.
- images List<String>
- A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.
- logs
Bucket String - Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build_id}.txt.
- options Property Map
- Special options for this build. Structure is documented below.
- queue
Ttl String - TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- secrets List<Property Map>
- Secrets to decrypt using Cloud Key Management Service. Structure is documented below.
- source Property Map
- The location of the source files to build.
One of
storageSource
orrepoSource
must be provided. Structure is documented below. - substitutions Map<String>
- Substitutions data for Build resource.
- List<String>
- Tags for annotation of a Build. These are not docker tags.
- timeout String
- Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s).
TriggerBuildArtifacts, TriggerBuildArtifactsArgs
- Images List<string>
- A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.
- Maven
Artifacts List<TriggerBuild Artifacts Maven Artifact> - A Maven artifact to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- Npm
Packages List<TriggerBuild Artifacts Npm Package> - Npm package to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- Objects
Trigger
Build Artifacts Objects - A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- Python
Packages List<TriggerBuild Artifacts Python Package> - Python package to upload to Artifact Registry upon successful completion of all build steps. A package can encapsulate multiple objects to be uploaded to a single repository. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- Images []string
- A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.
- Maven
Artifacts []TriggerBuild Artifacts Maven Artifact - A Maven artifact to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- Npm
Packages []TriggerBuild Artifacts Npm Package - Npm package to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- Objects
Trigger
Build Artifacts Objects - A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- Python
Packages []TriggerBuild Artifacts Python Package - Python package to upload to Artifact Registry upon successful completion of all build steps. A package can encapsulate multiple objects to be uploaded to a single repository. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- images List<String>
- A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.
- maven
Artifacts List<TriggerBuild Artifacts Maven Artifact> - A Maven artifact to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- npm
Packages List<TriggerBuild Artifacts Npm Package> - Npm package to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- objects
Trigger
Build Artifacts Objects - A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- python
Packages List<TriggerBuild Artifacts Python Package> - Python package to upload to Artifact Registry upon successful completion of all build steps. A package can encapsulate multiple objects to be uploaded to a single repository. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- images string[]
- A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.
- maven
Artifacts TriggerBuild Artifacts Maven Artifact[] - A Maven artifact to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- npm
Packages TriggerBuild Artifacts Npm Package[] - Npm package to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- objects
Trigger
Build Artifacts Objects - A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- python
Packages TriggerBuild Artifacts Python Package[] - Python package to upload to Artifact Registry upon successful completion of all build steps. A package can encapsulate multiple objects to be uploaded to a single repository. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- images Sequence[str]
- A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.
- maven_
artifacts Sequence[TriggerBuild Artifacts Maven Artifact] - A Maven artifact to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- npm_
packages Sequence[TriggerBuild Artifacts Npm Package] - Npm package to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- objects
Trigger
Build Artifacts Objects - A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- python_
packages Sequence[TriggerBuild Artifacts Python Package] - Python package to upload to Artifact Registry upon successful completion of all build steps. A package can encapsulate multiple objects to be uploaded to a single repository. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- images List<String>
- A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.
- maven
Artifacts List<Property Map> - A Maven artifact to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- npm
Packages List<Property Map> - Npm package to upload to Artifact Registry upon successful completion of all build steps. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- objects Property Map
- A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
- python
Packages List<Property Map> - Python package to upload to Artifact Registry upon successful completion of all build steps. A package can encapsulate multiple objects to be uploaded to a single repository. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. Structure is documented below.
TriggerBuildArtifactsMavenArtifact, TriggerBuildArtifactsMavenArtifactArgs
- Artifact
Id string - Maven artifactId value used when uploading the artifact to Artifact Registry.
- Group
Id string - Maven groupId value used when uploading the artifact to Artifact Registry.
- Path string
- Path to an artifact in the build's workspace to be uploaded to Artifact Registry. This can be either an absolute path, e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.
- Repository string
- Artifact Registry repository, in the form "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix.
- Version string
- Maven version value used when uploading the artifact to Artifact Registry.
- Artifact
Id string - Maven artifactId value used when uploading the artifact to Artifact Registry.
- Group
Id string - Maven groupId value used when uploading the artifact to Artifact Registry.
- Path string
- Path to an artifact in the build's workspace to be uploaded to Artifact Registry. This can be either an absolute path, e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.
- Repository string
- Artifact Registry repository, in the form "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix.
- Version string
- Maven version value used when uploading the artifact to Artifact Registry.
- artifact
Id String - Maven artifactId value used when uploading the artifact to Artifact Registry.
- group
Id String - Maven groupId value used when uploading the artifact to Artifact Registry.
- path String
- Path to an artifact in the build's workspace to be uploaded to Artifact Registry. This can be either an absolute path, e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.
- repository String
- Artifact Registry repository, in the form "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix.
- version String
- Maven version value used when uploading the artifact to Artifact Registry.
- artifact
Id string - Maven artifactId value used when uploading the artifact to Artifact Registry.
- group
Id string - Maven groupId value used when uploading the artifact to Artifact Registry.
- path string
- Path to an artifact in the build's workspace to be uploaded to Artifact Registry. This can be either an absolute path, e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.
- repository string
- Artifact Registry repository, in the form "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix.
- version string
- Maven version value used when uploading the artifact to Artifact Registry.
- artifact_
id str - Maven artifactId value used when uploading the artifact to Artifact Registry.
- group_
id str - Maven groupId value used when uploading the artifact to Artifact Registry.
- path str
- Path to an artifact in the build's workspace to be uploaded to Artifact Registry. This can be either an absolute path, e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.
- repository str
- Artifact Registry repository, in the form "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix.
- version str
- Maven version value used when uploading the artifact to Artifact Registry.
- artifact
Id String - Maven artifactId value used when uploading the artifact to Artifact Registry.
- group
Id String - Maven groupId value used when uploading the artifact to Artifact Registry.
- path String
- Path to an artifact in the build's workspace to be uploaded to Artifact Registry. This can be either an absolute path, e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.
- repository String
- Artifact Registry repository, in the form "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix.
- version String
- Maven version value used when uploading the artifact to Artifact Registry.
TriggerBuildArtifactsNpmPackage, TriggerBuildArtifactsNpmPackageArgs
- Package
Path string - Path to the package.json. e.g. workspace/path/to/package
- Repository string
- Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix.
- Package
Path string - Path to the package.json. e.g. workspace/path/to/package
- Repository string
- Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix.
- package
Path String - Path to the package.json. e.g. workspace/path/to/package
- repository String
- Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix.
- package
Path string - Path to the package.json. e.g. workspace/path/to/package
- repository string
- Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix.
- package_
path str - Path to the package.json. e.g. workspace/path/to/package
- repository str
- Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix.
- package
Path String - Path to the package.json. e.g. workspace/path/to/package
- repository String
- Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix.
TriggerBuildArtifactsObjects, TriggerBuildArtifactsObjectsArgs
- Location string
- Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
- Paths List<string>
- Path globs used to match files in the build's workspace.
- Timings
List<Trigger
Build Artifacts Objects Timing> (Output) Output only. Stores timing information for pushing all artifact objects. Structure is documented below.
The
timing
block contains:
- Location string
- Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
- Paths []string
- Path globs used to match files in the build's workspace.
- Timings
[]Trigger
Build Artifacts Objects Timing (Output) Output only. Stores timing information for pushing all artifact objects. Structure is documented below.
The
timing
block contains:
- location String
- Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
- paths List<String>
- Path globs used to match files in the build's workspace.
- timings
List<Trigger
Build Artifacts Objects Timing> (Output) Output only. Stores timing information for pushing all artifact objects. Structure is documented below.
The
timing
block contains:
- location string
- Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
- paths string[]
- Path globs used to match files in the build's workspace.
- timings
Trigger
Build Artifacts Objects Timing[] (Output) Output only. Stores timing information for pushing all artifact objects. Structure is documented below.
The
timing
block contains:
- location str
- Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
- paths Sequence[str]
- Path globs used to match files in the build's workspace.
- timings
Sequence[Trigger
Build Artifacts Objects Timing] (Output) Output only. Stores timing information for pushing all artifact objects. Structure is documented below.
The
timing
block contains:
- location String
- Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
- paths List<String>
- Path globs used to match files in the build's workspace.
- timings List<Property Map>
(Output) Output only. Stores timing information for pushing all artifact objects. Structure is documented below.
The
timing
block contains:
TriggerBuildArtifactsObjectsTiming, TriggerBuildArtifactsObjectsTimingArgs
- End
Time string End of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- Start
Time string Start of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- End
Time string End of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- Start
Time string Start of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- end
Time String End of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- start
Time String Start of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- end
Time string End of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- start
Time string Start of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- end_
time str End of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- start_
time str Start of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- end
Time String End of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- start
Time String Start of time span.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
TriggerBuildArtifactsPythonPackage, TriggerBuildArtifactsPythonPackageArgs
- Paths List<string>
- Path globs used to match files in the build's workspace. For Python/ Twine, this is usually dist/*, and sometimes additionally an .asc file.
- Repository string
- Artifact Registry repository, in the form "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix.
- Paths []string
- Path globs used to match files in the build's workspace. For Python/ Twine, this is usually dist/*, and sometimes additionally an .asc file.
- Repository string
- Artifact Registry repository, in the form "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix.
- paths List<String>
- Path globs used to match files in the build's workspace. For Python/ Twine, this is usually dist/*, and sometimes additionally an .asc file.
- repository String
- Artifact Registry repository, in the form "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix.
- paths string[]
- Path globs used to match files in the build's workspace. For Python/ Twine, this is usually dist/*, and sometimes additionally an .asc file.
- repository string
- Artifact Registry repository, in the form "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix.
- paths Sequence[str]
- Path globs used to match files in the build's workspace. For Python/ Twine, this is usually dist/*, and sometimes additionally an .asc file.
- repository str
- Artifact Registry repository, in the form "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix.
- paths List<String>
- Path globs used to match files in the build's workspace. For Python/ Twine, this is usually dist/*, and sometimes additionally an .asc file.
- repository String
- Artifact Registry repository, in the form "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix.
TriggerBuildAvailableSecrets, TriggerBuildAvailableSecretsArgs
- Secret
Managers List<TriggerBuild Available Secrets Secret Manager> - Pairs a secret environment variable with a SecretVersion in Secret Manager. Structure is documented below.
- Secret
Managers []TriggerBuild Available Secrets Secret Manager - Pairs a secret environment variable with a SecretVersion in Secret Manager. Structure is documented below.
- secret
Managers List<TriggerBuild Available Secrets Secret Manager> - Pairs a secret environment variable with a SecretVersion in Secret Manager. Structure is documented below.
- secret
Managers TriggerBuild Available Secrets Secret Manager[] - Pairs a secret environment variable with a SecretVersion in Secret Manager. Structure is documented below.
- secret_
managers Sequence[TriggerBuild Available Secrets Secret Manager] - Pairs a secret environment variable with a SecretVersion in Secret Manager. Structure is documented below.
- secret
Managers List<Property Map> - Pairs a secret environment variable with a SecretVersion in Secret Manager. Structure is documented below.
TriggerBuildAvailableSecretsSecretManager, TriggerBuildAvailableSecretsSecretManagerArgs
- Env string
- Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.
- Version
Name string - Resource name of the SecretVersion. In format: projects//secrets//versions/*
- Env string
- Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.
- Version
Name string - Resource name of the SecretVersion. In format: projects//secrets//versions/*
- env String
- Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.
- version
Name String - Resource name of the SecretVersion. In format: projects//secrets//versions/*
- env string
- Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.
- version
Name string - Resource name of the SecretVersion. In format: projects//secrets//versions/*
- env str
- Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.
- version_
name str - Resource name of the SecretVersion. In format: projects//secrets//versions/*
- env String
- Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.
- version
Name String - Resource name of the SecretVersion. In format: projects//secrets//versions/*
TriggerBuildOptions, TriggerBuildOptionsArgs
- Disk
Size intGb - Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
- Dynamic
Substitutions bool - Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
- Envs List<string>
- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- Log
Streaming stringOption - Option to define build log streaming behavior to Google Cloud Storage.
Possible values are:
STREAM_DEFAULT
,STREAM_ON
,STREAM_OFF
. - Logging string
- Option to specify the logging mode, which determines if and where build logs are stored.
Possible values are:
LOGGING_UNSPECIFIED
,LEGACY
,GCS_ONLY
,STACKDRIVER_ONLY
,CLOUD_LOGGING_ONLY
,NONE
. - Machine
Type string - Compute Engine machine type on which to run the build.
- Requested
Verify stringOption - Requested verifiability options.
Possible values are:
NOT_VERIFIED
,VERIFIED
. - Secret
Envs List<string> - A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.
- Source
Provenance List<string>Hashes - Requested hash for SourceProvenance.
Each value may be one of:
NONE
,SHA256
,MD5
. - Substitution
Option string - Option to specify behavior when there is an error in the substitution checks.
NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
in the build configuration file.
Possible values are:
MUST_MATCH
,ALLOW_LOOSE
. - Volumes
List<Trigger
Build Options Volume> - Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- Worker
Pool string - Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental.
- Disk
Size intGb - Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
- Dynamic
Substitutions bool - Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
- Envs []string
- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- Log
Streaming stringOption - Option to define build log streaming behavior to Google Cloud Storage.
Possible values are:
STREAM_DEFAULT
,STREAM_ON
,STREAM_OFF
. - Logging string
- Option to specify the logging mode, which determines if and where build logs are stored.
Possible values are:
LOGGING_UNSPECIFIED
,LEGACY
,GCS_ONLY
,STACKDRIVER_ONLY
,CLOUD_LOGGING_ONLY
,NONE
. - Machine
Type string - Compute Engine machine type on which to run the build.
- Requested
Verify stringOption - Requested verifiability options.
Possible values are:
NOT_VERIFIED
,VERIFIED
. - Secret
Envs []string - A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.
- Source
Provenance []stringHashes - Requested hash for SourceProvenance.
Each value may be one of:
NONE
,SHA256
,MD5
. - Substitution
Option string - Option to specify behavior when there is an error in the substitution checks.
NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
in the build configuration file.
Possible values are:
MUST_MATCH
,ALLOW_LOOSE
. - Volumes
[]Trigger
Build Options Volume - Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- Worker
Pool string - Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental.
- disk
Size IntegerGb - Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
- dynamic
Substitutions Boolean - Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
- envs List<String>
- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- log
Streaming StringOption - Option to define build log streaming behavior to Google Cloud Storage.
Possible values are:
STREAM_DEFAULT
,STREAM_ON
,STREAM_OFF
. - logging String
- Option to specify the logging mode, which determines if and where build logs are stored.
Possible values are:
LOGGING_UNSPECIFIED
,LEGACY
,GCS_ONLY
,STACKDRIVER_ONLY
,CLOUD_LOGGING_ONLY
,NONE
. - machine
Type String - Compute Engine machine type on which to run the build.
- requested
Verify StringOption - Requested verifiability options.
Possible values are:
NOT_VERIFIED
,VERIFIED
. - secret
Envs List<String> - A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.
- source
Provenance List<String>Hashes - Requested hash for SourceProvenance.
Each value may be one of:
NONE
,SHA256
,MD5
. - substitution
Option String - Option to specify behavior when there is an error in the substitution checks.
NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
in the build configuration file.
Possible values are:
MUST_MATCH
,ALLOW_LOOSE
. - volumes
List<Trigger
Build Options Volume> - Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- worker
Pool String - Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental.
- disk
Size numberGb - Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
- dynamic
Substitutions boolean - Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
- envs string[]
- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- log
Streaming stringOption - Option to define build log streaming behavior to Google Cloud Storage.
Possible values are:
STREAM_DEFAULT
,STREAM_ON
,STREAM_OFF
. - logging string
- Option to specify the logging mode, which determines if and where build logs are stored.
Possible values are:
LOGGING_UNSPECIFIED
,LEGACY
,GCS_ONLY
,STACKDRIVER_ONLY
,CLOUD_LOGGING_ONLY
,NONE
. - machine
Type string - Compute Engine machine type on which to run the build.
- requested
Verify stringOption - Requested verifiability options.
Possible values are:
NOT_VERIFIED
,VERIFIED
. - secret
Envs string[] - A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.
- source
Provenance string[]Hashes - Requested hash for SourceProvenance.
Each value may be one of:
NONE
,SHA256
,MD5
. - substitution
Option string - Option to specify behavior when there is an error in the substitution checks.
NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
in the build configuration file.
Possible values are:
MUST_MATCH
,ALLOW_LOOSE
. - volumes
Trigger
Build Options Volume[] - Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- worker
Pool string - Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental.
- disk_
size_ intgb - Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
- dynamic_
substitutions bool - Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
- envs Sequence[str]
- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- log_
streaming_ stroption - Option to define build log streaming behavior to Google Cloud Storage.
Possible values are:
STREAM_DEFAULT
,STREAM_ON
,STREAM_OFF
. - logging str
- Option to specify the logging mode, which determines if and where build logs are stored.
Possible values are:
LOGGING_UNSPECIFIED
,LEGACY
,GCS_ONLY
,STACKDRIVER_ONLY
,CLOUD_LOGGING_ONLY
,NONE
. - machine_
type str - Compute Engine machine type on which to run the build.
- requested_
verify_ stroption - Requested verifiability options.
Possible values are:
NOT_VERIFIED
,VERIFIED
. - secret_
envs Sequence[str] - A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.
- source_
provenance_ Sequence[str]hashes - Requested hash for SourceProvenance.
Each value may be one of:
NONE
,SHA256
,MD5
. - substitution_
option str - Option to specify behavior when there is an error in the substitution checks.
NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
in the build configuration file.
Possible values are:
MUST_MATCH
,ALLOW_LOOSE
. - volumes
Sequence[Trigger
Build Options Volume] - Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- worker_
pool str - Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental.
- disk
Size NumberGb - Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
- dynamic
Substitutions Boolean - Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
- envs List<String>
- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- log
Streaming StringOption - Option to define build log streaming behavior to Google Cloud Storage.
Possible values are:
STREAM_DEFAULT
,STREAM_ON
,STREAM_OFF
. - logging String
- Option to specify the logging mode, which determines if and where build logs are stored.
Possible values are:
LOGGING_UNSPECIFIED
,LEGACY
,GCS_ONLY
,STACKDRIVER_ONLY
,CLOUD_LOGGING_ONLY
,NONE
. - machine
Type String - Compute Engine machine type on which to run the build.
- requested
Verify StringOption - Requested verifiability options.
Possible values are:
NOT_VERIFIED
,VERIFIED
. - secret
Envs List<String> - A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.
- source
Provenance List<String>Hashes - Requested hash for SourceProvenance.
Each value may be one of:
NONE
,SHA256
,MD5
. - substitution
Option String - Option to specify behavior when there is an error in the substitution checks.
NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
in the build configuration file.
Possible values are:
MUST_MATCH
,ALLOW_LOOSE
. - volumes List<Property Map>
- Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- worker
Pool String - Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental.
TriggerBuildOptionsVolume, TriggerBuildOptionsVolumeArgs
- Name 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.
- Path string
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- Name 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.
- Path string
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- name 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.
- path String
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- name 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.
- path string
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- name str
- 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.
- path str
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- name 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.
- path String
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
TriggerBuildSecret, TriggerBuildSecretArgs
- Kms
Key stringName - Cloud KMS key name to use to decrypt these envs.
- Secret
Env Dictionary<string, string> - Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.
- Kms
Key stringName - Cloud KMS key name to use to decrypt these envs.
- Secret
Env map[string]string - Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.
- kms
Key StringName - Cloud KMS key name to use to decrypt these envs.
- secret
Env Map<String,String> - Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.
- kms
Key stringName - Cloud KMS key name to use to decrypt these envs.
- secret
Env {[key: string]: string} - Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.
- kms_
key_ strname - Cloud KMS key name to use to decrypt these envs.
- secret_
env Mapping[str, str] - Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.
- kms
Key StringName - Cloud KMS key name to use to decrypt these envs.
- secret
Env Map<String> - Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.
TriggerBuildSource, TriggerBuildSourceArgs
- Repo
Source TriggerBuild Source Repo Source - Location of the source in a Google Cloud Source Repository. Structure is documented below.
- Storage
Source TriggerBuild Source Storage Source - Location of the source in an archive file in Google Cloud Storage. Structure is documented below.
- Repo
Source TriggerBuild Source Repo Source - Location of the source in a Google Cloud Source Repository. Structure is documented below.
- Storage
Source TriggerBuild Source Storage Source - Location of the source in an archive file in Google Cloud Storage. Structure is documented below.
- repo
Source TriggerBuild Source Repo Source - Location of the source in a Google Cloud Source Repository. Structure is documented below.
- storage
Source TriggerBuild Source Storage Source - Location of the source in an archive file in Google Cloud Storage. Structure is documented below.
- repo
Source TriggerBuild Source Repo Source - Location of the source in a Google Cloud Source Repository. Structure is documented below.
- storage
Source TriggerBuild Source Storage Source - Location of the source in an archive file in Google Cloud Storage. Structure is documented below.
- repo_
source TriggerBuild Source Repo Source - Location of the source in a Google Cloud Source Repository. Structure is documented below.
- storage_
source TriggerBuild Source Storage Source - Location of the source in an archive file in Google Cloud Storage. Structure is documented below.
- repo
Source Property Map - Location of the source in a Google Cloud Source Repository. Structure is documented below.
- storage
Source Property Map - Location of the source in an archive file in Google Cloud Storage. Structure is documented below.
TriggerBuildSourceRepoSource, TriggerBuildSourceRepoSourceArgs
- Repo
Name string - Name of the Cloud Source Repository.
- Branch
Name string - Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- Commit
Sha string - Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.
- Dir string
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- Invert
Regex bool - Only trigger a build if the revision regex does NOT match the revision regex.
- Project
Id string - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- Substitutions Dictionary<string, string>
- Substitutions to use in a triggered build. Should only be used with triggers.run
- Tag
Name string - Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- Repo
Name string - Name of the Cloud Source Repository.
- Branch
Name string - Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- Commit
Sha string - Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.
- Dir string
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- Invert
Regex bool - Only trigger a build if the revision regex does NOT match the revision regex.
- Project
Id string - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- Substitutions map[string]string
- Substitutions to use in a triggered build. Should only be used with triggers.run
- Tag
Name string - Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- repo
Name String - Name of the Cloud Source Repository.
- branch
Name String - Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- commit
Sha String - Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.
- dir String
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- invert
Regex Boolean - Only trigger a build if the revision regex does NOT match the revision regex.
- project
Id String - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- substitutions Map<String,String>
- Substitutions to use in a triggered build. Should only be used with triggers.run
- tag
Name String - Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- repo
Name string - Name of the Cloud Source Repository.
- branch
Name string - Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- commit
Sha string - Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.
- dir string
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- invert
Regex boolean - Only trigger a build if the revision regex does NOT match the revision regex.
- project
Id string - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- substitutions {[key: string]: string}
- Substitutions to use in a triggered build. Should only be used with triggers.run
- tag
Name string - Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- repo_
name str - Name of the Cloud Source Repository.
- branch_
name str - Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- commit_
sha str - Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.
- dir str
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- invert_
regex bool - Only trigger a build if the revision regex does NOT match the revision regex.
- project_
id str - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- substitutions Mapping[str, str]
- Substitutions to use in a triggered build. Should only be used with triggers.run
- tag_
name str - Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- repo
Name String - Name of the Cloud Source Repository.
- branch
Name String - Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- commit
Sha String - Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.
- dir String
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- invert
Regex Boolean - Only trigger a build if the revision regex does NOT match the revision regex.
- project
Id String - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- substitutions Map<String>
- Substitutions to use in a triggered build. Should only be used with triggers.run
- tag
Name String - Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
TriggerBuildSourceStorageSource, TriggerBuildSourceStorageSourceArgs
- Bucket string
- Google Cloud Storage bucket containing the source.
- Object string
- Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build.
- Generation string
- Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used
- Bucket string
- Google Cloud Storage bucket containing the source.
- Object string
- Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build.
- Generation string
- Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used
- bucket String
- Google Cloud Storage bucket containing the source.
- object String
- Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build.
- generation String
- Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used
- bucket string
- Google Cloud Storage bucket containing the source.
- object string
- Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build.
- generation string
- Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used
- bucket str
- Google Cloud Storage bucket containing the source.
- object str
- Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build.
- generation str
- Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used
- bucket String
- Google Cloud Storage bucket containing the source.
- object String
- Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build.
- generation String
- Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used
TriggerBuildStep, TriggerBuildStepArgs
- Name string
- The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see https://github.com/GoogleCloudPlatform/cloud-builders for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.
- Allow
Exit List<int>Codes - Allow this build step to fail without failing the entire build if and
only if the exit code is one of the specified codes.
If
allowFailure
is also specified, this field will take precedence. - Allow
Failure bool - Allow this build step to fail without failing the entire build.
If false, the entire build will fail if this step fails. Otherwise, the
build will succeed, but this step will still have a failure status.
Error information will be reported in the
failureDetail
field.allowExitCodes
takes precedence over this field. - Args List<string>
- A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
- Dir string
- Working directory to use when running this step's container.
If this value is a relative path, it is relative to the build's working
directory. If this value is absolute, it may be outside the build's working
directory, in which case the contents of the path may not be persisted
across build step executions, unless a
volume
for that path is specified. If the build specifies aRepoSource
withdir
and a step with adir
, which specifies an absolute path, theRepoSource
dir
is ignored for the step's execution. - Entrypoint string
- Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used
- Envs List<string>
- A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- Id string
- Unique identifier for this build step, used in
wait_for
to reference this build step as a dependency. - Script string
- A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.
- Secret
Envs List<string> - A list of environment variables which are encrypted using
a Cloud Key
Management Service crypto key. These values must be specified in
the build's
Secret
. - Timeout string
- Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
- Timing string
- Output only. Stores timing information for executing this build step.
- Volumes
List<Trigger
Build Step Volume> - List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- Wait
Fors List<string> - The ID(s) of the step(s) that this build step depends on.
This build step will not start until all the build steps in
wait_for
have completed successfully. Ifwait_for
is empty, this build step will start when all previous build steps in theBuild.Steps
list have completed successfully.
- Name string
- The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see https://github.com/GoogleCloudPlatform/cloud-builders for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.
- Allow
Exit []intCodes - Allow this build step to fail without failing the entire build if and
only if the exit code is one of the specified codes.
If
allowFailure
is also specified, this field will take precedence. - Allow
Failure bool - Allow this build step to fail without failing the entire build.
If false, the entire build will fail if this step fails. Otherwise, the
build will succeed, but this step will still have a failure status.
Error information will be reported in the
failureDetail
field.allowExitCodes
takes precedence over this field. - Args []string
- A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
- Dir string
- Working directory to use when running this step's container.
If this value is a relative path, it is relative to the build's working
directory. If this value is absolute, it may be outside the build's working
directory, in which case the contents of the path may not be persisted
across build step executions, unless a
volume
for that path is specified. If the build specifies aRepoSource
withdir
and a step with adir
, which specifies an absolute path, theRepoSource
dir
is ignored for the step's execution. - Entrypoint string
- Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used
- Envs []string
- A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- Id string
- Unique identifier for this build step, used in
wait_for
to reference this build step as a dependency. - Script string
- A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.
- Secret
Envs []string - A list of environment variables which are encrypted using
a Cloud Key
Management Service crypto key. These values must be specified in
the build's
Secret
. - Timeout string
- Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
- Timing string
- Output only. Stores timing information for executing this build step.
- Volumes
[]Trigger
Build Step Volume - List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- Wait
Fors []string - The ID(s) of the step(s) that this build step depends on.
This build step will not start until all the build steps in
wait_for
have completed successfully. Ifwait_for
is empty, this build step will start when all previous build steps in theBuild.Steps
list have completed successfully.
- name String
- The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see https://github.com/GoogleCloudPlatform/cloud-builders for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.
- allow
Exit List<Integer>Codes - Allow this build step to fail without failing the entire build if and
only if the exit code is one of the specified codes.
If
allowFailure
is also specified, this field will take precedence. - allow
Failure Boolean - Allow this build step to fail without failing the entire build.
If false, the entire build will fail if this step fails. Otherwise, the
build will succeed, but this step will still have a failure status.
Error information will be reported in the
failureDetail
field.allowExitCodes
takes precedence over this field. - args List<String>
- A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
- dir String
- Working directory to use when running this step's container.
If this value is a relative path, it is relative to the build's working
directory. If this value is absolute, it may be outside the build's working
directory, in which case the contents of the path may not be persisted
across build step executions, unless a
volume
for that path is specified. If the build specifies aRepoSource
withdir
and a step with adir
, which specifies an absolute path, theRepoSource
dir
is ignored for the step's execution. - entrypoint String
- Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used
- envs List<String>
- A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- id String
- Unique identifier for this build step, used in
wait_for
to reference this build step as a dependency. - script String
- A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.
- secret
Envs List<String> - A list of environment variables which are encrypted using
a Cloud Key
Management Service crypto key. These values must be specified in
the build's
Secret
. - timeout String
- Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
- timing String
- Output only. Stores timing information for executing this build step.
- volumes
List<Trigger
Build Step Volume> - List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- wait
Fors List<String> - The ID(s) of the step(s) that this build step depends on.
This build step will not start until all the build steps in
wait_for
have completed successfully. Ifwait_for
is empty, this build step will start when all previous build steps in theBuild.Steps
list have completed successfully.
- name string
- The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see https://github.com/GoogleCloudPlatform/cloud-builders for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.
- allow
Exit number[]Codes - Allow this build step to fail without failing the entire build if and
only if the exit code is one of the specified codes.
If
allowFailure
is also specified, this field will take precedence. - allow
Failure boolean - Allow this build step to fail without failing the entire build.
If false, the entire build will fail if this step fails. Otherwise, the
build will succeed, but this step will still have a failure status.
Error information will be reported in the
failureDetail
field.allowExitCodes
takes precedence over this field. - args string[]
- A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
- dir string
- Working directory to use when running this step's container.
If this value is a relative path, it is relative to the build's working
directory. If this value is absolute, it may be outside the build's working
directory, in which case the contents of the path may not be persisted
across build step executions, unless a
volume
for that path is specified. If the build specifies aRepoSource
withdir
and a step with adir
, which specifies an absolute path, theRepoSource
dir
is ignored for the step's execution. - entrypoint string
- Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used
- envs string[]
- A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- id string
- Unique identifier for this build step, used in
wait_for
to reference this build step as a dependency. - script string
- A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.
- secret
Envs string[] - A list of environment variables which are encrypted using
a Cloud Key
Management Service crypto key. These values must be specified in
the build's
Secret
. - timeout string
- Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
- timing string
- Output only. Stores timing information for executing this build step.
- volumes
Trigger
Build Step Volume[] - List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- wait
Fors string[] - The ID(s) of the step(s) that this build step depends on.
This build step will not start until all the build steps in
wait_for
have completed successfully. Ifwait_for
is empty, this build step will start when all previous build steps in theBuild.Steps
list have completed successfully.
- name str
- The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see https://github.com/GoogleCloudPlatform/cloud-builders for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.
- allow_
exit_ Sequence[int]codes - Allow this build step to fail without failing the entire build if and
only if the exit code is one of the specified codes.
If
allowFailure
is also specified, this field will take precedence. - allow_
failure bool - Allow this build step to fail without failing the entire build.
If false, the entire build will fail if this step fails. Otherwise, the
build will succeed, but this step will still have a failure status.
Error information will be reported in the
failureDetail
field.allowExitCodes
takes precedence over this field. - args Sequence[str]
- A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
- dir str
- Working directory to use when running this step's container.
If this value is a relative path, it is relative to the build's working
directory. If this value is absolute, it may be outside the build's working
directory, in which case the contents of the path may not be persisted
across build step executions, unless a
volume
for that path is specified. If the build specifies aRepoSource
withdir
and a step with adir
, which specifies an absolute path, theRepoSource
dir
is ignored for the step's execution. - entrypoint str
- Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used
- envs Sequence[str]
- A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- id str
- Unique identifier for this build step, used in
wait_for
to reference this build step as a dependency. - script str
- A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.
- secret_
envs Sequence[str] - A list of environment variables which are encrypted using
a Cloud Key
Management Service crypto key. These values must be specified in
the build's
Secret
. - timeout str
- Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
- timing str
- Output only. Stores timing information for executing this build step.
- volumes
Sequence[Trigger
Build Step Volume] - List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- wait_
fors Sequence[str] - The ID(s) of the step(s) that this build step depends on.
This build step will not start until all the build steps in
wait_for
have completed successfully. Ifwait_for
is empty, this build step will start when all previous build steps in theBuild.Steps
list have completed successfully.
- name String
- The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see https://github.com/GoogleCloudPlatform/cloud-builders for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.
- allow
Exit List<Number>Codes - Allow this build step to fail without failing the entire build if and
only if the exit code is one of the specified codes.
If
allowFailure
is also specified, this field will take precedence. - allow
Failure Boolean - Allow this build step to fail without failing the entire build.
If false, the entire build will fail if this step fails. Otherwise, the
build will succeed, but this step will still have a failure status.
Error information will be reported in the
failureDetail
field.allowExitCodes
takes precedence over this field. - args List<String>
- A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
- dir String
- Working directory to use when running this step's container.
If this value is a relative path, it is relative to the build's working
directory. If this value is absolute, it may be outside the build's working
directory, in which case the contents of the path may not be persisted
across build step executions, unless a
volume
for that path is specified. If the build specifies aRepoSource
withdir
and a step with adir
, which specifies an absolute path, theRepoSource
dir
is ignored for the step's execution. - entrypoint String
- Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used
- envs List<String>
- A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- id String
- Unique identifier for this build step, used in
wait_for
to reference this build step as a dependency. - script String
- A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.
- secret
Envs List<String> - A list of environment variables which are encrypted using
a Cloud Key
Management Service crypto key. These values must be specified in
the build's
Secret
. - timeout String
- Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
- timing String
- Output only. Stores timing information for executing this build step.
- volumes List<Property Map>
- List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. Structure is documented below.
- wait
Fors List<String> - The ID(s) of the step(s) that this build step depends on.
This build step will not start until all the build steps in
wait_for
have completed successfully. Ifwait_for
is empty, this build step will start when all previous build steps in theBuild.Steps
list have completed successfully.
TriggerBuildStepVolume, TriggerBuildStepVolumeArgs
- Name 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.
- Path string
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- Name 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.
- Path string
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- name 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.
- path String
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- name 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.
- path string
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- name str
- 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.
- path str
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
- name 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.
- path String
- Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
TriggerGitFileSource, TriggerGitFileSourceArgs
- Path string
- The path of the file, with the repo root as the root of the path.
- Repo
Type string - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - Bitbucket
Server stringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- Github
Enterprise stringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- Repository string
- The fully qualified resource name of the Repo API repository. The fully qualified resource name of the Repo API repository. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- Revision string
- The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
- Uri string
- The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- Path string
- The path of the file, with the repo root as the root of the path.
- Repo
Type string - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - Bitbucket
Server stringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- Github
Enterprise stringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- Repository string
- The fully qualified resource name of the Repo API repository. The fully qualified resource name of the Repo API repository. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- Revision string
- The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
- Uri string
- The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- path String
- The path of the file, with the repo root as the root of the path.
- repo
Type String - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - bitbucket
Server StringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- github
Enterprise StringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- repository String
- The fully qualified resource name of the Repo API repository. The fully qualified resource name of the Repo API repository. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- revision String
- The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
- uri String
- The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- path string
- The path of the file, with the repo root as the root of the path.
- repo
Type string - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - bitbucket
Server stringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- github
Enterprise stringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- repository string
- The fully qualified resource name of the Repo API repository. The fully qualified resource name of the Repo API repository. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- revision string
- The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
- uri string
- The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- path str
- The path of the file, with the repo root as the root of the path.
- repo_
type str - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - bitbucket_
server_ strconfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- github_
enterprise_ strconfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- repository str
- The fully qualified resource name of the Repo API repository. The fully qualified resource name of the Repo API repository. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- revision str
- The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
- uri str
- The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- path String
- The path of the file, with the repo root as the root of the path.
- repo
Type String - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - bitbucket
Server StringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- github
Enterprise StringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- repository String
- The fully qualified resource name of the Repo API repository. The fully qualified resource name of the Repo API repository. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- revision String
- The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
- uri String
- The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
TriggerGithub, TriggerGithubArgs
- Enterprise
Config stringResource Name - The resource name of the github enterprise config that should be applied to this installation. For example: "projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}"
- Name string
- Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".
- Owner string
- Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".
- Pull
Request TriggerGithub Pull Request - filter to match changes in pull requests. Specify only one of
pull_request
orpush
. Structure is documented below. - Push
Trigger
Github Push - filter to match changes in refs, like branches or tags. Specify only one of
pull_request
orpush
. Structure is documented below.
- Enterprise
Config stringResource Name - The resource name of the github enterprise config that should be applied to this installation. For example: "projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}"
- Name string
- Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".
- Owner string
- Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".
- Pull
Request TriggerGithub Pull Request - filter to match changes in pull requests. Specify only one of
pull_request
orpush
. Structure is documented below. - Push
Trigger
Github Push - filter to match changes in refs, like branches or tags. Specify only one of
pull_request
orpush
. Structure is documented below.
- enterprise
Config StringResource Name - The resource name of the github enterprise config that should be applied to this installation. For example: "projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}"
- name String
- Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".
- owner String
- Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".
- pull
Request TriggerGithub Pull Request - filter to match changes in pull requests. Specify only one of
pull_request
orpush
. Structure is documented below. - push
Trigger
Github Push - filter to match changes in refs, like branches or tags. Specify only one of
pull_request
orpush
. Structure is documented below.
- enterprise
Config stringResource Name - The resource name of the github enterprise config that should be applied to this installation. For example: "projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}"
- name string
- Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".
- owner string
- Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".
- pull
Request TriggerGithub Pull Request - filter to match changes in pull requests. Specify only one of
pull_request
orpush
. Structure is documented below. - push
Trigger
Github Push - filter to match changes in refs, like branches or tags. Specify only one of
pull_request
orpush
. Structure is documented below.
- enterprise_
config_ strresource_ name - The resource name of the github enterprise config that should be applied to this installation. For example: "projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}"
- name str
- Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".
- owner str
- Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".
- pull_
request TriggerGithub Pull Request - filter to match changes in pull requests. Specify only one of
pull_request
orpush
. Structure is documented below. - push
Trigger
Github Push - filter to match changes in refs, like branches or tags. Specify only one of
pull_request
orpush
. Structure is documented below.
- enterprise
Config StringResource Name - The resource name of the github enterprise config that should be applied to this installation. For example: "projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}"
- name String
- Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".
- owner String
- Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".
- pull
Request Property Map - filter to match changes in pull requests. Specify only one of
pull_request
orpush
. Structure is documented below. - push Property Map
- filter to match changes in refs, like branches or tags. Specify only one of
pull_request
orpush
. Structure is documented below.
TriggerGithubPullRequest, TriggerGithubPullRequestArgs
- Branch string
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- Comment
Control string - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - Invert
Regex bool - If true, branches that do NOT match the git_ref will trigger a build.
- Branch string
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- Comment
Control string - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - Invert
Regex bool - If true, branches that do NOT match the git_ref will trigger a build.
- branch String
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment
Control String - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert
Regex Boolean - If true, branches that do NOT match the git_ref will trigger a build.
- branch string
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment
Control string - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert
Regex boolean - If true, branches that do NOT match the git_ref will trigger a build.
- branch str
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment_
control str - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert_
regex bool - If true, branches that do NOT match the git_ref will trigger a build.
- branch String
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment
Control String - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert
Regex Boolean - If true, branches that do NOT match the git_ref will trigger a build.
TriggerGithubPush, TriggerGithubPushArgs
- Branch string
- Regex of branches to match. Specify only one of branch or tag.
- Invert
Regex bool - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- Tag string
- Regex of tags to match. Specify only one of branch or tag.
- Branch string
- Regex of branches to match. Specify only one of branch or tag.
- Invert
Regex bool - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- Tag string
- Regex of tags to match. Specify only one of branch or tag.
- branch String
- Regex of branches to match. Specify only one of branch or tag.
- invert
Regex Boolean - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag String
- Regex of tags to match. Specify only one of branch or tag.
- branch string
- Regex of branches to match. Specify only one of branch or tag.
- invert
Regex boolean - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag string
- Regex of tags to match. Specify only one of branch or tag.
- branch str
- Regex of branches to match. Specify only one of branch or tag.
- invert_
regex bool - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag str
- Regex of tags to match. Specify only one of branch or tag.
- branch String
- Regex of branches to match. Specify only one of branch or tag.
- invert
Regex Boolean - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag String
- Regex of tags to match. Specify only one of branch or tag.
TriggerPubsubConfig, TriggerPubsubConfigArgs
- Topic string
- The name of the topic from which this subscription is receiving messages.
- Service
Account stringEmail - Service account that will make the push request.
- State string
- (Output) Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
- Subscription string
- (Output) Output only. Name of the subscription.
- Topic string
- The name of the topic from which this subscription is receiving messages.
- Service
Account stringEmail - Service account that will make the push request.
- State string
- (Output) Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
- Subscription string
- (Output) Output only. Name of the subscription.
- topic String
- The name of the topic from which this subscription is receiving messages.
- service
Account StringEmail - Service account that will make the push request.
- state String
- (Output) Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
- subscription String
- (Output) Output only. Name of the subscription.
- topic string
- The name of the topic from which this subscription is receiving messages.
- service
Account stringEmail - Service account that will make the push request.
- state string
- (Output) Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
- subscription string
- (Output) Output only. Name of the subscription.
- topic str
- The name of the topic from which this subscription is receiving messages.
- service_
account_ stremail - Service account that will make the push request.
- state str
- (Output) Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
- subscription str
- (Output) Output only. Name of the subscription.
- topic String
- The name of the topic from which this subscription is receiving messages.
- service
Account StringEmail - Service account that will make the push request.
- state String
- (Output) Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
- subscription String
- (Output) Output only. Name of the subscription.
TriggerRepositoryEventConfig, TriggerRepositoryEventConfigArgs
- Pull
Request TriggerRepository Event Config Pull Request - Contains filter properties for matching Pull Requests. Structure is documented below.
- Push
Trigger
Repository Event Config Push - Contains filter properties for matching git pushes. Structure is documented below.
- Repository string
- The resource name of the Repo API resource.
- Pull
Request TriggerRepository Event Config Pull Request - Contains filter properties for matching Pull Requests. Structure is documented below.
- Push
Trigger
Repository Event Config Push - Contains filter properties for matching git pushes. Structure is documented below.
- Repository string
- The resource name of the Repo API resource.
- pull
Request TriggerRepository Event Config Pull Request - Contains filter properties for matching Pull Requests. Structure is documented below.
- push
Trigger
Repository Event Config Push - Contains filter properties for matching git pushes. Structure is documented below.
- repository String
- The resource name of the Repo API resource.
- pull
Request TriggerRepository Event Config Pull Request - Contains filter properties for matching Pull Requests. Structure is documented below.
- push
Trigger
Repository Event Config Push - Contains filter properties for matching git pushes. Structure is documented below.
- repository string
- The resource name of the Repo API resource.
- pull_
request TriggerRepository Event Config Pull Request - Contains filter properties for matching Pull Requests. Structure is documented below.
- push
Trigger
Repository Event Config Push - Contains filter properties for matching git pushes. Structure is documented below.
- repository str
- The resource name of the Repo API resource.
- pull
Request Property Map - Contains filter properties for matching Pull Requests. Structure is documented below.
- push Property Map
- Contains filter properties for matching git pushes. Structure is documented below.
- repository String
- The resource name of the Repo API resource.
TriggerRepositoryEventConfigPullRequest, TriggerRepositoryEventConfigPullRequestArgs
- Branch string
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- Comment
Control string - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - Invert
Regex bool - If true, branches that do NOT match the git_ref will trigger a build.
- Branch string
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- Comment
Control string - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - Invert
Regex bool - If true, branches that do NOT match the git_ref will trigger a build.
- branch String
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment
Control String - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert
Regex Boolean - If true, branches that do NOT match the git_ref will trigger a build.
- branch string
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment
Control string - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert
Regex boolean - If true, branches that do NOT match the git_ref will trigger a build.
- branch str
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment_
control str - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert_
regex bool - If true, branches that do NOT match the git_ref will trigger a build.
- branch String
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
- comment
Control String - Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.
Possible values are:
COMMENTS_DISABLED
,COMMENTS_ENABLED
,COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
. - invert
Regex Boolean - If true, branches that do NOT match the git_ref will trigger a build.
TriggerRepositoryEventConfigPush, TriggerRepositoryEventConfigPushArgs
- Branch string
- Regex of branches to match. Specify only one of branch or tag.
- Invert
Regex bool - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- Tag string
- Regex of tags to match. Specify only one of branch or tag.
- Branch string
- Regex of branches to match. Specify only one of branch or tag.
- Invert
Regex bool - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- Tag string
- Regex of tags to match. Specify only one of branch or tag.
- branch String
- Regex of branches to match. Specify only one of branch or tag.
- invert
Regex Boolean - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag String
- Regex of tags to match. Specify only one of branch or tag.
- branch string
- Regex of branches to match. Specify only one of branch or tag.
- invert
Regex boolean - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag string
- Regex of tags to match. Specify only one of branch or tag.
- branch str
- Regex of branches to match. Specify only one of branch or tag.
- invert_
regex bool - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag str
- Regex of tags to match. Specify only one of branch or tag.
- branch String
- Regex of branches to match. Specify only one of branch or tag.
- invert
Regex Boolean - When true, only trigger a build if the revision regex does NOT match the gitRef regex.
- tag String
- Regex of tags to match. Specify only one of branch or tag.
TriggerSourceToBuild, TriggerSourceToBuildArgs
- Ref string
- The branch or tag to use. Must start with "refs/" (required).
- Repo
Type string - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - Bitbucket
Server stringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- Github
Enterprise stringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- Repository string
- The qualified resource name of the Repo API repository. Either uri or repository can be specified and is required.
- Uri string
- The URI of the repo.
- Ref string
- The branch or tag to use. Must start with "refs/" (required).
- Repo
Type string - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - Bitbucket
Server stringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- Github
Enterprise stringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- Repository string
- The qualified resource name of the Repo API repository. Either uri or repository can be specified and is required.
- Uri string
- The URI of the repo.
- ref String
- The branch or tag to use. Must start with "refs/" (required).
- repo
Type String - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - bitbucket
Server StringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- github
Enterprise StringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- repository String
- The qualified resource name of the Repo API repository. Either uri or repository can be specified and is required.
- uri String
- The URI of the repo.
- ref string
- The branch or tag to use. Must start with "refs/" (required).
- repo
Type string - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - bitbucket
Server stringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- github
Enterprise stringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- repository string
- The qualified resource name of the Repo API repository. Either uri or repository can be specified and is required.
- uri string
- The URI of the repo.
- ref str
- The branch or tag to use. Must start with "refs/" (required).
- repo_
type str - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - bitbucket_
server_ strconfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- github_
enterprise_ strconfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- repository str
- The qualified resource name of the Repo API repository. Either uri or repository can be specified and is required.
- uri str
- The URI of the repo.
- ref String
- The branch or tag to use. Must start with "refs/" (required).
- repo
Type String - The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
Possible values are:
UNKNOWN
,CLOUD_SOURCE_REPOSITORIES
,GITHUB
,BITBUCKET_SERVER
. - bitbucket
Server StringConfig - The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
- github
Enterprise StringConfig - The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
- repository String
- The qualified resource name of the Repo API repository. Either uri or repository can be specified and is required.
- uri String
- The URI of the repo.
TriggerTriggerTemplate, TriggerTriggerTemplateArgs
- Branch
Name string - Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression.
- Commit
Sha string - Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided.
- Dir string
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- Invert
Regex bool - Only trigger a build if the revision regex does NOT match the revision regex.
- Project
Id string - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- Repo
Name string - Name of the Cloud Source Repository. If omitted, the name "default" is assumed.
- Tag
Name string - Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression.
- Branch
Name string - Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression.
- Commit
Sha string - Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided.
- Dir string
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- Invert
Regex bool - Only trigger a build if the revision regex does NOT match the revision regex.
- Project
Id string - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- Repo
Name string - Name of the Cloud Source Repository. If omitted, the name "default" is assumed.
- Tag
Name string - Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression.
- branch
Name String - Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression.
- commit
Sha String - Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided.
- dir String
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- invert
Regex Boolean - Only trigger a build if the revision regex does NOT match the revision regex.
- project
Id String - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- repo
Name String - Name of the Cloud Source Repository. If omitted, the name "default" is assumed.
- tag
Name String - Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression.
- branch
Name string - Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression.
- commit
Sha string - Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided.
- dir string
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- invert
Regex boolean - Only trigger a build if the revision regex does NOT match the revision regex.
- project
Id string - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- repo
Name string - Name of the Cloud Source Repository. If omitted, the name "default" is assumed.
- tag
Name string - Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression.
- branch_
name str - Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression.
- commit_
sha str - Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided.
- dir str
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- invert_
regex bool - Only trigger a build if the revision regex does NOT match the revision regex.
- project_
id str - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- repo_
name str - Name of the Cloud Source Repository. If omitted, the name "default" is assumed.
- tag_
name str - Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression.
- branch
Name String - Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression.
- commit
Sha String - Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided.
- dir String
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
- invert
Regex Boolean - Only trigger a build if the revision regex does NOT match the revision regex.
- project
Id String - ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- repo
Name String - Name of the Cloud Source Repository. If omitted, the name "default" is assumed.
- tag
Name String - Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression.
TriggerWebhookConfig, TriggerWebhookConfigArgs
Import
Trigger can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/triggers/{{trigger_id}}
projects/{{project}}/triggers/{{trigger_id}}
{{project}}/{{trigger_id}}
{{trigger_id}}
When using the pulumi import
command, Trigger can be imported using one of the formats above. For example:
$ pulumi import gcp:cloudbuild/trigger:Trigger default projects/{{project}}/locations/{{location}}/triggers/{{trigger_id}}
$ pulumi import gcp:cloudbuild/trigger:Trigger default projects/{{project}}/triggers/{{trigger_id}}
$ pulumi import gcp:cloudbuild/trigger:Trigger default {{project}}/{{trigger_id}}
$ pulumi import gcp:cloudbuild/trigger:Trigger default {{trigger_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.