1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-19 07:15:23 +00:00

gcloud: Wed Jul 12 10:20:16 UTC 2023

This commit is contained in:
Automated 2023-07-12 10:20:16 +00:00
parent f52bc665a7
commit b4c2508b12
300 changed files with 7469 additions and 3231 deletions

View file

@ -0,0 +1,95 @@
NAME
gcloud builds connections add-iam-policy-binding - add IAM policy binding
to a Cloud Build connection
SYNOPSIS
gcloud builds connections add-iam-policy-binding
(CONNECTION : --region=REGION) --member=PRINCIPAL --role=ROLE
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Add IAM policy binding to a Cloud Build connection. One binding consists of
a member and a role.
EXAMPLES
To add an IAM policy binding for the role of
'roles/cloudbuild.connectionViewer' for the user 'test-user@gmail.com' on a
Connection named 'my-conn', run:
$ gcloud builds connections add-iam-policy-binding my-conn \
--region=us-central1 --member='user:test-user@gmail.com' \
--role='roles/cloudbuild.connectionViewer'
POSITIONAL ARGUMENTS
Connection resource - Cloud Build Connection for which to add the IAM
policy binding. The arguments in this group can be used to specify the
attributes of this resource. (NOTE) Some attributes are not given
arguments in this group but can be set in other ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
REQUIRED FLAGS
--member=PRINCIPAL
The principal to add the binding for. Should be of the form
user|group|serviceAccount:email or domain:domain.
Examples: user:test-user@gmail.com, group:admins@example.com,
serviceAccount:test123@example.domain.com, or
domain:example.domain.com.
Some resources also accept the following special values:
◆ allUsers - Special identifier that represents anyone who is on the
internet, with or without a Google account.
◆ allAuthenticatedUsers - Special identifier that represents anyone
who is authenticated with a Google account or a service account.
--role=ROLE
Role name to assign to the principal. The role name is the complete
path of a predefined role, such as roles/logging.viewer, or the role ID
for a custom role, such as
organizations/{ORGANIZATION_ID}/roles/logging.viewer.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections add-iam-policy-binding
$ gcloud beta builds connections add-iam-policy-binding

View file

@ -0,0 +1,119 @@
NAME
gcloud builds connections create github - create a Cloud Build Connection
of type GitHub
SYNOPSIS
gcloud builds connections create github (CONNECTION : --region=REGION)
[--async]
[--authorizer-token-secret-version=AUTHORIZER_TOKEN_SECRET_VERSION
: --app-installation-id=APP_INSTALLATION_ID] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create a Cloud Build Connection of type GitHub (for github.com).
Connections for github.com can be created either by following an
installation process (that requires manual steps in a web browser) or by
providing the properties of an already-installed application (installation
ID and a user token) as arguments to this command.
EXAMPLES
To create a connection by following the installation process, provide only
the connection name:
$ gcloud builds connections create github myconn --project=myproj \
--region=us-central1
The command will print a URL to be opened in a web browser in order to
authorize Cloud Build (i.e. Cloud Build gets an OAuth token for the github
account that you use). After doing this authorization, you can get the
connection's installation state with the describe command:
$ gcloud alpha builds connections describe myconn
The output will include a second link to install the Cloud Build GitHub
App. After doing this, the connection will be in installation state
COMPLETE and repositories can be added to it (see gcloud alpha builds
repositories create).
--
To create a complete connection (e.g. based on an existing user token and
installation), provide both the authorizer secret token and the app
installation id:
$ gcloud builds connections create github myconn --project=myproj \
--region=us-central1 \
--authorizer-token-secret-version=projects/myproj/secrets/\
mytoken/versions/1 --app-installation-id=1234
Above command creates the connection in installation state COMPLETE, ready
for adding repositories.
POSITIONAL ARGUMENTS
Connection resource - Connection to create. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
Group of arguments for configuring a complete connnection.
--authorizer-token-secret-version=AUTHORIZER_TOKEN_SECRET_VERSION
Secret containing the authorizer user's token.
This flag argument must be specified if any of the other arguments in
this group are specified.
--app-installation-id=APP_INSTALLATION_ID
Installation ID of the Cloud Build GitHub App.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections create github
$ gcloud beta builds connections create github

View file

