release: Rename generated artifacts to a particular format

Rename artifacts to format kata-static-{artifact-name}.tar.gz.
These predictable names are intended to be consumed by github
actions in our release process.

Fixes #803

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde 2019-11-13 12:58:28 -08:00
parent 3283208a25
commit 78959588f7
3 changed files with 14 additions and 15 deletions

View File

@ -110,7 +110,7 @@ install_image() {
ln -sf "${initrd}" kata-containers-initrd.img ln -sf "${initrd}" kata-containers-initrd.img
popd >>/dev/null popd >>/dev/null
pushd ${destdir} pushd ${destdir}
tar -czvf ../kata-image.tar.gz * tar -czvf ../kata-static-image.tar.gz *
popd popd
} }
@ -124,7 +124,7 @@ install_kernel() {
DESTDIR="${destdir}" PREFIX="${prefix}" ./kernel/build-kernel.sh install DESTDIR="${destdir}" PREFIX="${prefix}" ./kernel/build-kernel.sh install
popd popd
pushd ${destdir} pushd ${destdir}
tar -czvf ../kata-kernel.tar.gz * tar -czvf ../kata-static-kernel.tar.gz *
popd popd
} }
@ -138,7 +138,7 @@ install_experimental_kernel() {
DESTDIR="${destdir}" PREFIX="${prefix}" ./kernel/build-kernel.sh -e install DESTDIR="${destdir}" PREFIX="${prefix}" ./kernel/build-kernel.sh -e install
popd popd
pushd ${destdir} pushd ${destdir}
tar -czvf ../kata-kernel-experimental.tar.gz * tar -czvf ../kata-static-experimental-kernel.tar.gz *
popd popd
} }
@ -163,7 +163,7 @@ install_firecracker() {
sudo install -D --owner root --group root --mode 0744 firecracker/firecracker-static "${destdir}/opt/kata/bin/firecracker" sudo install -D --owner root --group root --mode 0744 firecracker/firecracker-static "${destdir}/opt/kata/bin/firecracker"
sudo install -D --owner root --group root --mode 0744 firecracker/jailer-static "${destdir}/opt/kata/bin/jailer" sudo install -D --owner root --group root --mode 0744 firecracker/jailer-static "${destdir}/opt/kata/bin/jailer"
pushd ${destdir} pushd ${destdir}
tar -czvf ../kata-firecracker-static.tar.gz * tar -czvf ../kata-static-firecracker.tar.gz *
popd popd
} }
@ -231,15 +231,15 @@ EOT
popd popd
pushd ${destdir} pushd ${destdir}
tar -czvf ../kata-components.tar.gz * tar -czvf ../kata-static-kata-components.tar.gz *
popd popd
} }
untar_qemu_binaries() { untar_qemu_binaries() {
info "Install static qemu" info "Install static qemu"
tar xf kata-qemu-static.tar.gz -C "${destdir}" tar xf kata-static-qemu.tar.gz -C "${destdir}"
info "Install static qemu-virtiofs" info "Install static qemu-virtiofs"
tar xf kata-qemu-virtiofs-static.tar.gz -C "${destdir}" tar xf kata-static-qemu-virtiofsd.tar.gz -C "${destdir}"
} }
main() { main() {

View File

@ -17,9 +17,8 @@ packaging_dir="${script_dir}/../.."
qemu_virtiofs_repo=$(get_from_kata_deps "assets.hypervisor.qemu-experimental.url") qemu_virtiofs_repo=$(get_from_kata_deps "assets.hypervisor.qemu-experimental.url")
# This tag will be supported on the runtime versions.yaml # This tag will be supported on the runtime versions.yaml
qemu_virtiofs_tag=$(get_from_kata_deps "assets.hypervisor.qemu-experimental.tag") qemu_virtiofs_tag=$(get_from_kata_deps "assets.hypervisor.qemu-experimental.tag")
qemu_tar="kata-qemu-static.tar.gz" qemu_virtiofs_tar="kata-static-qemu-virtiofsd.tar.gz"
qemu_virtiofs_tar="kata-qemu-virtiofs-static.tar.gz" qemu_tmp_tar="kata-static-qemu-virtiofsd-tmp.tar.gz"
qemu_tmp_tar="kata-qemu-virtiofs-static-tmp.tar.gz"
info "Build ${qemu_virtiofs_repo} tag: ${qemu_virtiofs_tag}" info "Build ${qemu_virtiofs_repo} tag: ${qemu_virtiofs_tag}"
@ -41,10 +40,10 @@ sudo docker build \
sudo docker run \ sudo docker run \
-i \ -i \
-v "${PWD}":/share qemu-virtiofs-static \ -v "${PWD}":/share qemu-virtiofs-static \
mv "/tmp/qemu-virtiofs-static/${qemu_tar}" /share/ mv "/tmp/qemu-virtiofs-static/${qemu_virtiofs_tar}" /share/
sudo chown ${USER}:${USER} "${PWD}/${qemu_tar}" sudo chown ${USER}:${USER} "${PWD}/${qemu_virtiofs_tar}"
# Remove blacklisted binaries # Remove blacklisted binaries
gzip -d < "${qemu_tar}" | tar --delete --wildcards -f - ${qemu_black_list[*]} | gzip > "${qemu_tmp_tar}" gzip -d < "${qemu_virtiofs_tar}" | tar --delete --wildcards -f - ${qemu_black_list[*]} | gzip > "${qemu_tmp_tar}"
mv -f "${qemu_tmp_tar}" "${qemu_virtiofs_tar}" mv -f "${qemu_tmp_tar}" "${qemu_virtiofs_tar}"

View File

@ -14,8 +14,8 @@ source "${script_dir}/../../scripts/lib.sh"
source "${script_dir}/../qemu.blacklist" source "${script_dir}/../qemu.blacklist"
packaging_dir="${script_dir}/../.." packaging_dir="${script_dir}/../.."
qemu_tar="kata-qemu-static.tar.gz" qemu_tar="kata-static-qemu.tar.gz"
qemu_tmp_tar="kata-qemu-static-tmp.tar.gz" qemu_tmp_tar="kata-static-qemu-tmp.tar.gz"
qemu_repo="${qemu_repo:-}" qemu_repo="${qemu_repo:-}"
qemu_version="${qemu_version:-}" qemu_version="${qemu_version:-}"