mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
commit
4ffb21da38
@ -3,7 +3,7 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
GSUTIL_OPTS=
|
||||
UPLOAD_ROOT="gs://storage.core-os.net/coreos"
|
||||
UPLOAD_ROOT="${COREOS_UPLOAD_ROOT:-gs://storage.core-os.net/coreos}"
|
||||
UPLOAD_PATH=
|
||||
UPLOAD_DEFAULT=${FLAGS_FALSE}
|
||||
if [[ ${COREOS_OFFICIAL:-0} -eq 1 ]]; then
|
||||
|
||||
@ -17,6 +17,7 @@ VALID_IMG_TYPES=(
|
||||
vmware
|
||||
vmware_insecure
|
||||
xen
|
||||
gce
|
||||
)
|
||||
|
||||
# Set at runtime to one of the above types
|
||||
@ -110,6 +111,10 @@ IMG_pxe_PARTITIONED_IMG=0
|
||||
IMG_pxe_CONF_FORMAT=pxe
|
||||
IMG_pxe_OEM_PACKAGE=oem-pxe
|
||||
|
||||
## gce, image tarball
|
||||
IMG_gce_CONF_FORMAT=gce
|
||||
IMG_gce_OEM_PACKAGE=oem-gce
|
||||
|
||||
## rackspace
|
||||
# TODO: package doesn't exist yet
|
||||
IMG_rackspace_OEM_PACKAGE=oem-rackspace
|
||||
@ -695,6 +700,16 @@ EOF
|
||||
VM_GENERATED_FILES=( "${box}" "${VM_README}" )
|
||||
}
|
||||
|
||||
_write_gce_conf() {
|
||||
local src_name=$(basename "$VM_SRC_IMG")
|
||||
local dst_dir=$(dirname "$VM_DST_IMG")
|
||||
local tar_path="${dst_dir}/$(_src_to_dst_name "${src_name}" ".tar.gz")"
|
||||
|
||||
mv "${VM_DST_IMG}" "${VM_TMP_DIR}/disk.raw"
|
||||
tar -czf "${tar_path}" -C "${VM_TMP_DIR}" "disk.raw"
|
||||
VM_GENERATED_FILES=( "${tar_path}" )
|
||||
}
|
||||
|
||||
vm_cleanup() {
|
||||
info "Cleaning up temporary files"
|
||||
sudo rm -rf "${VM_TMP_DIR}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user