mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-18 06:47:12 +00:00
gcloud: Wed Mar 13 09:56:21 UTC 2024
This commit is contained in:
parent
7f632e0c5d
commit
75379bf68b
273 changed files with 9390 additions and 532 deletions
|
|
@ -12,11 +12,29 @@ DESCRIPTION
|
|||
$ gcloud artifacts docker upgrade print-iam-policy gcr.io \
|
||||
--project=my-project
|
||||
|
||||
To migrate a project from Container Registry to Artifact Registry using
|
||||
gcr.io repos:
|
||||
|
||||
$ gcloud artifacts docker upgrade migrate --projects=my-project
|
||||
|
||||
To migrate a project from Container Registry to Artifact Registry using
|
||||
pkg.dev repos:
|
||||
|
||||
$ gcloud artifacts docker upgrade migrate \
|
||||
--from-gcr-io=gcr.io/from-project \
|
||||
--to-pkg-dev=to-project/to-repo
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --help.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
COMMANDS
|
||||
COMMAND is one of the following:
|
||||
|
||||
migrate
|
||||
Migrate projects from Container Registry to Artifact Registry.
|
||||
|
||||
NOTES
|
||||
This variant is also available:
|
||||
|
||||
|
|
|
|||
73
gcloud/artifacts/docker/upgrade/migrate
Normal file
73
gcloud/artifacts/docker/upgrade/migrate
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
NAME
|
||||
gcloud artifacts docker upgrade migrate - migrate projects from Container
|
||||
Registry to Artifact Registry
|
||||
|
||||
SYNOPSIS
|
||||
gcloud artifacts docker upgrade migrate [--copy-only]
|
||||
[--from-gcr=GCR_HOST/PROJECT_ID] [--last-uploaded-versions=N]
|
||||
[--max-threads=MAX_THREADS; default=8] [--projects=PROJECTS]
|
||||
[--recent-images=NUM_DAYS] [--skip-iam-update]
|
||||
[--to-pkg-dev=PROJECT_ID/REPOSITORY_ID] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Migrate projects from Container Registry to Artifact Registry
|
||||
|
||||
EXAMPLES
|
||||
To migrate a project my-project using gcr.io repositories:
|
||||
|
||||
$ gcloud artifacts docker upgrade migrate --projects=my-project
|
||||
|
||||
To migrate several projects using gcr.io repositories:
|
||||
|
||||
$ gcloud artifacts docker upgrade migrate \
|
||||
--projects=my-project1,my-project2,my-project3
|
||||
|
||||
To migrate a project using pkg.dev repositories:
|
||||
|
||||
$ gcloud artifacts docker upgrade migrate \
|
||||
--from-gcr=gcr.io/project1 --to-pkg-dev=project2/repo_name
|
||||
|
||||
FLAGS
|
||||
--copy-only
|
||||
Only perform image copying
|
||||
|
||||
--from-gcr=GCR_HOST/PROJECT_ID
|
||||
Container Registry host + project to copy from. This flag is only used
|
||||
when migrating to pkg.dev repos. Example: gcr.io/my-project
|
||||
|
||||
--last-uploaded-versions=N
|
||||
Only copy the N most recently uploaded versions of each image. More
|
||||
than N images may be copied if new images are uploaded during
|
||||
migration.
|
||||
|
||||
--max-threads=MAX_THREADS; default=8
|
||||
Max number of images to copy simultaneously. Consider quota usage when
|
||||
increasing this
|
||||
|
||||
--projects=PROJECTS
|
||||
Comma seperated list of Container Registry projects to migrate to
|
||||
Artifact Registry gcr.io repositories.
|
||||
|
||||
--recent-images=NUM_DAYS
|
||||
Only copy images pulled or pushed in the last NUM_DAYS days. NUM_DAYS
|
||||
must be between 30 and 90 inclusive.
|
||||
|
||||
--skip-iam-update
|
||||
Migrate without changing iam-policy. Users without Artifact Registry
|
||||
permissions will not have access to migrated images.
|
||||
|
||||
--to-pkg-dev=PROJECT_ID/REPOSITORY_ID
|
||||
Artifact Registry pkg.dev project ID and repository ID to copy to.
|
||||
Example: my-project/my-repo
|
||||
|
||||
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 artifactregistry/v1 API. The full documentation for
|
||||
this API can be found at: https://cloud.google.com/artifacts/docs/
|
||||
88
gcloud/artifacts/files/download
Normal file
88
gcloud/artifacts/files/download
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
NAME
|
||||
gcloud artifacts files download - download an Artifact Registry file
|
||||
|
||||
SYNOPSIS
|
||||
gcloud artifacts files download
|
||||
(FILE : --location=LOCATION --repository=REPOSITORY)
|
||||
--destination=DESTINATION [--allow-overwrite]
|
||||
[--local-filename=LOCAL_FILENAME] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Downloads an Artifact Registry file based on file name.
|
||||
|
||||
EXAMPLES
|
||||
To download a file named myfile in project my-project under repository
|
||||
my-repo in us-central1 to the local path ~/:
|
||||
|
||||
$ gcloud artifacts files download --location=us-central1 \
|
||||
--project=my-project --repository=my-repo --destination=~/ \
|
||||
myfile
|
||||
|
||||
To download a file named myfile in project my-project under repository
|
||||
my-repo in us-central1 to the local path ~/ with file overwriting enabled:
|
||||
|
||||
$ gcloud artifacts files download --location=us-central1 \
|
||||
--project=my-project --repository=my-repo --destination=~/ \
|
||||
myfile --allow-overwrite
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
File resource - The Artifact Registry file name. If not specified, the
|
||||
current artifacts/location is used. 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 file on the command line with a fully specified
|
||||
name;
|
||||
◆ provide the argument --project on the command line;
|
||||
◆ set the property core/project.
|
||||
|
||||
This must be specified.
|
||||
|
||||
FILE
|
||||
ID of the file or fully qualified identifier for the file.
|
||||
|
||||
To set the name attribute:
|
||||
▸ provide the argument file on the command line.
|
||||
|
||||
This positional argument must be specified if any of the other
|
||||
arguments in this group are specified.
|
||||
|
||||
--location=LOCATION
|
||||
Location of the file.
|
||||
|
||||
To set the location attribute:
|
||||
▸ provide the argument file on the command line with a fully
|
||||
specified name;
|
||||
▸ provide the argument --location on the command line;
|
||||
▸ set the property artifacts/location.
|
||||
|
||||
--repository=REPOSITORY
|
||||
Repository of the file.
|
||||
|
||||
To set the repository attribute:
|
||||
▸ provide the argument file on the command line with a fully
|
||||
specified name;
|
||||
▸ provide the argument --repository on the command line;
|
||||
▸ set the property artifacts/repository.
|
||||
|
||||
REQUIRED FLAGS
|
||||
--destination=DESTINATION
|
||||
The path where you want to download the file.
|
||||
|
||||
OPTIONAL FLAGS
|
||||
--allow-overwrite
|
||||
If specified, the command overwrites an existing file
|
||||
|
||||
--local-filename=LOCAL_FILENAME
|
||||
If specified, the name of the downloaded file on the local system is
|
||||
set to the value you use for LOCAL_FILENAME. Otherwise the name of the
|
||||
downloaded file is based on the file name in the registry.
|
||||
|
||||
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.
|
||||
|
|
@ -23,6 +23,9 @@ GCLOUD WIDE FLAGS
|
|||
COMMANDS
|
||||
COMMAND is one of the following:
|
||||
|
||||
download
|
||||
Download an Artifact Registry file.
|
||||
|
||||
list
|
||||
List Artifact Registry files.
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ NAME
|
|||
SYNOPSIS
|
||||
gcloud artifacts repositories create (REPOSITORY : --location=LOCATION)
|
||||
--repository-format=REPOSITORY_FORMAT [--allow-snapshot-overwrites]
|
||||
[--async] [--description=DESCRIPTION] [--immutable-tags]
|
||||
[--kms-key=KMS_KEY] [--labels=[KEY=VALUE,...]]
|
||||
[--async] [--description=DESCRIPTION] [--disable-remote-validation]
|
||||
[--immutable-tags] [--kms-key=KMS_KEY] [--labels=[KEY=VALUE,...]]
|
||||
[--mode=MODE; default="NONE"] [--remote-apt-repo=REMOTE_APT_REPO]
|
||||
[--remote-apt-repo-path=REMOTE_APT_REPO_PATH]
|
||||
[--remote-docker-repo=REMOTE_DOCKER_REPO]
|
||||
|
|
@ -108,6 +108,11 @@ OPTIONAL FLAGS
|
|||
--description=DESCRIPTION
|
||||
Description for the repository.
|
||||
|
||||
--disable-remote-validation
|
||||
Do not make an HTTP request to validate the remote upstream. Not
|
||||
recommended when setting a custom remote upstream unless you are
|
||||
absolutely sure your upstream URI and any auth is valid.
|
||||
|
||||
--immutable-tags
|
||||
(Docker only) Prevent changes to tagged images in the repository. Tags
|
||||
cannot be deleted or moved to a different image digest, and tagged
|
||||
|
|
@ -148,15 +153,21 @@ OPTIONAL FLAGS
|
|||
|
||||
--remote-docker-repo=REMOTE_DOCKER_REPO
|
||||
(Docker only) Repo upstream for docker remote repository.
|
||||
REMOTE_DOCKER_REPO must be one of: [docker-hub].
|
||||
REMOTE_DOCKER_REPO can be either:
|
||||
◆ one of the following enums: [docker-hub].
|
||||
◆ an http/https custom registry uri (ex: https://my.docker.registry)
|
||||
|
||||
--remote-mvn-repo=REMOTE_MVN_REPO
|
||||
(Maven only) Repo upstream for maven remote repository. REMOTE_MVN_REPO
|
||||
must be one of: [maven-central].
|
||||
can be either:
|
||||
◆ one of the following enums: [maven-central].
|
||||
◆ an http/https custom registry uri (ex: https://my.maven.registry)
|
||||
|
||||
--remote-npm-repo=REMOTE_NPM_REPO
|
||||
(Npm only) Repo upstream for npm remote repository. REMOTE_NPM_REPO
|
||||
must be one of: [npmjs].
|
||||
(Npm only) Repo upstream for npm remote repository. REMOTE_NPM_REPO can
|
||||
be either:
|
||||
◆ one of the following enums: [npmjs].
|
||||
◆ an http/https custom registry uri (ex: https://my.npm.registry)
|
||||
|
||||
--remote-password-secret-version=REMOTE_PASSWORD_SECRET_VERSION
|
||||
Secret Manager secret version that contains password for the remote
|
||||
|
|
@ -164,7 +175,9 @@ OPTIONAL FLAGS
|
|||
|
||||
--remote-python-repo=REMOTE_PYTHON_REPO
|
||||
(Python only) Repo upstream for python remote repository.
|
||||
REMOTE_PYTHON_REPO must be one of: [pypi].
|
||||
REMOTE_PYTHON_REPO can be either:
|
||||
◆ one of the following enums: [pypi].
|
||||
◆ an http/https custom registry uri (ex: https://my.python.registry)
|
||||
|
||||
--remote-repo-config-desc=REMOTE_REPO_CONFIG_DESC
|
||||
The description for the remote repository config.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ NAME
|
|||
|
||||
SYNOPSIS
|
||||
gcloud artifacts repositories update (REPOSITORY : --location=LOCATION)
|
||||
[--description=DESCRIPTION] [--immutable-tags]
|
||||
[--description=DESCRIPTION] [--disable-remote-validation]
|
||||
[--immutable-tags]
|
||||
[--remote-password-secret-version=REMOTE_PASSWORD_SECRET_VERSION]
|
||||
[--remote-username=REMOTE_USERNAME] [--update-labels=[KEY=VALUE,...]]
|
||||
[--upstream-policy-file=FILE]
|
||||
|
|
@ -63,6 +64,11 @@ FLAGS
|
|||
--description=DESCRIPTION
|
||||
Description for the repository.
|
||||
|
||||
--disable-remote-validation
|
||||
Do not make an HTTP request to validate the remote upstream. Not
|
||||
recommended when setting a custom remote upstream unless you are
|
||||
absolutely sure your upstream URI and any auth is valid.
|
||||
|
||||
--immutable-tags
|
||||
(Docker only) Prevent changes to tagged images in the repository. Tags
|
||||
cannot be deleted or moved to a different image digest, and tagged
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue