mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-22 12:29:49 +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
.github/workflows/release.yaml
vendored
1
.github/workflows/release.yaml
vendored
@@ -26,6 +26,7 @@ jobs:
|
||||
|
||||
- name: Build ${{ matrix.asset }}
|
||||
run: |
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-copy-yq-installer.sh
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-binaries-in-docker.sh --build="${KATA_ASSET}"
|
||||
build_dir=$(readlink -f build)
|
||||
# store-artifact does not work with symlink
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,4 +9,5 @@ src/agent/src/version.rs
|
||||
src/agent/kata-agent.service
|
||||
src/agent/protocols/src/*.rs
|
||||
!src/agent/protocols/src/lib.rs
|
||||
build
|
||||
|
||||
|
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