Skip to content

Commit

Permalink
Makefile: Add disk image files to TUF repo during cargo make repo
Browse files Browse the repository at this point in the history
This change adds the disk image files, if they exist, to the targets
that are linked into the TUF repository during the `cargo make repo`
target.  When the image files are in the repo, we can download them with
`tuftool` which can simplify the process of creating AMIs at a different
time or from a different machine.
  • Loading branch information
zmrow committed Oct 27, 2021
1 parent e443386 commit 2139dee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,14 @@ done
# modules for a given release.
LINK_REPO_TARGETS=("--link-target ${BUILDSYS_KMOD_KIT_PATH}")
# Include the root and data disk images in the repo if they exist
os_disk_img="${BUILDSYS_OUTPUT_DIR}/${BUILDSYS_NAME_FULL}.img.lz4"
data_disk_img="${BUILDSYS_OUTPUT_DIR}/${BUILDSYS_NAME_FULL}-data.img.lz4"
if [ -s "${os_disk_img}" ] && [ -s "${data_disk_img}" ]; then
LINK_REPO_TARGETS+=("--link-target ${os_disk_img}")
LINK_REPO_TARGETS+=("--link-target ${data_disk_img}")
fi
# Ensure we link an OVA if an OVF template exists (in which case we should have
# built an OVA)
if [ -s "${BUILDSYS_OVF_TEMPLATE}" ]; then
Expand Down

0 comments on commit 2139dee

Please sign in to comment.