gcloud beta deploy releases create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta deploy releases create - creates a new release, delivery pipeline qualified
- SYNOPSIS
gcloud beta deploy releases create(RELEASE:--delivery-pipeline=DELIVERY_PIPELINE--region=REGION)[--annotations=[KEY=VALUE,…]][--deploy-parameters=[KEY=VALUE,…]][--description=DESCRIPTION][--docker-version=DOCKER_VERSION][--gcs-source-staging-dir=GCS_SOURCE_STAGING_DIR][--helm-version=HELM_VERSION][--ignore-file=IGNORE_FILE][--kpt-version=KPT_VERSION][--kubectl-version=KUBECTL_VERSION][--kustomize-version=KUSTOMIZE_VERSION][--labels=[KEY=VALUE,…]][--override-deploy-policies=[POLICY,…]][--skaffold-version=SKAFFOLD_VERSION][--to-target=TO_TARGET][--build-artifacts=BUILD_ARTIFACTS|--images=[NAME=TAG,…]][--disable-initial-rollout|--enable-initial-rollout--initial-rollout-annotations=[KEY=VALUE,…]--initial-rollout-labels=[KEY=VALUE,…]--initial-rollout-phase-id=INITIAL_ROLLOUT_PHASE_ID][--from-k8s-manifest=FROM_K8S_MANIFEST|--from-run-manifest=FROM_RUN_MANIFEST|--skaffold-file=SKAFFOLD_FILE--source=SOURCE; default="."][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)Creates a new release, delivery pipeline qualified.- EXAMPLES
- To create a release with source located at storage URL
gs://bucket/object.zipand the first rollout in the first target ofthe promotion sequence:gcloudbetadeployreleasescreatemy-release--source=`gs://bucket/object.zip`--delivery-pipeline=my-pipeline--region=us-central1To create a release with source located at current directory and deploy arollout to target prod :
gcloudbetadeployreleasescreatemy-release--delivery-pipeline=my-pipeline--region=us-central1--to-target=prodThe following command creates a release without a
skaffold.yamlasinput, and generates one for you:gcloudbetadeployreleasescreatemy-release--delivery-pipeline=my-pipeline--region=us-central1--from-k8s-manifest=path/to/kubernetes/k8.yamlThe current UTC date and time on the machine running the gcloud command can alsobe included in the release name by adding $DATE and $TIME parameters:
gcloudbetadeployreleasescreate'my-release-$DATE-$TIME'--delivery-pipeline=my-pipeline--region=us-central1If the current UTC date and time is set to 2021-12-21 12:02, then the createdrelease will have its name set as my-release-20211221-1202.
When using these parameters, please be sure to wrap the release name in singlequotes or else the template parameters will be overridden by environmentvariables.
- POSITIONAL ARGUMENTS
- Release resource - The name of the Release. The arguments in this group can beused to specify the attributes of this resource. (NOTE) Some attributes are notgiven arguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
releaseon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
RELEASE- ID of the release or fully qualified identifier for the release.
To set the
releaseattribute:- provide the argument
releaseon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--delivery-pipeline=DELIVERY_PIPELINE- The delivery pipeline associated with the release. Alternatively, set theproperty [deploy/delivery-pipeline].
To set the
delivery-pipelineattribute:- provide the argument
releaseon the command line with a fullyspecified name; - provide the argument
--delivery-pipelineon the command line; - set the property
deploy/delivery_pipeline.
- provide the argument
--region=REGION- The Cloud region for the release. Alternatively, set the property[deploy/region].
To set the
regionattribute:- provide the argument
releaseon the command line with a fullyspecified name; - provide the argument
--regionon the command line; - set the property
deploy/region.
- provide the argument
- provide the argument
- Release resource - The name of the Release. The arguments in this group can beused to specify the attributes of this resource. (NOTE) Some attributes are notgiven arguments in this group but can be set in other ways.
- FLAGS
--annotations=[KEY=VALUE,…]- Annotations to apply to the release. Annotations take the form of key/valuestring pairs.
Examples:
Add annotations:
gcloudbetadeployreleasescreate--annotations="from_target=test,status=stable" --deploy-parameters=[KEY=VALUE,…]- Deployment parameters to apply to the release. Deployment parameters take theform of key/value string pairs.
Examples:
Add deployment parameters:
gcloudbetadeployreleasescreate--deploy-parameters="key1=value1,key2=value2" --description=DESCRIPTION- Description of the release.
--docker-version=DOCKER_VERSION- Version of the Docker binary.
--gcs-source-staging-dir=GCS_SOURCE_STAGING_DIR- A directory in Google Cloud Storage to copy the source used for staging thebuild. If the specified bucket does not exist, Cloud Deploy will create one. Ifyou don't set this field,
gs://[DELIVERY_PIPELINE_ID]_clouddeploy/sourceis used. --helm-version=HELM_VERSION- Version of the Helm binary.
--ignore-file=IGNORE_FILE- Override the
.gcloudignorefile and use the specified file instead. --kpt-version=KPT_VERSION- Version of the Kpt binary.
--kubectl-version=KUBECTL_VERSION- Version of the Kubectl binary.
--kustomize-version=KUSTOMIZE_VERSION- Version of the Kustomize binary.
--labels=[KEY=VALUE,…]- Labels to apply to the release. Labels take the form of key/value string pairs.
Examples:
Add labels:
gcloudbetadeployreleasescreate--labels="commit=abc123,author=foo" --override-deploy-policies=[POLICY,…]- Deploy policies to override
--skaffold-version=SKAFFOLD_VERSION- Version of the Skaffold binary.
--to-target=TO_TARGET- Specifies a target to deliver into upon release creation
- At most one of these can be specified:
--build-artifacts=BUILD_ARTIFACTS- Reference to a Skaffold build artifacts output file from skaffold build--file-output=BUILD_ARTIFACTS. If you aren't using Skaffold, use the --imagesflag below to specify the image-names-to-tagged-image references.
--images=[NAME=TAG,…]- Reference to a collection of individual image name to image full pathreplacements.
For example:
gclouddeployreleasescreatefoo--imagesimage1=path/to/image1:v1@sha256:45db24
- At most one of these can be specified:
--disable-initial-rollout- Skips creating a rollout in the first target defined in the delivery pipeline.
--enable-initial-rollout- Creates a rollout in the first target defined in the delivery pipeline. This isthe default behavior.
--initial-rollout-annotations=[KEY=VALUE,…]- Annotations to apply to the initial rollout when creating the release.Annotations take the form of key/value string pairs.
Examples:
Add annotations:
gcloudbetadeployreleasescreate--initial-rollout-annotations="from_target=test,status=stable" --initial-rollout-labels=[KEY=VALUE,…]- Labels to apply to the initial rollout when creating the release. Labels takethe form of key/value string pairs.
Examples:
Add labels:
gcloudbetadeployreleasescreateinitial-rollout-labels="commit=abc123,author=foo" --initial-rollout-phase-id=INITIAL_ROLLOUT_PHASE_ID- The phase to start the initial rollout at when creating the release. The phaseID must be a valid phase on the rollout. If not specified, then the rollout willstart at the first phase.
Examples:
Start rollout at
stablephase:gcloudbetadeployreleasescreate--initial-rollout-phase-id=stable
- At most one of these can be specified:
--from-k8s-manifest=FROM_K8S_MANIFEST- The path to a Kubernetes manifest, which Cloud Deploy will use to generate askaffold.yaml file for you (for example, foo/bar/k8.yaml). The generatedSkaffold file will be available in the Google Cloud Storage source stagingdirectory (see --gcs-source-staging-dir flag) after the release is complete.
--from-run-manifest=FROM_RUN_MANIFEST- The path to a Cloud Run manifest, which Cloud Deploy will use to generate askaffold.yaml file for you (for example, foo/bar/service.yaml). The generatedSkaffold file will be available in the Google Cloud Storage source stagingdirectory (see --gcs-source-staging-dir flag) after the release is complete.
--skaffold-file=SKAFFOLD_FILE- Path of the skaffold file absolute or relative to the source directory.
Examples:
Use Skaffold file with relative path: The current working directory is expectedto be some part of the skaffold path (e.g. the current working directory couldbe /home/user)
gcloudbetadeployreleasescreate--source=/home/user/source--skaffold-file=config/skaffold.yamlThe skaffold file absolute file path is expected to be:/home/user/source/config/skaffold.yamlUse Skaffold file with absolute path and with or without source argument:
gcloudbetadeployreleasescreate--source=/home/user/source--skaffold-file=/home/user/source/config/skaffold.yamlgcloudbetadeployreleasescreate--skaffold-file=/home/user/source/config/skaffold.yaml --source=SOURCE; default="."- The location of the source that contains skaffold.yaml. The location can be adirectory on a local disk or a gzipped archive file (.tar.gz) in Google CloudStorage. If the source is a local directory, this command skips the filesspecified in the --ignore-file. If --ignore-file is not specified,use.gcloudignore file. If a .gcloudignore file is absent and a .gitignore fileis present in the local source directory, gcloud will use a generatedGit-compatible .gcloudignore file that respects your .gitignored files. Theglobal .gitignore is not respected. For more information on .gcloudignore, seegcloud topic gcloudignore.
- 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 helpfor details. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gclouddeployreleasescreategcloudalphadeployreleasescreate
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-11-18 UTC.