@ -0,0 +1,173 @@
NAME
gcloud builds connections create github-enterprise - create a Cloud Build
Connection of type GitHub Enterprise
SYNOPSIS
gcloud builds connections create github-enterprise
(CONNECTION : --region=REGION) --host-uri=HOST_URI [--async]
[--app-id=APP_ID --app-slug=APP_SLUG
--private-key-secret-version=PRIVATE_KEY_SECRET_VERSION
--webhook-secret-secret-version=WEBHOOK_SECRET_SECRET_VERSION
: --app-installation-id=APP_INSTALLATION_ID]
[--service-directory-service=SERVICE_DIRECTORY_SERVICE
: --ssl-ca-file=SSL_CA_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create a Cloud Build Connection of type GitHub Enterprise.
Connections for GitHub Enterprise can be created either by following an
intallation process (that requires manual steps in a web browser) or by
providing all the properties of an already-installed application as
arguments to this command.
If the GitHub Enterprise server can only be accessed within a VPC, a
Service Directory service resource can be provided for connecting to it.
EXAMPLES
To create a connection by following the installation process, provide only
the connection name and the host URI. If the server can only be accessed
within a VPC, provide also the Service Directory service resource:
$ gcloud builds connections create github-enterprise my-ghe-conn \
--project=myproj --region=us-central1 \
--host-uri=https://my.ghe-server.net \
--service-directory-service=projects/myproj/namespaces/x/\
services/mysds
The command will print a URL to be opened in a web browser in order create
and install a GitHub App in that server. After following the URL, you can
get the connection's installation state with The describe command:
$ gcloud alpha builds connections describe my-ghe-conn \
--region=us-central1
If the connection's installation state is not COMPLETE yet, it will provide
a link to continue the installation process. Once the connection is in
installation state COMPLETE, repositories can be added to it (see gcloud
alpha builds repositories create).
--
To create a complete connection (e.g. based on an existing installation),
provide all the parameters:
$ gcloud builds connections create github-enterprise my-ghe-conn \
--project=myproj --region=us-central1 --app-id=111 \
--app-slug=gcb-app \
--service-directory-service=projects/myproj/namespaces/x/\
services/mysds \
--private-key-secret-version=projects/myproj/secrets/pk/\
versions/1 \
--webhook-secret-secret-version=projects/myproj/secrets/\
whsecret/versions/1 --app-slug=myapp --app-installation-id=1234
Above command creates the connection in installation state COMPLETE, ready
for adding repositories.
POSITIONAL ARGUMENTS
Connection resource - Connection to create. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
REQUIRED FLAGS
--host-uri=HOST_URI
URI of the GitHub Enterprise server.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
Group of arguments for the GitHub App properties.
--app-id=APP_ID
App ID of the GitHub App in the GitHub Enterprise server.
This flag argument must be specified if any of the other arguments in
this group are specified.
--app-slug=APP_SLUG
App slug (url-friendly name) of the GitHub App. When seeing the
configuration page of the App (e.g. in
https://my-ghe-server.net/settings/apps/my-app), the app-slug is the
last component of the URL path ("my-app" in that example).
This flag argument must be specified if any of the other arguments in
this group are specified.
--private-key-secret-version=PRIVATE_KEY_SECRET_VERSION
Secret containing the private key of the GitHub App.
This flag argument must be specified if any of the other arguments in
this group are specified.
--webhook-secret-secret-version=WEBHOOK_SECRET_SECRET_VERSION
Secret containing the webhook secret string for validating webhook
events generated by the GitHub App.
This flag argument must be specified if any of the other arguments in
this group are specified.
--app-installation-id=APP_INSTALLATION_ID
Installation ID of the Cloud Build GitHub App.
Group of arguments for configuring access through Service Directory.
--service-directory-service=SERVICE_DIRECTORY_SERVICE
Service Directory service resource to use for accessing the GitHub
Enterprise Server. Necessary only if the server has no public access
from the internet.
This flag argument must be specified if any of the other arguments in
this group are specified.
--ssl-ca-file=SSL_CA_FILE
File containing the SSL_CA to be used.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections create github-enterprise
$ gcloud beta builds connections create github-enterprise

View file

@ -0,0 +1,150 @@
NAME
gcloud builds connections create gitlab - create a Cloud Build Connection
for gitlab.com or GitLab Enterprise
SYNOPSIS
gcloud builds connections create gitlab (CONNECTION : --region=REGION)
--authorizer-token-secret-version=AUTHORIZER_TOKEN_SECRET_VERSION
--read-authorizer-token-secret-version=READ_AUTHORIZER_TOKEN_SECRET_VERSION
--webhook-secret-secret-version=WEBHOOK_SECRET_SECRET_VERSION [--async]
[--host-uri=HOST_URI]
[--service-directory-service=SERVICE_DIRECTORY_SERVICE
: --ssl-ca-file=SSL_CA_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create a Cloud Build Connection for gitlab.com or GitLab Enterprise.
A gitlab.com or GitLab Enterprise Connection can be created by using a
personal access token with api scope permission. A read_repository scoped
personal access token will also be required on gitlab.com or if the
self-hosted GitLab server doesn't support project access token (GitLab
Enterprise server version < 13.10).
If the GitLab Enterprise server can only be accessed within a VPC, a
Service Directory service resource can be provided for connecting to it.
EXAMPLES
To create a GitLab connection for gitlab.com, provide all the required
parameters:
$ gcloud builds connections create gitlab my-gitlab-conn \
--project=myproj --region=us-central1 \
--read-authorizer-token-secret-version=projects/myproj/secrets/\
read-pat/versions/1 \
--authorizer-token-secret-version=projects/myproj/secrets/\
api-pat/versions/1 \
--webhook-secret-secret-version=projects/myproj/secrets/\
whsecret/versions/1
To create a GitLab connection for a GitLab server, provide host-uri
parameter as well:
$ gcloud builds connections create gitlab my-gle-conn \
--host-uri=https://my.gle-server.net --project=myproj \
--region=us-central1 \
--authorizer-token-secret-version=projects/myproj/secrets/\
api-pat/versions/1 \
--read-authorizer-token-secret-version=projects/myproj/secrets/\
read-pat/versions/1 \
--webhook-secret-secret-version=projects/myproj/secrets/\
whsecret/versions/1
To create a GitLab connection for a private GitLab server. provide the
service-directory-service and ssl-ca-file as well:
$ gcloud builds connections create gitlab my-gle-conn \
--host-uri=https://my.private-gle-server.net --project=myproj \
--region=us-central1 \
--service-directory-service=projects/myproj/namespaces/x/\
services/mysds --ssl-ca-file=mycertificate.crt \
--authorizer-token-secret-version=projects/myproj/secrets/\
api-pat/versions/1 \
--read-authorizer-token-secret-version=projects/myproj/secrets/\
read-pat/versions/1 \
--webhook-secret-secret-version=projects/myproj/secrets/\
whsecret/versions/1
POSITIONAL ARGUMENTS
Connection resource - Connection to create. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
REQUIRED FLAGS
--authorizer-token-secret-version=AUTHORIZER_TOKEN_SECRET_VERSION
Secret containing the api personal access token.
--read-authorizer-token-secret-version=READ_AUTHORIZER_TOKEN_SECRET_VERSION
Secret containing the read_api personal access token.
--webhook-secret-secret-version=WEBHOOK_SECRET_SECRET_VERSION
Secret containing the webhook secret string for validating webhook
events sent by GitLab.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--host-uri=HOST_URI
URI of the GitLab instance.
Group of arguments for configuring access through Service Directory.
--service-directory-service=SERVICE_DIRECTORY_SERVICE
Service Directory service resource to use for accessing the
gitlab.com or GitLab Enterprise Server. Necessary only if the server
has no public access from the internet.
This flag argument must be specified if any of the other arguments in
this group are specified.
--ssl-ca-file=SSL_CA_FILE
File containing the SSL_CA to be used.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections create gitlab
$ gcloud beta builds connections create gitlab

View file

@ -0,0 +1,33 @@
NAME
gcloud builds connections create - create Connections in Google Cloud Build
SYNOPSIS
gcloud builds connections create COMMAND [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create Connections in Google Cloud Build.
GCLOUD WIDE FLAGS
These flags are available to all commands: --help.
Run $ gcloud help for details.
COMMANDS
COMMAND is one of the following:
github
Create a Cloud Build Connection of type GitHub.
github-enterprise
Create a Cloud Build Connection of type GitHub Enterprise.
gitlab
Create a Cloud Build Connection for gitlab.com or GitLab Enterprise.
NOTES
These variants are also available:
$ gcloud alpha builds connections create
$ gcloud beta builds connections create

View file

@ -0,0 +1,73 @@
NAME
gcloud builds connections delete - delete a Cloud Build Connection
SYNOPSIS
gcloud builds connections delete (CONNECTION : --region=REGION) [--async]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Delete a Cloud Build Connection.
EXAMPLES
To delete Cloud Build connection my-conn in region us-central1, run the
following command:
$ gcloud builds connections delete my-conn --region=us-central1
POSITIONAL ARGUMENTS
Connection resource - Cloud Build connection to delete. The arguments in
this group can be used to specify the attributes of this resource. (NOTE)
Some attributes are not given arguments in this group but can be set in
other ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections delete
$ gcloud beta builds connections delete

View file

@ -0,0 +1,68 @@
NAME
gcloud builds connections describe - describe a Cloud Build Connection
SYNOPSIS
gcloud builds connections describe (CONNECTION : --region=REGION)
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Describe a Cloud Build Connection.
EXAMPLES
To describe a Connection my-conn in region us-central1, run the following
command:
$ gcloud builds connections describe my-conn --region=us-central1
POSITIONAL ARGUMENTS
Connection resource - Cloud Build Connection to describe. The arguments in
this group can be used to specify the attributes of this resource. (NOTE)
Some attributes are not given arguments in this group but can be set in
other ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections describe
$ gcloud beta builds connections describe

View file

@ -0,0 +1,97 @@
NAME
gcloud builds connections get-iam-policy - get the IAM policy for a Cloud
Build connection
SYNOPSIS
gcloud builds connections get-iam-policy (CONNECTION : --region=REGION)
[--filter=EXPRESSION] [--limit=LIMIT] [--page-size=PAGE_SIZE]
[--sort-by=[FIELD,...]] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Get the IAM policy for a Cloud Build connection.
EXAMPLES
To print the IAM policy for a Connection named 'my-conn', run the following
command:
$ gcloud builds connections get-iam-policy my-conn \
--region=us-central1
POSITIONAL ARGUMENTS
Connection resource - Cloud Build Connection from which to get IAM policy.
The arguments in this group can be used to specify the attributes of this
resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
LIST COMMAND FLAGS
--filter=EXPRESSION
Apply a Boolean filter EXPRESSION to each resource item to be listed.
If the expression evaluates True, then that item is listed. For more
details and examples of filter expressions, run $ gcloud topic filters.
This flag interacts with other flags that are applied in this order:
--flatten, --sort-by, --filter, --limit.
--limit=LIMIT
Maximum number of resources to list. The default is unlimited. This
flag interacts with other flags that are applied in this order:
--flatten, --sort-by, --filter, --limit.
--page-size=PAGE_SIZE
Some services group resource list output into pages. This flag
specifies the maximum number of resources per page. The default is
determined by the service if it supports paging, otherwise it is
unlimited (no paging). Paging may be applied before or after --filter
and --limit depending on the service.
--sort-by=[FIELD,...]
Comma-separated list of resource field key names to sort by. The
default order is ascending. Prefix a field with ``~'' for descending
order on that field. This flag interacts with other flags that are
applied in this order: --flatten, --sort-by, --filter, --limit.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections get-iam-policy
$ gcloud beta builds connections get-iam-policy

View file

@ -0,0 +1,51 @@
NAME
gcloud builds connections - manage connections for Google Cloud Build
SYNOPSIS
gcloud builds connections GROUP | COMMAND [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Manage connections for Google Cloud Build.
GCLOUD WIDE FLAGS
These flags are available to all commands: --help.
Run $ gcloud help for details.
GROUPS
GROUP is one of the following:
create
Create Connections in Google Cloud Build.
update
Update Connections in Google Cloud Build.
COMMANDS
COMMAND is one of the following:
add-iam-policy-binding
Add IAM policy binding to a Cloud Build connection.
delete
Delete a Cloud Build Connection.
describe
Describe a Cloud Build Connection.
get-iam-policy
Get the IAM policy for a Cloud Build connection.
list
List all Cloud Build connections for a project and region.
set-iam-policy
Set the IAM policy for a Cloud Build connection.
NOTES
These variants are also available:
$ gcloud alpha builds connections
$ gcloud beta builds connections

View file

@ -0,0 +1,88 @@
NAME
gcloud builds connections list - list all Cloud Build connections for a
project and region
SYNOPSIS
gcloud builds connections list [--region=REGION] [--filter=EXPRESSION]
[--limit=LIMIT] [--page-size=PAGE_SIZE] [--sort-by=[FIELD,...]] [--uri]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
List all Cloud Build connections for a project and region.
EXAMPLES
To list all the Cloud Build connections in region us-central1, run the
following command:
$ gcloud builds connections list --region=us-central1
FLAGS
Region resource - Cloud Build location to list all contained connections.
This represents a Cloud resource. (NOTE) Some attributes are not given
arguments in this group but can be set in other ways.
To set the project attribute:
◆ provide the argument --region on the command line with a fully
specified name;
◆ set the property builds/region with a fully specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
--region=REGION
ID of the region or fully qualified identifier for the region.
To set the region attribute:
▸ provide the argument --region on the command line;
▸ set the property builds/region.
LIST COMMAND FLAGS
--filter=EXPRESSION
Apply a Boolean filter EXPRESSION to each resource item to be listed.
If the expression evaluates True, then that item is listed. For more
details and examples of filter expressions, run $ gcloud topic filters.
This flag interacts with other flags that are applied in this order:
--flatten, --sort-by, --filter, --limit.
--limit=LIMIT
Maximum number of resources to list. The default is unlimited. This
flag interacts with other flags that are applied in this order:
--flatten, --sort-by, --filter, --limit.
--page-size=PAGE_SIZE
Some services group resource list output into pages. This flag
specifies the maximum number of resources per page. The default is
determined by the service if it supports paging, otherwise it is
unlimited (no paging). Paging may be applied before or after --filter
and --limit depending on the service.
--sort-by=[FIELD,...]
Comma-separated list of resource field key names to sort by. The
default order is ascending. Prefix a field with ``~'' for descending
order on that field. This flag interacts with other flags that are
applied in this order: --flatten, --sort-by, --filter, --limit.
--uri
Print a list of resource URIs instead of the default output, and change
the command output to a list of URIs. If this flag is used with
--format, the formatting is applied on this URI list. To display URIs
alongside other keys instead, use the uri() transform.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections list
$ gcloud beta builds connections list

View file

@ -0,0 +1,81 @@
NAME
gcloud builds connections set-iam-policy - set the IAM policy for a Cloud
Build connection
SYNOPSIS
gcloud builds connections set-iam-policy (CONNECTION : --region=REGION)
POLICY_FILE [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Set the IAM policy for a Cloud Build connection as defined in a JSON or
YAML file.
See https://cloud.google.com/iam/docs/managing-policies for details of the
policy file format and contents.
EXAMPLES
The following command will read an IAM policy defined in a JSON file
'policy.json' and set it for the Connection named 'my-conn':
$ gcloud builds connections set-iam-policy my-conn policy.json \
--region=us-central1
POSITIONAL ARGUMENTS
Connection resource - Cloud Build Connection for which to set IAM policy.
The arguments in this group can be used to specify the attributes of this
resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
POLICY_FILE
Path to a local JSON or YAML formatted file containing a valid policy.
The output of the get-iam-policy command is a valid file, as is any
JSON or YAML file conforming to the structure of a Policy
(https://cloud.google.com/iam/reference/rest/v1/Policy).
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections set-iam-policy
$ gcloud beta builds connections set-iam-policy

View file

@ -0,0 +1,91 @@
NAME
gcloud builds connections update github - update a Cloud Build Connection
of type GitHub
SYNOPSIS
gcloud builds connections update github (CONNECTION : --region=REGION)
[--app-installation-id=APP_INSTALLATION_ID] [--async]
[--authorizer-token-secret-version=AUTHORIZER_TOKEN_SECRET_VERSION]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Update a Cloud Build Connection of type GitHub (for github.com).
EXAMPLES
To update the authorizer token, provide the connection name and the
authorizer token secret:
$ gcloud builds connections update github myconn \
--region=us-central1 \
--authorizer-token-secret-version=projects/myproj/secrets/\
mytoken/versions/1
To update the installation id, provide the connection name and the
installation id of the Cloud Build GitHub app.
$ gcloud builds connections update github myconn \
--region=us-central1 --app-installation-id=1234
POSITIONAL ARGUMENTS
Connection resource - Connection to update. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
FLAGS
--app-installation-id=APP_INSTALLATION_ID
Installation ID of the Cloud Build GitHub App.
--async
Return immediately, without waiting for the operation in progress to
complete.
--authorizer-token-secret-version=AUTHORIZER_TOKEN_SECRET_VERSION
Secret containing the authorizer user's token.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections update github
$ gcloud beta builds connections update github

View file

@ -0,0 +1,117 @@
NAME
gcloud builds connections update github-enterprise - update a Cloud Build
Connection of type GitHub Enterprise
SYNOPSIS
gcloud builds connections update github-enterprise
(CONNECTION : --region=REGION) [--app-id=APP_ID]
[--app-installation-id=APP_INSTALLATION_ID] [--app-slug=APP_SLUG]
[--async] [--host-uri=HOST_URI]
[--private-key-secret-version=PRIVATE_KEY_SECRET_VERSION]
[--service-directory-service=SERVICE_DIRECTORY_SERVICE]
[--ssl-ca-file=SSL_CA_FILE]
[--webhook-secret-secret-version=WEBHOOK_SECRET_SECRET_VERSION]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Update a Cloud Build Connection of type GitHub Enterprise.
EXAMPLES
To update the ssl_ca, provide the connection name and the ssl_ca file:
$ gcloud builds connections update github-enterprise my-ghe-conn \
--region=us-west1 --ssl-ca-file=mycertificate.crt
To update the installation id, provide the connection name and the
installation id of the Cloud Build GitHub app.
$ gcloud builds connections update github-enterprise my-ghe-conn \
--region=us-west1 --app-installation-id=1234
POSITIONAL ARGUMENTS
Connection resource - Connection to update. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
FLAGS
--app-id=APP_ID
App ID of the GitHub App in the GitHub Enterprise server.
--app-installation-id=APP_INSTALLATION_ID
Installation ID of the Cloud Build GitHub App.
--app-slug=APP_SLUG
App slug (url-friendly name) of the GitHub App. When seeing the
configuration page of the App (e.g. in
https://my-ghe-server.net/settings/apps/my-app), the app-slug is the
last component of the URL path ("my-app" in that example).
--async
Return immediately, without waiting for the operation in progress to
complete.
--host-uri=HOST_URI
URI of the GitHub Enterprise server.
--private-key-secret-version=PRIVATE_KEY_SECRET_VERSION
Secret containing the private key of the GitHub App.
--service-directory-service=SERVICE_DIRECTORY_SERVICE
Service Directory service resource to use for accessing the GitHub
Enterprise Server. Necessary only if the server has no public access
from the internet.
--ssl-ca-file=SSL_CA_FILE
File containing the SSL_CA to be used.
--webhook-secret-secret-version=WEBHOOK_SECRET_SECRET_VERSION
Secret containing the webhook secret string for validating webhook
events generated by the GitHub App.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections update github-enterprise
$ gcloud beta builds connections update github-enterprise

View file

@ -0,0 +1,105 @@
NAME
gcloud builds connections update gitlab - update a Cloud Build Connection
of type gitlab.com or GitLab Enterprise
SYNOPSIS
gcloud builds connections update gitlab (CONNECTION : --region=REGION)
[--async]
[--authorizer-token-secret-version=AUTHORIZER_TOKEN_SECRET_VERSION]
[--host-uri=HOST_URI]
[--read-authorizer-token-secret-version=READ_AUTHORIZER_TOKEN_SECRET_VERSION]
[--service-directory-service=SERVICE_DIRECTORY_SERVICE]
[--ssl-ca-file=SSL_CA_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Update a Cloud Build Connection of type gitlab.com or GitLab Enterprise.
EXAMPLES
To update the ssl_ca, provide the connection name and the ssl_ca file:
$ gcloud builds connections update gitlab my-gle-conn \
--region=us-west1 --ssl-ca-file=mycertificate.crt
To update the authorization token, provide the connection name and the new
authorization token secret version.
$ gcloud builds connections update gitlab my-gle-conn \
--region=us-west1 \
--authorizer-token-secret-version=projects/myproj/secrets/\
api-pat/versions/1
POSITIONAL ARGUMENTS
Connection resource - Connection to update. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument connection on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument connection on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--authorizer-token-secret-version=AUTHORIZER_TOKEN_SECRET_VERSION
Secret containing the api personal access token.
--host-uri=HOST_URI
URI of the GitLab instance.
--read-authorizer-token-secret-version=READ_AUTHORIZER_TOKEN_SECRET_VERSION
Secret containing the read_repository personal access token. Required
for GitLab Enterprise versions older than 13.10.
--service-directory-service=SERVICE_DIRECTORY_SERVICE
Service Directory service resource to use for accessing the GitLab
Enterprise Server. Necessary only if the server has no public access
from the internet.
--ssl-ca-file=SSL_CA_FILE
File containing the SSL_CA to be used.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds connections update gitlab
$ gcloud beta builds connections update gitlab

View file

@ -0,0 +1,34 @@
NAME
gcloud builds connections update - update Connections in Google Cloud Build
SYNOPSIS
gcloud builds connections update COMMAND [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Update Connections in Google Cloud Build.
GCLOUD WIDE FLAGS
These flags are available to all commands: --help.
Run $ gcloud help for details.
COMMANDS
COMMAND is one of the following:
github
Update a Cloud Build Connection of type GitHub.
github-enterprise
Update a Cloud Build Connection of type GitHub Enterprise.
gitlab
Update a Cloud Build Connection of type gitlab.com or GitLab
Enterprise.
NOTES
These variants are also available:
$ gcloud alpha builds connections update
$ gcloud beta builds connections update

View file

@ -15,6 +15,12 @@ GCLOUD WIDE FLAGS
GROUPS
GROUP is one of the following:
connections
Manage connections for Google Cloud Build.
repositories
Manage repositories for Google Cloud Build.
triggers
Create and manage build triggers for Google Cloud Build.

View file

@ -0,0 +1,88 @@
NAME
gcloud builds repositories create - create a Cloud Build repository
SYNOPSIS
gcloud builds repositories create
(REPOSITORY : --connection=CONNECTION --region=REGION)
--remote-uri=REMOTE_URI [--async] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create a Cloud Build repository in a connection.
EXAMPLES
To Create a repository with name my-repo in the connection my-conn, run the
following command:
$ gcloud builds repositories create my-repo \
--remote-uri=https://github.com/octocat/Hello-World.git \
--connection=my-conn --region=us-central1
POSITIONAL ARGUMENTS
Repository resource - Repository to create. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument repository on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
REPOSITORY
ID of the repository or fully qualified identifier for the
repository.
To set the repository attribute:
▸ provide the argument repository on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--connection=CONNECTION
Connection ID.
To set the connection attribute:
▸ provide the argument repository on the command line with a fully
specified name;
▸ provide the argument --connection on the command line.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument repository on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
REQUIRED FLAGS
--remote-uri=REMOTE_URI
The remote git clone URL of the repository.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds repositories create
$ gcloud beta builds repositories create

View file

@ -0,0 +1,83 @@
NAME
gcloud builds repositories delete - delete a Cloud Build Repository
SYNOPSIS
gcloud builds repositories delete
(REPOSITORY : --connection=CONNECTION --region=REGION) [--async]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Delete a Cloud Build Repository in a Connection.
EXAMPLES
To delete Cloud Build repository my-repo in connection my-conn, run the
following command:
$ gcloud builds repositories delete my-repo --connection=my-conn \
--region=us-central1
POSITIONAL ARGUMENTS
Repository resource - Cloud Build repository to delete. The arguments in
this group can be used to specify the attributes of this resource. (NOTE)
Some attributes are not given arguments in this group but can be set in
other ways.
To set the project attribute:
◆ provide the argument repository on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
REPOSITORY
ID of the repository or fully qualified identifier for the
repository.
To set the repository attribute:
▸ provide the argument repository on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--connection=CONNECTION
Connection ID.
To set the connection attribute:
▸ provide the argument repository on the command line with a fully
specified name;
▸ provide the argument --connection on the command line.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument repository on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds repositories delete
$ gcloud beta builds repositories delete

View file

@ -0,0 +1,77 @@
NAME
gcloud builds repositories describe - describe a Cloud Build Repository
SYNOPSIS
gcloud builds repositories describe
(REPOSITORY : --connection=CONNECTION --region=REGION)
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Describe a Cloud Build Repository.
EXAMPLES
To list all the Cloud Build connections in region us-central1, run the
following command:
$ gcloud builds repositories describe --region=us-central1
POSITIONAL ARGUMENTS
Repository resource - Cloud Build Repository to describe. The arguments in
this group can be used to specify the attributes of this resource. (NOTE)
Some attributes are not given arguments in this group but can be set in
other ways.
To set the project attribute:
◆ provide the argument repository on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
REPOSITORY
ID of the repository or fully qualified identifier for the
repository.
To set the repository attribute:
▸ provide the argument repository on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--connection=CONNECTION
Connection ID.
To set the connection attribute:
▸ provide the argument repository on the command line with a fully
specified name;
▸ provide the argument --connection on the command line.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument repository on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds repositories describe
$ gcloud beta builds repositories describe

View file

@ -0,0 +1,36 @@
NAME
gcloud builds repositories - manage repositories for Google Cloud Build
SYNOPSIS
gcloud builds repositories COMMAND [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Manage repositories for Google Cloud Build.
GCLOUD WIDE FLAGS
These flags are available to all commands: --help.
Run $ gcloud help for details.
COMMANDS
COMMAND is one of the following:
create
Create a Cloud Build repository.
delete
Delete a Cloud Build Repository.
describe
Describe a Cloud Build Repository.
list
List all Cloud Build repositories in a connection.
NOTES
These variants are also available:
$ gcloud alpha builds repositories
$ gcloud beta builds repositories

View file

@ -0,0 +1,103 @@
NAME
gcloud builds repositories list - list all Cloud Build repositories in a
connection
SYNOPSIS
gcloud builds repositories list (--connection=CONNECTION : --region=REGION)
[--filter=EXPRESSION] [--limit=LIMIT] [--page-size=PAGE_SIZE]
[--sort-by=[FIELD,...]] [--uri] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
List all Cloud Build repositories in a connection.
EXAMPLES
To list all the repositories in the Cloud Build connection my-conn, run the
following command:
$ gcloud builds repositories list --connection=my-conn \
--region=us-central1
REQUIRED FLAGS
Connection resource - Cloud Build connection to list all contained
repositories. The arguments in this group can be used to specify the
attributes of this resource. (NOTE) Some attributes are not given
arguments in this group but can be set in other ways.
To set the project attribute:
◆ provide the argument --connection on the command line with a fully
specified name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
--connection=CONNECTION
ID of the connection or fully qualified identifier for the
connection.
To set the connection attribute:
▸ provide the argument --connection on the command line.
This flag argument must be specified if any of the other arguments in
this group are specified.
--region=REGION
The Google Cloud region.
To set the region attribute:
▸ provide the argument --connection on the command line with a
fully specified name;
▸ provide the argument --region on the command line;
▸ set the property builds/region.
LIST COMMAND FLAGS
--filter=EXPRESSION
Apply a Boolean filter EXPRESSION to each resource item to be listed.
If the expression evaluates True, then that item is listed. For more
details and examples of filter expressions, run $ gcloud topic filters.
This flag interacts with other flags that are applied in this order:
--flatten, --sort-by, --filter, --limit.
--limit=LIMIT
Maximum number of resources to list. The default is unlimited. This
flag interacts with other flags that are applied in this order:
--flatten, --sort-by, --filter, --limit.
--page-size=PAGE_SIZE
Some services group resource list output into pages. This flag
specifies the maximum number of resources per page. The default is
determined by the service if it supports paging, otherwise it is
unlimited (no paging). Paging may be applied before or after --filter
and --limit depending on the service.
--sort-by=[FIELD,...]
Comma-separated list of resource field key names to sort by. The
default order is ascending. Prefix a field with ``~'' for descending
order on that field. This flag interacts with other flags that are
applied in this order: --flatten, --sort-by, --filter, --limit.
--uri
Print a list of resource URIs instead of the default output, and change
the command output to a list of URIs. If this flag is used with
--format, the formatting is applied on this URI list. To display URIs
alongside other keys instead, use the uri() transform.
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.
API REFERENCE
This command uses the cloudbuild/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/cloud-build/docs/
NOTES
These variants are also available:
$ gcloud alpha builds repositories list
$ gcloud beta builds repositories list

View file

@ -118,7 +118,7 @@ FLAGS
--machine-type=MACHINE_TYPE
Machine type used to run the build. MACHINE_TYPE must be one of:
e2-highcpu-32, e2-highcpu-8, n1-highcpu-32, n1-highcpu-8.
e2-highcpu-32, e2-highcpu-8, e2-medium, n1-highcpu-32, n1-highcpu-8.
--region=REGION
The region of the Cloud Build Service to use. Must be set to a

View file

@ -105,24 +105,23 @@ REQUIRED FLAGS
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}.
--substitutions=[KEY=VALUE,...]
Parameters to be substituted in the build specification.
Parameters to be substituted in the build specification. For
example:
For example (using some nonsensical substitution keys; all keys
must begin with an underscore):
$ gcloud builds triggers create ... --config config.yaml
$ gcloud builds triggers create bitbucketserver ... \
--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", and
similarly for ${_NUM_CANDIES} and "10".
Only the following built-in variables can be specified with the
--substitutions flag: REPO_NAME, BRANCH_NAME, TAG_NAME,
REVISION_ID, COMMIT_SHA, SHORT_SHA.
Substitutions can be applied to user-defined variables (starting
with an underscore) 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/cloud-build/docs/api/build-requests#substitutions
https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
Exactly one of these must be specified:

View file

@ -87,24 +87,23 @@ REQUIRED FLAGS
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}.
--substitutions=[KEY=VALUE,...]
Parameters to be substituted in the build specification.
Parameters to be substituted in the build specification. For
example:
For example (using some nonsensical substitution keys; all keys
must begin with an underscore):
$ gcloud builds triggers create ... --config config.yaml
$ gcloud builds triggers create cloud-source-repositories ... \
--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", and
similarly for ${_NUM_CANDIES} and "10".
Only the following built-in variables can be specified with the
--substitutions flag: REPO_NAME, BRANCH_NAME, TAG_NAME,
REVISION_ID, COMMIT_SHA, SHORT_SHA.
Substitutions can be applied to user-defined variables (starting
with an underscore) 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/cloud-build/docs/api/build-requests#substitutions
https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
Exactly one of these must be specified:

View file

@ -96,24 +96,23 @@ REQUIRED FLAGS
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}.
--substitutions=[KEY=VALUE,...]
Parameters to be substituted in the build specification.
Parameters to be substituted in the build specification. For
example:
For example (using some nonsensical substitution keys; all keys
must begin with an underscore):
$ gcloud builds triggers create ... --config config.yaml
$ gcloud builds triggers create github ... \
--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", and
similarly for ${_NUM_CANDIES} and "10".
Only the following built-in variables can be specified with the
--substitutions flag: REPO_NAME, BRANCH_NAME, TAG_NAME,
REVISION_ID, COMMIT_SHA, SHORT_SHA.
Substitutions can be applied to user-defined variables (starting
with an underscore) 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/cloud-build/docs/api/build-requests#substitutions
https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
Exactly one of these must be specified:

View file

@ -0,0 +1,206 @@
NAME
gcloud builds triggers create gitlab - create a build trigger for a 2nd-gen
GitLab repository
SYNOPSIS
gcloud builds triggers create gitlab
(--trigger-config=PATH | [(--branch-pattern=REGEX | --tag-pattern=REGEX
| [--pull-request-pattern=REGEX : --comment-control=COMMENT_CONTROL;
default=CommentControlValueValuesEnum(COMMENTS_ENABLED,
1)]) (--build-config=PATH | --inline-config=PATH
| [--dockerfile=DOCKERFILE --dockerfile-image=DOCKERFILE_IMAGE
: --dockerfile-dir=DOCKERFILE_DIR; default="/"])
: --description=DESCRIPTION --ignored-files=[GLOB,...]
--included-files=[GLOB,...] --name=NAME --region=REGION
--repository=REPOSITORY --[no-]require-approval
--service-account=SERVICE_ACCOUNT --substitutions=[KEY=VALUE,...]])
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create a build trigger for a 2nd-gen GitLab repository.
EXAMPLES
To create a push trigger with a 2nd-gen repository for all branches:
$ gcloud builds triggers create gitlab --name="my-trigger" \
--service-account="projects/my-project/serviceAccounts/my-byosa@\
my-project.iam.gserviceaccount.com" \
--repository="projects/1234/locations/global/connections/myconn/\
repositories/myrepo" --branch-pattern=".*" \
--build-config="cloudbuild.yaml"
To create a pull request trigger with a 1st-gen repository for main:
$ gcloud builds triggers create gitlab --name="my-trigger" \
--service-account="projects/my-project/serviceAccounts/my-byosa@\
my-project.iam.gserviceaccount.com" \
--repository="projects/1234/locations/global/connections/myconn/\
repositories/myrepo" --build-config="cloudbuild.yaml"
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, see
https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.triggers#BuildTrigger
Flag based trigger configuration
--description=DESCRIPTION
Build trigger description.
--ignored-files=[GLOB,...]
Glob filter. Changes only affecting ignored files won't trigger
builds.
--included-files=[GLOB,...]
Glob filter. Changes affecting at least one included file will
trigger builds.
--name=NAME
Build trigger name.
--region=REGION
The region of the Cloud Build Service to use. Must be set to a
supported region name (e.g. us-central1). If unset, builds/region,
which is the default region to use when working with Cloud Build
resources, is used. If builds/region is unset, region is set to
global.
--repository=REPOSITORY
Repository resource (2nd gen) to use, in the format
"projects/*/locations/*/connections/*/repositories/".
--[no-]require-approval
Require manual approval for triggered builds. Use
--require-approval to enable and --no-require-approval to disable.
--service-account=SERVICE_ACCOUNT
The service account used for all user-controlled operations
including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and
CancelBuild. If no service account 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:
$ gcloud builds triggers create gitlab ... \
--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", and
similarly for ${_NUM_CANDIES} and "10".
Substitutions can be applied to user-defined variables (starting
with an underscore) 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:
--branch-pattern=REGEX
A regular expression specifying which git branches to match.
This pattern is used as a regular expression search for any
incoming pushes. For example, --branch-pattern=foo will match
"foo", "foobar", and "barfoo". Events on a branch that does not
match will be ignored.
The syntax of the regular expressions accepted is the syntax
accepted by RE2 and described at
https://github.com/google/re2/wiki/Syntax.
--tag-pattern=REGEX
A regular expression specifying which git tags to match.
This pattern is used as a regular expression search for any
incoming pushes. For example, --tag-pattern=foo will match "foo",
"foobar", and "barfoo". Events on a tag that does not match will
be ignored.
The syntax of the regular expressions accepted is the syntax
accepted by RE2 and described at
https://github.com/google/re2/wiki/Syntax.
Pull Request settings
--pull-request-pattern=REGEX
Regular expression specifying which base git branch to match
for pull request events.
This pattern is used as a regex search for the base branch (the
branch you are trying to merge into) for pull request updates.
For example, --pull-request-pattern=foo will match "foo",
"foobar", and "barfoo".
The syntax of the regular expressions accepted is the syntax
accepted by RE2 and described at
https://github.com/google/re2/wiki/Syntax.
This flag argument must be specified if any of the other
arguments in this group are specified.
--comment-control=COMMENT_CONTROL; default=CommentControlValueValuesEnum(COMMENTS_ENABLED, 1)
Require a repository collaborator or owner to comment '/gcbrun'
on a pull request before running the build.
Exactly one of these must be specified:
--build-config=PATH
Path to a YAML or JSON file containing the build configuration in
the repository.
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 the specified file.
The filename is relative to the Dockerfile directory.
This flag argument must be specified if any of the other
arguments in this group are specified.
--dockerfile-image=DOCKERFILE_IMAGE
Docker image name to build.
This flag argument must be specified if any of the other
arguments in this group are 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.
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
These variants are also available:
$ gcloud alpha builds triggers create gitlab
$ gcloud beta builds triggers create gitlab

View file

@ -86,24 +86,23 @@ REQUIRED FLAGS
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}.
--substitutions=[KEY=VALUE,...]
Parameters to be substituted in the build specification.
Parameters to be substituted in the build specification. For
example:
For example (using some nonsensical substitution keys; all keys
must begin with an underscore):
$ gcloud builds triggers create ... --config config.yaml
$ gcloud builds triggers create gitlab-enterprise ... \
--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", and
similarly for ${_NUM_CANDIES} and "10".
Only the following built-in variables can be specified with the
--substitutions flag: REPO_NAME, BRANCH_NAME, TAG_NAME,
REVISION_ID, COMMIT_SHA, SHORT_SHA.
Substitutions can be applied to user-defined variables (starting
with an underscore) 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/cloud-build/docs/api/build-requests#substitutions
https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
Exactly one of these must be specified:

View file

@ -25,6 +25,9 @@ COMMANDS
github
Create a build trigger for a GitHub repository.
gitlab
Create a build trigger for a 2nd-gen GitLab repository.
gitlab-enterprise
Create a build trigger for a GitLab Enterprise repository.

View file

@ -71,24 +71,23 @@ REQUIRED FLAGS
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}.
--substitutions=[KEY=VALUE,...]
Parameters to be substituted in the build specification.
Parameters to be substituted in the build specification. For
example:
For example (using some nonsensical substitution keys; all keys
must begin with an underscore):
$ gcloud builds triggers create ... --config config.yaml
$ gcloud builds triggers create manual ... \
--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", and
similarly for ${_NUM_CANDIES} and "10".
Only the following built-in variables can be specified with the
--substitutions flag: REPO_NAME, BRANCH_NAME, TAG_NAME,
REVISION_ID, COMMIT_SHA, SHORT_SHA.
Substitutions can be applied to user-defined variables (starting
with an underscore) 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/cloud-build/docs/api/build-requests#substitutions
https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
Exactly one of these must be specified:

View file

@ -87,24 +87,23 @@ REQUIRED FLAGS
for more details.
--substitutions=[KEY=VALUE,...]
Parameters to be substituted in the build specification.
Parameters to be substituted in the build specification. For
example:
For example (using some nonsensical substitution keys; all keys
must begin with an underscore):
$ gcloud builds triggers create ... --config config.yaml
$ gcloud builds triggers create pubsub ... \
--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", and
similarly for ${_NUM_CANDIES} and "10".
Only the following built-in variables can be specified with the
--substitutions flag: REPO_NAME, BRANCH_NAME, TAG_NAME,
REVISION_ID, COMMIT_SHA, SHORT_SHA.
Substitutions can be applied to user-defined variables (starting
with an underscore) 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/cloud-build/docs/api/build-requests#substitutions
https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
Exactly one of these must be specified:

View file

@ -93,24 +93,23 @@ REQUIRED FLAGS
for more details.
--substitutions=[KEY=VALUE,...]
Parameters to be substituted in the build specification.
Parameters to be substituted in the build specification. For
example:
For example (using some nonsensical substitution keys; all keys
must begin with an underscore):
$ gcloud builds triggers create ... --config config.yaml
$ gcloud builds triggers create webhook ... \
--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", and
similarly for ${_NUM_CANDIES} and "10".
Only the following built-in variables can be specified with the
--substitutions flag: REPO_NAME, BRANCH_NAME, TAG_NAME,
REVISION_ID, COMMIT_SHA, SHORT_SHA.
Substitutions can be applied to user-defined variables (starting
with an underscore) 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/cloud-build/docs/api/build-requests#substitutions
https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
Exactly one of these must be specified:

View file

@ -47,24 +47,21 @@ POSITIONAL ARGUMENTS
FLAGS
--substitutions=[KEY=VALUE,...]
Parameters to be substituted in the build specification.
Parameters to be substituted in the build specification. For example:
For example (using some nonsensical substitution keys; all keys must
begin with an underscore):
$ gcloud builds triggers create ... --config config.yaml
$ gcloud builds triggers run ... \
--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", and
similarly for ${_NUM_CANDIES} and "10".
Only the following built-in variables can be specified with the
--substitutions flag: REPO_NAME, BRANCH_NAME, TAG_NAME, REVISION_ID,
COMMIT_SHA, SHORT_SHA.
Substitutions can be applied to user-defined variables (starting with
an underscore) 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/cloud-build/docs/api/build-requests#substitutions
https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
At most one of these can be specified: