osbuilder: fix alpine agent build

Since we always build musl kata-agent, there is no need to build
it inside a musl container. We can just build on the host and then
copy the binary to the target rootfs.

There are still a lot to clean up and it should be made so for ALL
target distros instead of just alpine. But this is at least working
for alpine first.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao
2020-07-20 17:10:01 +08:00
parent 5216815d1c
commit 76c18aa345
14 changed files with 40 additions and 126 deletions

View File

@@ -34,16 +34,14 @@ get_from_kata_deps() {
local dependency="$1"
BRANCH=${branch:-master}
local branch="${2:-${BRANCH}}"
local runtime_repo="github.com/kata-containers/kata-containers"
GOPATH=${GOPATH:-${HOME}/go}
local runtime_repo_dir="${GOPATH}/src/${runtime_repo}"
# For our CI, we will query the local versions.yaml file both for kernel and
# all other subsystems. eg: a new version of NEMU would be good to test
# through CI. For the kernel, .ci/install_kata_kernel.sh file in tests
# repository will pass the kernel version as an override to this function to
# allow testing of kernels before they land in tree.
if [ "${CI:-}" = "true" ] && [ -d "${runtime_repo_dir}" ]; then
versions_file="${runtime_repo_dir}/versions.yaml"
if [ "${CI:-}" = "true" ]; then
versions_file="${this_script_dir}/../../../versions.yaml"
else
versions_file="versions-${branch}.yaml"
fi