mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 11:31:05 +00:00
tests: Add a helper script to use prebuild components
This is a helper script that does basically what's already being done by the s390x CI, which is: * Move a folder with the components that we were stored / downloaded during the GHA execution to the expected `build` location * Get rid of the dependencies for a specific asset, as the dependencies are already pulled in from previous GHA steps For now this script is only being added but not yet executed anywhere, and that will come as the next step in this series. Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
parent
c2b18f9660
commit
eb07a809ce
36
tests/gha-adjust-to-use-prebuilt-components.sh
Executable file
36
tests/gha-adjust-to-use-prebuilt-components.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
this_script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
repo_root_dir="$(cd "${this_script_dir}/../" && pwd)"
|
||||
|
||||
base_dir="${repo_root_dir}/tools/packaging/kata-deploy/local-build"
|
||||
build_dir="${base_dir}/build"
|
||||
|
||||
function main() {
|
||||
artifacts_dir="${1:-}"
|
||||
asset="${2:-}"
|
||||
|
||||
if [ -z "${artifacts_dir}" ]; then
|
||||
echo "The artefacts directory must be passed as the first argument to this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${asset}" ]; then
|
||||
echo "The asset must be passed as the second argument to this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv ${artifacts_dir} ${build_dir}
|
||||
sed -i "s/\(^${asset}-tarball:\).*/\1/g" ${base_dir}/Makefile
|
||||
}
|
||||
|
||||
main "$@"
|
Loading…
Reference in New Issue
Block a user