mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-25 23:49:37 -05:00
c65b677f58
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
23 lines
606 B
Bash
Executable File
23 lines
606 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (c) Edgeless Systems GmbH
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
set -euo pipefail
|
|
shopt -s inherit_errexit
|
|
|
|
if [[ -z ${CONFIG_FILE-} ]] && [[ -f ${CONFIG_FILE-} ]]; then
|
|
# shellcheck source=/dev/null
|
|
. "${CONFIG_FILE}"
|
|
fi
|
|
|
|
path="constellation/v1/ref/${REF}/stream/${STREAM}/${IMAGE_VERSION}/image/csp/qemu/image.raw"
|
|
aws s3 cp "${QEMU_IMAGE_PATH}" "s3://${QEMU_BUCKET}/${path}" --no-progress
|
|
|
|
image_url="${QEMU_BASE_URL}/${path}"
|
|
|
|
json=$(jq -ncS \
|
|
--arg image_url "${image_url}" \
|
|
'{"qemu": {"default": $image_url}}')
|
|
echo -n "${json}" > "${QEMU_JSON_OUTPUT}"
|