This directory contains a subcommand called gh
that downloads a release
published in GitHub to a Google Cloud Storage Bucket.
GitHub has a rate limit on downloading release artifacts. The artifacts that are often used (e.g. in CI) are uploaded to Google Cloud Storage, as GCS doesn't have read rate limits. This improves test stability as flakes related to hitting rate limits are avoided.
This subcommand directly depends on gcloud
and gsutil
to be installed on
the system.
Google Cloud has documentation on installing and configuring the Google Cloud SDK CLI tools.
kpromo gh
is a subcommand of kpromo
and can be installed via go install
:
go install sigs.k8s.io/promo-tools/cmd/kpromo
This will install kpromo
to $(go env GOPATH)/bin/kpromo
.
kpromo gh [flags]
$ kpromo gh --help
Uploads GitHub releases to Google Cloud Storage
Usage:
kpromo gh --org kubernetes --repo release --bucket <bucket> --release-dir <release-dir> [--tags v0.0.0] [--include-prereleases] [--output-dir <temp-dir>] [--download-only] [--config <config-file>] [flags]
Examples:
gh --org kubernetes --repo release --bucket k8s-staging-release-test --release-dir release --tags v0.0.0,v0.0.1
Flags:
--bucket string GCS bucket to upload to
--config string config file to set all the branch/repositories the user wants to
--download-only only download the releases, do not push them to GCS. Requires the output-dir flag to also be set
-h, --help help for gh
--include-prereleases specifies whether prerelease assets should be uploaded to GCS
--org string GitHub org/user
--output-dir string local directory for releases to be downloaded to
--release-dir string directory to upload to within the specified GCS bucket
--repo string GitHub repo
--tags strings release tags to upload to GCS
Global Flags:
--log-level string the logging verbosity, either 'panic', 'fatal', 'error', 'warning', 'info', 'debug', 'trace' (default "info")
$ kpromo gh \
--org kubernetes --repo kubernetes --bucket my-test-bucket \
--release-dir release --tags v1.22.2
INFO Validating gh2gcs options...
INFO Downloading assets for the following kubernetes/kubernetes release tags: v1.22.2
INFO Download assets for kubernetes/kubernetes@v1.22.2 release=v1.22.2
INFO Writing assets to /var/folders/bz/z3ndv9m504g0pg9wwmj6bds80000gn/T/gh1025503320/kubernetes/kubernetes/v1.22.2 release=v1.22.2
INFO GitHub asset ID: 44868343, download URL: https://github.com/kubernetes/kubernetes/releases/download/v1.22.2/kubernetes.tar.gz
INFO Files downloaded to /var/folders/bz/z3ndv9m504g0pg9wwmj6bds80000gn/T/gh1025503320 directory
INFO Copying /var/folders/bz/z3ndv9m504g0pg9wwmj6bds80000gn/T/gh1025503320/kubernetes/kubernetes/v1.22.2 to GCS (my-test-bucket/release/v1.22.2)
The following GCS buckets are managed by SIG Release:
crictl
and critest
)The artifacts are pushed to GCS by
Release Managers. The pushing is
done manually by running the appropriate kpromo gh
command. It's recommended for
Release Managers to watch the appropriate repositories for new releases.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。