gcloud alpha builds triggers create manual

NAME
gcloud alpha builds triggers create manual - create a build trigger with a manual trigger event
SYNOPSIS
gcloud alpha builds triggers create manual(--trigger-config=PATH    | [(--build-config=PATH |--inline-config=PATH | [--dockerfile=DOCKERFILE :--dockerfile-dir=DOCKERFILE_DIR; default="/"--dockerfile-image=DOCKERFILE_IMAGE]) :--description=DESCRIPTION--name=NAME--region=REGION--[no-]require-approval--service-account=SERVICE_ACCOUNT--substitutions=[KEY=VALUE,…]--branch=BRANCH |--tag=TAG--repository=REPOSITORY | [--repo=REPO--repo-type=REPO_TYPE :--github-enterprise-config=GITHUB_ENTERPRISE_CONFIG]])[GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Create a build trigger with a manual trigger event.
EXAMPLES
To create a manual trigger that builds off branchmy-branch in aGitHub repository namedmy-repo:
gcloudalphabuildstriggerscreatemanual--name=my-manual-trigger--build-config=cloudbuild.yaml--repo=https://www.github.com/owner/repo--repo-type=GITHUB--branch=my-branch

To create a manual trigger that builds off branchmy-branch in a2nd-gen GitHub repository resource:

gcloudalphabuildstriggerscreatemanual--name=my-manual-trigger--build-config=cloudbuild.yaml--repository=projects/my-proj/locations/us-west1/connections/my-conn/repositories/my-repo--branch=my-branch
REQUIRED FLAGS
Exactly one of these must be specified:
--trigger-config=PATH
Path to Build Trigger config file (JSON or YAML format). For more details, seehttps://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.triggers#BuildTrigger
Flag based trigger configuration
--description=DESCRIPTION
Build trigger description.
--name=NAME
Build trigger name.
--region=REGION
The region of the Cloud Build Service to use. Must be set to a supported regionname (e.g.us-central1). If unset,builds/region,which is the default region to use when working with Cloud Build resources, isused. If builds/region is unset, region is set toglobal. Note:Region must be specified in 2nd gen repo;global is not supported.
--[no-]require-approval
Require manual approval for triggered builds. Use--require-approval to enable and--no-require-approvalto disable.
--service-account=SERVICE_ACCOUNT
The service account used for all user-controlled operations includingUpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no serviceaccount is set, then the standard Cloud Build service account([PROJECT_NUM]@system.gserviceaccount.com) is used instead. Format:projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}.
--substitutions=[KEY=VALUE,…]
Parameters to be substituted in the build specification. For example:
gcloudalphabuildstriggerscreatemanual--substitutions_FAVORITE_COLOR=blue,_NUM_CANDIES=10

This will result in a build where every occurrence of${_FAVORITE_COLOR} in certain fields is replaced by "blue", andsimilarly for${_NUM_CANDIES} and "10".

Substitutions can be applied to user-defined variables (starting with anunderscore) and to the following built-in variables: REPO_NAME, BRANCH_NAME,TAG_NAME, REVISION_ID, COMMIT_SHA, SHORT_SHA.

For more details, see:https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values

Exactly one of these must be specified:
--build-config=PATH
Path to a YAML or JSON file containing the build configuration in therepository.

For more details, see:https://cloud.google.com/cloud-build/docs/build-config

--inline-config=PATH
Local path to a YAML or JSON file containing a build configuration.
Dockerfile build configuration flags
--dockerfile=DOCKERFILE
Path of Dockerfile to use for builds in the repository.

If specified, a build config will be generated to run docker build using thespecified file.

The filename is relative to the Dockerfile directory.

This flag argument must be specified if any of the other arguments in this groupare specified.

--dockerfile-dir=DOCKERFILE_DIR; default="/"
Location of the directory containing the Dockerfile in the repository.

The directory will also be used as the Docker build context.

--dockerfile-image=DOCKERFILE_IMAGE
Docker image name to build.

If not specified, gcr.io/PROJECT/github.com/REPO_OWNER/REPO_NAME:$COMMIT_SHAwill be used.

Use a build configuration (cloudbuild.yaml) file for building multiple images ina single trigger.

Flags for repository and branch information
At most one of these can be specified:
--branch=BRANCH
Branch to build.
--tag=TAG
Tag to build.
Flags for repository information

At most one of these can be specified:

--repository=REPOSITORY
Repository resource (2nd gen) to use, in the format"projects/*/locations/*/connections/*/repositories/".
1st-gen repository settings.
--repo=REPO
URI of the repository (1st gen). Currently only HTTP URIs for GitHub and CloudSource Repositories are supported.

This flag argument must be specified if any of the other arguments in this groupare specified.

--repo-type=REPO_TYPE
Type of the repository (1st gen). Currently only GitHub and Cloud SourceRepository types are supported.

This flag argument must be specified if any of the other arguments in this groupare specified.

--github-enterprise-config=GITHUB_ENTERPRISE_CONFIG
The resource name of the GitHub Enterprise config that should be applied to thissource (1st gen). Format:projects/{project}/locations/{location}/githubEnterpriseConfigs/{id} orprojects/{project}/githubEnterpriseConfigs/{id}
GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

NOTES
This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudbuildstriggerscreatemanual
gcloudbetabuildstriggerscreatemanual

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.