Remove Kubernetes support.
Change-Id: Id7d8ce89b3164d2688678d4b98d88a5e323ced18
Signed-off-by: Michael Shepos <shepos@us.ibm.com>
diff --git a/build-setup.sh b/build-setup.sh
index 1550af6..8eff5f5 100755
--- a/build-setup.sh
+++ b/build-setup.sh
@@ -1,8 +1,7 @@
#!/bin/bash
###############################################################################
#
-# This build script is for running the OpenBMC builds as containers with the
-# option of launching the containers with Docker or Kubernetes.
+# This build script is for running the OpenBMC builds as Docker containers.
#
###############################################################################
#
@@ -39,38 +38,9 @@
# Default: "qemu"
#
# Deployment Variables:
-# launch ""|job|pod
-# Can be left blank to launch the container via Docker
-# Job lets you keep a copy of job and container logs on the
-# api, can be useful if not using Jenkins as you can run the
-# job again via the api without needing this script.
-# Pod launches a container which runs to completion without
-# saving anything to the api when it completes.
# obmc_dir Path of the OpenBMC repo directory used as a reference
# for the build inside the container.
# Default: "${WORKSPACE}/openbmc"
-# ssc_dir Path to use as the BitBake shared-state cache directory.
-# Default: "/home/${USER}"
-# xtrct_small_copy_dir
-# Directory within build_dir that should be copied to
-# xtrct_path. The directory and all parents up to, but not
-# including, build_dir will be copied. For example, if
-# build_dir is set to "/tmp/openbmc" and this is set to
-# "build/tmp", the directory at xtrct_path will have the
-# following directory structure:
-# xtrct_path
-# | - build
-# | - tmp
-# ...
-# Can also be set to the empty string to copy the entire
-# contents of build_dir to xtrct_path.
-# Default: "deploy/images".
-# xtrct_path Path where the build_dir contents will be copied out to
-# when the build completes.
-# Default: "${obmc_dir}/build/tmp"
-# xtrct_copy_timeout Timeout (in seconds) for copying the contents of
-# build_dir to xtrct_path.
-# Default: "300"
#
###############################################################################
# Trace bash processing. Set -e so when a step fails, we fail the build
@@ -89,12 +59,11 @@
target=${target:-qemu}
# Deployment variables
-launch=${launch:-}
obmc_dir=${obmc_dir:-${WORKSPACE}/openbmc}
-ssc_dir=${ssc_dir:-${HOME}}
-xtrct_small_copy_dir=${xtrct_small_copy_dir:-deploy/images}
-xtrct_path=${xtrct_path:-${obmc_dir}/build/tmp}
-xtrct_copy_timeout=${xtrct_copy_timeout:-300}
+ssc_dir=${HOME}
+xtrct_small_copy_dir="deploy/images"
+xtrct_path="${obmc_dir}/build/tmp"
+xtrct_copy_timeout="300"
PROXY=""
@@ -363,41 +332,29 @@
# Build the Docker image
docker build -t ${img_name} - <<< "${Dockerfile}"
-# Determine if the build container will be launched with Docker or Kubernetes
-if [[ "${launch}" == "" ]]; then
-
- # If obmc_dir or ssc_dir are ${HOME} or a subdirectory they will not be mounted
- mount_obmc_dir="-v ""${obmc_dir}"":""${obmc_dir}"" "
- mount_ssc_dir="-v ""${ssc_dir}"":""${ssc_dir}"" "
- if [[ "${obmc_dir}" = "${HOME}/"* || "${obmc_dir}" = "${HOME}" ]];then
- mount_obmc_dir=""
- fi
- if [[ "${ssc_dir}" = "${HOME}/"* || "${ssc_dir}" = "${HOME}" ]];then
- mount_ssc_dir=""
- fi
-
- # Run the Docker container, execute the build.sh script
- docker run \
- --cap-add=sys_admin \
- --net=host \
- --rm=true \
- -e WORKSPACE=${WORKSPACE} \
- -w "${HOME}" \
- -v "${HOME}":"${HOME}" \
- ${mount_obmc_dir} \
- ${mount_ssc_dir} \
- --cpus="$num_cpu" \
- -t ${img_name} \
- ${WORKSPACE}/build.sh
-
-elif [[ "${launch}" == "job" || "${launch}" == "pod" ]]; then
-
- # Source and run the helper script to launch the pod or job
- . ${build_scripts_dir}/kubernetes/kubernetes-launch.sh OpenBMC-build true true
-
-else
- echo "Launch Parameter is invalid"
+# If obmc_dir or ssc_dir are ${HOME} or a subdirectory they will not be mounted
+mount_obmc_dir="-v ""${obmc_dir}"":""${obmc_dir}"" "
+mount_ssc_dir="-v ""${ssc_dir}"":""${ssc_dir}"" "
+if [[ "${obmc_dir}" = "${HOME}/"* || "${obmc_dir}" = "${HOME}" ]];then
+mount_obmc_dir=""
fi
+if [[ "${ssc_dir}" = "${HOME}/"* || "${ssc_dir}" = "${HOME}" ]];then
+mount_ssc_dir=""
+fi
+
+# Run the Docker container, execute the build.sh script
+docker run \
+--cap-add=sys_admin \
+--net=host \
+--rm=true \
+-e WORKSPACE=${WORKSPACE} \
+-w "${HOME}" \
+-v "${HOME}":"${HOME}" \
+${mount_obmc_dir} \
+${mount_ssc_dir} \
+--cpus="$num_cpu" \
+-t ${img_name} \
+${WORKSPACE}/build.sh
# To maintain function of resources that used an older path, add a link
ln -sf ${xtrct_path}/deploy ${WORKSPACE}/deploy