mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 15:57:09 +00:00
Merge pull request #618 from jcvenegas/fix-container-image
Packaging fixes for release
This commit is contained in:
commit
89f2c80451
@ -14,7 +14,7 @@ set -o nounset
|
||||
set -o pipefail
|
||||
set -o errtrace
|
||||
|
||||
[ -z "${DEBUG:-}" ] || set -x
|
||||
[ -z "${DEBUG:-}" ] || set -x
|
||||
readonly script_dir=$(dirname $(readlink -f "$0"))
|
||||
readonly packaging_dir="${script_dir}/../.."
|
||||
|
||||
@ -30,10 +30,9 @@ fi
|
||||
|
||||
# Push to anywhere, variable used by release scripts to push
|
||||
PUSH=1
|
||||
# dont use release kata image
|
||||
BUILD_HEAD=true
|
||||
BUILD_HEAD=${BUILD_HEAD:-${CI:-}}
|
||||
|
||||
if [ "${CI:-}" == "true" ];then
|
||||
if [ "${CI:-}" == "true" ]; then
|
||||
SUBPROJECT_TYPE="ci"
|
||||
else
|
||||
SUBPROJECT_TYPE="releases"
|
||||
@ -55,13 +54,25 @@ echo "INFO: BUILD_HEAD=${BUILD_HEAD}"
|
||||
echo "INFO: BRANCH=${BRANCH}"
|
||||
echo "INFO: OBS_BRANCH=${OBS_SUBPROJECT}"
|
||||
echo "INFO: PUSH=${PUSH}"
|
||||
echo "INFO: SUBPROJECT_TYPE=${SUBPROJECT_TYPE}"
|
||||
|
||||
# Export in all pipeline tasks
|
||||
cd "${packaging_dir}/obs-packaging" || exit 1
|
||||
echo "Building for head gen versions ..."
|
||||
./gen_versions_txt.sh --head "${BRANCH}"
|
||||
cd "${packaging_dir}/obs-packaging" || exit 1
|
||||
gen_versions_cmd="./gen_versions_txt.sh"
|
||||
if [ "${BUILD_HEAD}" = "true" ]; then
|
||||
echo "Building for head gen versions ..."
|
||||
gen_versions_cmd+=" --head"
|
||||
fi
|
||||
|
||||
${gen_versions_cmd} "${BRANCH}"
|
||||
|
||||
# print versions just for debug/info
|
||||
cat versions.txt
|
||||
export NEW_VERSION=$(curl -s -L https://raw.githubusercontent.com/kata-containers/runtime/${BRANCH}/VERSION)
|
||||
script -qefc bash -c './create-repo-branch.sh --ci ${OBS_BRANCH}'
|
||||
create_repo_cmd="./create-repo-branch.sh"
|
||||
if [ "${CI:-}" = "true" ]; then
|
||||
create_repo_cmd+=" --ci"
|
||||
fi
|
||||
create_repo_cmd+=" ${OBS_BRANCH}"
|
||||
script -qefc bash -c "${create_repo_cmd}"
|
||||
script -qefc bash -c './build_from_docker.sh ${NEW_VERSION}'
|
||||
|
@ -12,7 +12,7 @@ export GOPATH=/usr/src/packages/BUILD/go
|
||||
export GOROOT=/usr/src/packages/BUILD/local/go
|
||||
export DH_OPTIONS
|
||||
|
||||
export DEFAULT_QEMU=qemu-vanilla-x86_64
|
||||
export DEFAULT_QEMU=qemu-vanilla-system-x86_64
|
||||
|
||||
GO_VERSION=@GO_VERSION@
|
||||
|
||||
|
@ -39,9 +39,15 @@ RUN git clone https://github.com/qemu/capstone.git capstone
|
||||
RUN git clone https://github.com/qemu/keycodemapdb.git ui/keycodemapdb
|
||||
|
||||
ADD scripts/configure-hypervisor.sh /root/configure-hypervisor.sh
|
||||
ADD qemu/patches/* /root/kata_qemu_patches
|
||||
ADD qemu/patches/ /root/kata_qemu_patches
|
||||
|
||||
RUN for patch in /root/kata_qemu_patches/*.patch; do git apply "$patch"; done
|
||||
RUN \
|
||||
cat VERSION; \
|
||||
stable_branch=$(cat VERSION | awk 'BEGIN{FS=OFS="."}{print $1 "." $2 ".x"}');\
|
||||
for patch in $(find /root/kata_qemu_patches/${stable_branch}/ -name '*.patch'); do\
|
||||
echo "apply $patch";\
|
||||
git apply "$patch"; \
|
||||
done
|
||||
|
||||
RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | xargs ./configure \
|
||||
--with-pkgversion=kata-static
|
||||
|
Loading…
Reference in New Issue
Block a user