-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add description to created node images #27338
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,15 @@ | |
|
||
# Usage: copy-e2e-image.sh <image-name> <from-project-name> <to-project-name> | ||
|
||
# See *.properties for list of images to copy, | ||
# typically from kubernetes-node-e2e-images | ||
|
||
set -e | ||
set -x | ||
|
||
echo "Copying image $1 from project $2 to project $3..." | ||
gcloud compute --project $3 disks create $1 --image=https://www.googleapis.com/compute/v1/projects/$2/global/images/$1 | ||
gcloud compute --project $3 images create $1 --source-disk=$1 | ||
gcloud compute --project $3 disks delete $1 | ||
gcloud compute --project $3 images create $1 \ | ||
--source-disk=$1 \ | ||
--description="Cloned from projects/$2/global/images/$1 by $USER on $(date)" | ||
gcloud -q compute --project $3 disks delete $1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's -q do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skips asking for confirmation. We don't want the disk (created in line 26) but the easiest way to create an image is from a disk. So we use the temporary disk to create the image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
store the args into named variables so this script is readable with less context.