mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
kata-deploy: Add VERSION and versions.yaml to the final tarball
Let's make things simpler to figure out which version of Kata Containers has been deployed, and also which artefacts come with it. This will help us immensely in the future, for the TEEs use case, so we can easily know whether we can deploy a specific guest kernel for a specific host kernel. Fixes: #7394 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
5dddd7c5d1
commit
59fdd69b85
@ -99,7 +99,7 @@ jobs:
|
||||
path: kata-artifacts
|
||||
- name: merge-artifacts
|
||||
run: |
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
||||
- name: store-artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
@ -83,7 +83,7 @@ jobs:
|
||||
path: kata-artifacts
|
||||
- name: merge-artifacts
|
||||
run: |
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
||||
- name: store-artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
@ -80,7 +80,7 @@ jobs:
|
||||
path: kata-artifacts
|
||||
- name: merge-artifacts
|
||||
run: |
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
||||
- name: store-artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
@ -125,7 +125,7 @@ virtiofsd-tarball:
|
||||
${MAKE} $@-build
|
||||
|
||||
merge-builds:
|
||||
$(MK_DIR)/kata-deploy-merge-builds.sh build
|
||||
$(MK_DIR)/kata-deploy-merge-builds.sh build "$(MK_DIR)/../../../../versions.yaml"
|
||||
|
||||
install-tarball:
|
||||
tar -xf ./kata-static.tar.xz -C /
|
||||
|
@ -11,6 +11,8 @@ set -o pipefail
|
||||
set -o errtrace
|
||||
|
||||
kata_build_dir=${1:-build}
|
||||
kata_versions_yaml_file=${2:-""}
|
||||
|
||||
tar_path="${PWD}/kata-static.tar.xz"
|
||||
|
||||
pushd "${kata_build_dir}"
|
||||
@ -24,6 +26,15 @@ do
|
||||
tar -xvf "${c}" -C "${tarball_content_dir}"
|
||||
done
|
||||
|
||||
pushd ${tarball_content_dir}
|
||||
shim="containerd-shim-kata-v2"
|
||||
shim_path=$(find . -name ${shim} | sort | head -1)
|
||||
prefix=${shim_path%"bin/${shim}"}
|
||||
|
||||
echo "$(git describe)" > ${prefix}/VERSION
|
||||
[[ -n "${kata_versions_yaml_file}" ]] && cp ${kata_versions_yaml_file} ${prefix}/
|
||||
popd
|
||||
|
||||
echo "create ${tar_path}"
|
||||
(cd "${tarball_content_dir}"; tar cvfJ "${tar_path}" .)
|
||||
popd
|
||||
|
Loading…
Reference in New Issue
Block a user