mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 11:58:41 +00:00
Merge pull request #3969 from gkurz/kata-deploy-copy-yq-installer
tools/packaging/kata-deploy: Copy install_yq.sh before starting parallel builds
This commit is contained in:
1
tools/packaging/kata-deploy/local-build/.gitignore
vendored
Normal file
1
tools/packaging/kata-deploy/local-build/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
build/
|
@@ -15,8 +15,11 @@ endef
|
||||
|
||||
kata-tarball: | all-parallel merge-builds
|
||||
|
||||
all-parallel:
|
||||
${MAKE} -f $(MK_PATH) all -j$$(( $$(nproc) - 1 )) NO_TTY="true" V=
|
||||
$(MK_DIR)/dockerbuild/install_yq.sh:
|
||||
$(MK_DIR)/kata-deploy-copy-yq-installer.sh
|
||||
|
||||
all-parallel: $(MK_DIR)/dockerbuild/install_yq.sh
|
||||
${MAKE} -f $(MK_PATH) all -j$$(( $$(nproc) - 1 )) V=
|
||||
|
||||
all: cloud-hypervisor-tarball \
|
||||
firecracker-tarball \
|
||||
@@ -26,7 +29,7 @@ all: cloud-hypervisor-tarball \
|
||||
rootfs-initrd-tarball \
|
||||
shim-v2-tarball
|
||||
|
||||
%-tarball-build:
|
||||
%-tarball-build: $(MK_DIR)/dockerbuild/install_yq.sh
|
||||
$(call BUILD,$*)
|
||||
|
||||
cloud-hypervisor-tarball:
|
||||
|
@@ -16,25 +16,17 @@ kata_deploy_create="${script_dir}/kata-deploy-binaries.sh"
|
||||
uid=$(id -u ${USER})
|
||||
gid=$(id -g ${USER})
|
||||
|
||||
TTY_OPT="-i"
|
||||
NO_TTY="${NO_TTY:-false}"
|
||||
[ -t 1 ] && [ "${NO_TTY}" == "false" ] && TTY_OPT="-it"
|
||||
|
||||
if [ "${script_dir}" != "${PWD}" ]; then
|
||||
ln -sf "${script_dir}/build" "${PWD}/build"
|
||||
fi
|
||||
|
||||
install_yq_script_path="${script_dir}/../../../../ci/install_yq.sh"
|
||||
|
||||
cp "${install_yq_script_path}" "${script_dir}/dockerbuild/install_yq.sh"
|
||||
|
||||
docker build -q -t build-kata-deploy \
|
||||
--build-arg IMG_USER="${USER}" \
|
||||
--build-arg UID=${uid} \
|
||||
--build-arg GID=${gid} \
|
||||
"${script_dir}/dockerbuild/"
|
||||
|
||||
docker run ${TTY_OPT} \
|
||||
docker run \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
--user ${uid}:${gid} \
|
||||
--env USER=${USER} -v "${kata_dir}:${kata_dir}" \
|
||||
|
16
tools/packaging/kata-deploy/local-build/kata-deploy-copy-yq-installer.sh
Executable file
16
tools/packaging/kata-deploy/local-build/kata-deploy-copy-yq-installer.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2021 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
set -o errtrace
|
||||
|
||||
script_dir=$(dirname "$(readlink -f "$0")")
|
||||
install_yq_script_path="${script_dir}/../../../../ci/install_yq.sh"
|
||||
|
||||
cp "${install_yq_script_path}" "${script_dir}/dockerbuild/install_yq.sh"
|
Reference in New Issue
Block a user