Merge pull request #9962 from GabyCT/topic/removecif

scripts: Eliminate CI variable as it is not longer used
This commit is contained in:
Steve Horsman 2024-07-10 09:02:33 +01:00 committed by GitHub
commit aa487307e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 83 additions and 150 deletions

View File

@ -279,8 +279,8 @@ $ export KERNEL_EXTRAVERSION=$(awk '/^EXTRAVERSION =/{print $NF}' $GOPATH/$LINUX
$ export KERNEL_ROOTFS_DIR=${KERNEL_MAJOR_VERSION}.${KERNEL_PATHLEVEL}.${KERNEL_SUBLEVEL}${KERNEL_EXTRAVERSION} $ export KERNEL_ROOTFS_DIR=${KERNEL_MAJOR_VERSION}.${KERNEL_PATHLEVEL}.${KERNEL_SUBLEVEL}${KERNEL_EXTRAVERSION}
$ cd $QAT_SRC $ cd $QAT_SRC
$ KERNEL_SOURCE_ROOT=$GOPATH/$LINUX_VER ./configure --enable-icp-sriov=guest $ KERNEL_SOURCE_ROOT=$GOPATH/$LINUX_VER ./configure --enable-icp-sriov=guest
$ sudo -E make all -j $($(nproc ${CI:+--ignore 1})) $ sudo -E make all -j $(nproc)
$ sudo -E make INSTALL_MOD_PATH=$ROOTFS_DIR qat-driver-install -j $($(nproc ${CI:+--ignore 1})) $ sudo -E make INSTALL_MOD_PATH=$ROOTFS_DIR qat-driver-install -j $(nproc)
``` ```
The `usdm_drv` module also needs to be copied into the rootfs modules path and The `usdm_drv` module also needs to be copied into the rootfs modules path and

View File

@ -583,25 +583,8 @@ cleanup()
warn "Not cleaning up to help debug failure:" warn "Not cleaning up to help debug failure:"
warn "" warn ""
if [ "${CI:-}" = "true" ]
then
show_procs
info "VSOCK details"
ss -Hp --vsock || true
info "agent-ctl log file"
sudo cat "${ctl_log_file}" || true
echo
info "agent log file"
sudo cat "${agent_log_file}" || true
echo
else
info "agent-ctl log file : ${ctl_log_file}" info "agent-ctl log file : ${ctl_log_file}"
info "agent log file : ${agent_log_file}" info "agent log file : ${agent_log_file}"
fi
info "OCI bundle directory : ${bundle_dir}" info "OCI bundle directory : ${bundle_dir}"

View File

@ -116,15 +116,6 @@ cleanup()
return 0 return 0
fi fi
if [ -n "${CI:-}" ]; then
# Running under the CI, so copy the logs to allow them
# to be added as test artifacts.
sudo mkdir -p "$TRACE_LOG_DIR"
sudo cp -a "$logdir"/* "$TRACE_LOG_DIR"
dest="$TRACE_LOG_DIR"
fi
eval "$fp" "test $result - logs left in '$dest'" eval "$fp" "test $result - logs left in '$dest'"
} }

View File

@ -86,7 +86,7 @@ build_qat_drivers()
KERNEL_ROOTFS_DIR=${KERNEL_MAJOR_VERSION}.${KERNEL_PATHLEVEL}.${KERNEL_SUBLEVEL}${KERNEL_EXTRAVERSION} KERNEL_ROOTFS_DIR=${KERNEL_MAJOR_VERSION}.${KERNEL_PATHLEVEL}.${KERNEL_SUBLEVEL}${KERNEL_EXTRAVERSION}
cd $QAT_SRC cd $QAT_SRC
KERNEL_SOURCE_ROOT=${linux_kernel_path} ./configure ${QAT_CONFIGURE_OPTIONS} KERNEL_SOURCE_ROOT=${linux_kernel_path} ./configure ${QAT_CONFIGURE_OPTIONS}
make all -j $($(nproc ${CI:+--ignore 1})) make all -j $(nproc)
} }
add_qat_to_rootfs() add_qat_to_rootfs()

View File

@ -495,7 +495,6 @@ build_rootfs_distro()
--env AGENT_BIN="${AGENT_BIN}" \ --env AGENT_BIN="${AGENT_BIN}" \
--env AGENT_INIT="${AGENT_INIT}" \ --env AGENT_INIT="${AGENT_INIT}" \
--env ARCH="${ARCH}" \ --env ARCH="${ARCH}" \
--env CI="${CI}" \
--env MEASURED_ROOTFS="${MEASURED_ROOTFS}" \ --env MEASURED_ROOTFS="${MEASURED_ROOTFS}" \
--env KERNEL_MODULES_DIR="${KERNEL_MODULES_DIR}" \ --env KERNEL_MODULES_DIR="${KERNEL_MODULES_DIR}" \
--env LIBC="${LIBC}" \ --env LIBC="${LIBC}" \

View File

@ -33,31 +33,3 @@ distro_in_set() {
done done
return 1 return 1
} }
if [ -n "${CI:-}" ]; then
# Since too many distros timeout for now, we only test clearlinux and ubuntu. We can enable other distros when we fix timeout problem.
for distro in "${distros[@]}"; do
if distro_in_set "${distro}" "${test_distros[@]}"; then
continue
fi
skipWhenTestingAll+=("${distro}")
done
# add skipForRustDistros to skipWhenTestingAll if it is not
for td in "${skipForRustDistros[@]}"; do
if distro_in_set "${td}" "${skipWhenTestingAll[@]}"; then
continue
fi
# not found in skipWhenTestingAll, add to it
skipWhenTestingAll+=("${td}")
done
if distro_in_set "${arch}" "${skipForRustArch[@]}"; then
for distro in "${test_distros[@]}"; do
if distro_in_set "${distro}" "${skipWhenTestingAll[@]}"; then
continue
fi
skipWhenTestingAll+=("${distro}")
done
fi
fi

View File

@ -27,7 +27,6 @@ readonly rootfs_builder=${project_dir}/rootfs-builder/rootfs.sh
readonly DOCKER_RUNTIME=${DOCKER_RUNTIME:-runc} readonly DOCKER_RUNTIME=${DOCKER_RUNTIME:-runc}
readonly RUNTIME=${RUNTIME:-kata-runtime} readonly RUNTIME=${RUNTIME:-kata-runtime}
readonly MACHINE_TYPE=`uname -m` readonly MACHINE_TYPE=`uname -m`
readonly CI=${CI:-}
readonly KATA_HYPERVISOR="${KATA_HYPERVISOR:-}" readonly KATA_HYPERVISOR="${KATA_HYPERVISOR:-}"
readonly KATA_DEV_MODE="${KATA_DEV_MODE:-}" readonly KATA_DEV_MODE="${KATA_DEV_MODE:-}"
readonly ci_results_dir="/var/osbuilder/tests" readonly ci_results_dir="/var/osbuilder/tests"
@ -280,11 +279,6 @@ setup()
{ {
mkdir -p "${images_dir}" mkdir -p "${images_dir}"
if [ -n "$CI" ]; then
sudo -E rm -rf ${ci_results_dir}
sudo -E mkdir -p ${ci_results_dir}
fi
[ -n "${KVM_MISSING:-}" ] && return [ -n "${KVM_MISSING:-}" ] && return
[ ! -d "${tests_repo_dir}" ] && git clone "https://${tests_repo}" "${tests_repo_dir}" [ ! -d "${tests_repo_dir}" ] && git clone "https://${tests_repo}" "${tests_repo_dir}"
@ -439,9 +433,7 @@ call_make() {
[ "${#makeTargets[@]}" = "0" ] && makeTargets+=($targetType) [ "${#makeTargets[@]}" = "0" ] && makeTargets+=($targetType)
makeJobs= makeJobs=
if [ -z "$CI" ]; then
((makeJobs=$(nproc) / 2)) ((makeJobs=$(nproc) / 2))
fi
# When calling make, do not use the silent_run wrapper, pass the # When calling make, do not use the silent_run wrapper, pass the
# OSBUILDER_USE_CHRONIC instead. # OSBUILDER_USE_CHRONIC instead.
@ -585,7 +577,6 @@ test_distros()
# Skip failed distros # Skip failed distros
if [ -e "${tmp_rootfs}/${d}_fail" ]; then if [ -e "${tmp_rootfs}/${d}_fail" ]; then
info "Building rootfs for ${d} failed, not creating an image" info "Building rootfs for ${d} failed, not creating an image"
[ -n "$CI" ] && sudo -E touch "${ci_results_dir}/${d}_fail"
continue continue
fi fi
@ -607,7 +598,6 @@ test_distros()
# Skip failed distros # Skip failed distros
if [ -e "${tmp_rootfs}/${d}_fail" ]; then if [ -e "${tmp_rootfs}/${d}_fail" ]; then
info "Building rootfs for ${d} failed, not creating an initrd" info "Building rootfs for ${d} failed, not creating an initrd"
[ -n "$CI" ] && touch "${ci_results_dir}/${d}_fail"
continue continue
fi fi

View File

@ -60,7 +60,7 @@ copy-scripts-for-the-agent-build:
${MK_DIR}/kata-deploy-copy-libseccomp-installer.sh ${MK_DIR}/kata-deploy-copy-libseccomp-installer.sh
all-parallel: all-parallel:
${MAKE} -f $(MK_PATH) all -j $(shell nproc ${CI:+--ignore 1}) V= ${MAKE} -f $(MK_PATH) all -j $(shell nproc) V=
all: ${BASE_TARBALLS} all: ${BASE_TARBALLS}

View File

@ -79,7 +79,6 @@ docker build -q -t build-kata-deploy \
--build-arg ARCH="${ARCH}" \ --build-arg ARCH="${ARCH}" \
"${script_dir}/dockerbuild/" "${script_dir}/dockerbuild/"
CI="${CI:-}"
ARTEFACT_REGISTRY="${ARTEFACT_REGISTRY:-}" ARTEFACT_REGISTRY="${ARTEFACT_REGISTRY:-}"
ARTEFACT_REPOSITORY="${ARTEFACT_REPOSITORY:-}" ARTEFACT_REPOSITORY="${ARTEFACT_REPOSITORY:-}"
ARTEFACT_REGISTRY_USERNAME="${ARTEFACT_REGISTRY_USERNAME:-}" ARTEFACT_REGISTRY_USERNAME="${ARTEFACT_REGISTRY_USERNAME:-}"
@ -106,7 +105,6 @@ docker run \
-v $HOME/.docker:/root/.docker \ -v $HOME/.docker:/root/.docker \
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock \
-v "${kata_dir}:${kata_dir}" \ -v "${kata_dir}:${kata_dir}" \
--env CI="${CI}" \
--env USER=${USER} \ --env USER=${USER} \
--env ARTEFACT_REGISTRY="${ARTEFACT_REGISTRY}" \ --env ARTEFACT_REGISTRY="${ARTEFACT_REGISTRY}" \
--env ARTEFACT_REPOSITORY="${ARTEFACT_REPOSITORY}" \ --env ARTEFACT_REPOSITORY="${ARTEFACT_REPOSITORY}" \

View File

@ -470,9 +470,9 @@ build_kernel() {
[ -n "${arch_target}" ] || arch_target="$(uname -m)" [ -n "${arch_target}" ] || arch_target="$(uname -m)"
arch_target=$(arch_to_kernel "${arch_target}") arch_target=$(arch_to_kernel "${arch_target}")
pushd "${kernel_path}" >>/dev/null pushd "${kernel_path}" >>/dev/null
make -j $(nproc ${CI:+--ignore 1}) ARCH="${arch_target}" ${CROSS_BUILD_ARG} make -j $(nproc) ARCH="${arch_target}" ${CROSS_BUILD_ARG}
if [ "${conf_guest}" == "confidential" ]; then if [ "${conf_guest}" == "confidential" ]; then
make -j $(nproc ${CI:+--ignore 1}) INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=${kernel_path} modules_install make -j $(nproc) INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=${kernel_path} modules_install
fi fi
[ "$arch_target" != "powerpc" ] && ([ -e "arch/${arch_target}/boot/bzImage" ] || [ -e "arch/${arch_target}/boot/Image.gz" ]) [ "$arch_target" != "powerpc" ] && ([ -e "arch/${arch_target}/boot/bzImage" ] || [ -e "arch/${arch_target}/boot/Image.gz" ])
[ -e "vmlinux" ] [ -e "vmlinux" ]
@ -490,10 +490,10 @@ build_kernel_headers() {
if [ "$linux_headers" == "deb" ]; then if [ "$linux_headers" == "deb" ]; then
export KBUILD_BUILD_USER="${USER}" export KBUILD_BUILD_USER="${USER}"
make -j $(nproc ${CI:+--ignore 1}) bindeb-pkg ARCH="${arch_target}" make -j $(nproc) bindeb-pkg ARCH="${arch_target}"
fi fi
if [ "$linux_headers" == "rpm" ]; then if [ "$linux_headers" == "rpm" ]; then
make -j $(nproc ${CI:+--ignore 1}) rpm-pkg ARCH="${arch_target}" make -j $(nproc) rpm-pkg ARCH="${arch_target}"
fi fi
popd >>/dev/null popd >>/dev/null

View File

@ -1 +1 @@
133 134