Adjust the headers and variables to be alphabetical
Change-Id: I179d17b2413be92f568921c2cd102a1e72895681
Signed-off-by: Alanny Lopez <alannyglopez@gmail.com>
diff --git a/build-jenkins.sh b/build-jenkins.sh
index 2442a2a..a652e1e 100755
--- a/build-jenkins.sh
+++ b/build-jenkins.sh
@@ -19,22 +19,22 @@
# Default: "50000"
# http_port The port used as Jenkins UI port.
# Default: "8080"
-# img_tag The tag of the OpenJDK image used as the base image.
-# Default: "/8-jdk"
-# j_vrsn The version of the Jenkins war file you wish to use.
-# Default: "2.60.3"
-# j_user Username tag the container will use to run Jenkins.
-# Default: "jenkins"
-# j_group Group name tag the container will use to run Jenkins.
-# Default: "jenkins"
-# j_uid Jenkins user ID the container will use to run Jenkins.
-# Default: "1000"
-# j_gif Jenkins group ID the container will use to run Jenkins.
-# Default: "1000"
-# j_home Directory used as the Jenkins Home in the container.
-# Default: "/var/jenkins_home"
# img_name The name given to the Docker image when it is built.
# Default: "openbmc/jenkins-master-${ARCH}:${JENKINS_VRSN}"
+# img_tag The tag of the OpenJDK image used as the base image.
+# Default: "/8-jdk"
+# j_gid Jenkins group ID the container will use to run Jenkins.
+# Default: "1000"
+# j_group Group name tag the container will use to run Jenkins.
+# Default: "jenkins"
+# j_home Directory used as the Jenkins Home in the container.
+# Default: "/var/jenkins_home"
+# j_uid Jenkins user ID the container will use to run Jenkins.
+# Default: "1000"
+# j_user Username tag the container will use to run Jenkins.
+# Default: "jenkins"
+# j_vrsn The version of the Jenkins war file you wish to use.
+# Default: "2.60.3"
# tini_vrsn The version of Tini to use in the Dockerfile, 0.16.1 is
# the first release with ppc64le release support.
# Default: "0.16.1"
@@ -46,12 +46,12 @@
# Default: "${WORKSPACE}/jenkins_home"
# host_import_mnt The directory on the host used to import extra files.
# Default: "", import mount is ignored if not set
-# jenkins_options What will be passed as the environment variable for the
-# JENKINS_OPTS environment variable.
-# Default: "--prefix=/jenkins"
# java_options What will be passed as the environment variable for the
# JAVA_OPTS environment variable.
# Default: "-Xmx4096m"
+# jenkins_options What will be passed as the environment variable for the
+# JENKINS_OPTS environment variable.
+# Default: "--prefix=/jenkins"
# launch docker|k8s
# Method in which the container will be launched. Either as
# a Docker container launched via Docker, or by using a
@@ -59,32 +59,33 @@
# Default: "docker"
#
################################################################################
-build_scripts_dir=${build_scripts_dir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
-
set -xeo pipefail
ARCH=$(uname -m)
-# Launch Variables
+# Script Variables
+build_scripts_dir=${build_scripts_dir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
workspace=${workspace:-${HOME}/jenkins-build-${RANDOM}}
-launch=${launch:-docker}
-home_mnt=${home_mnt:-${workspace}/jenkins_home}
-host_import_mnt=${host_import_mnt:-}
-cont_import_mnt=${cont_import_mnt:-/mnt/jenkins_import}
-jenkins_options=${jenkins_options:-"--prefix=/jenkins"}
-java_options=${java_options:-"-Xmx4096m"}
-# Dockerfile Variables
+# Jenkins Dockerfile Variables
+agent_port=${agent_port:-50000}
+http_port=${http_port:-8080}
+img_name=${img_name:-openbmc/jenkins-master-${ARCH}:${j_vrsn}}
+j_gid=${j_gid:-1000}
+j_group=${j_group:-jenkins}
+j_home=${j_home:-/var/jenkins_home}
+j_uid=${j_uid:-1000}
+j_user=${j_user:-jenkins}
+j_vrsn=${j_vrsn:-2.60.3}
img_tag=${img_tag:-8-jdk}
tini_vrsn=${tini_vrsn:-0.16.1}
-j_vrsn=${j_vrsn:-2.60.3}
-j_user=${j_user:-jenkins}
-j_group=${j_group:-jenkins}
-j_uid=${j_uid:-1000}
-j_gid=${j_gid:-1000}
-j_home=${j_home:-/var/jenkins_home}
-http_port=${http_port:-8080}
-agent_port=${agent_port:-50000}
-img_name=${img_name:-openbmc/jenkins-master-${ARCH}:${j_vrsn}}
+
+# Deployment Variables
+cont_import_mnt=${cont_import_mnt:-/mnt/jenkins_import}
+home_mnt=${home_mnt:-${workspace}/jenkins_home}
+host_import_mnt=${host_import_mnt:-}
+java_options=${java_options:-"-Xmx4096m"}
+jenkins_options=${jenkins_options:-"--prefix=/jenkins"}
+launch=${launch:-docker}
# Save the Jenkins.war URL to a variable and SHA if we care about verification
j_url=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/${j_vrsn}/jenkins-war-${j_vrsn}.war
diff --git a/build-setup.sh b/build-setup.sh
index 30e1c42..d62e972 100755
--- a/build-setup.sh
+++ b/build-setup.sh
@@ -54,22 +54,26 @@
# Default: "${obmc_dir}/build/tmp"
#
###############################################################################
-build_scripts_dir=${build_scripts_dir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
-
# Trace bash processing. Set -e so when a step fails, we fail the build
set -xeo pipefail
-# Default variables
-target=${target:-qemu}
+# Script Variables:
+build_scripts_dir=${build_scripts_dir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
+http_proxy=${http_proxy:-}
+WORKSPACE=${WORKSPACE:-${HOME}/${RANDOM}${RANDOM}}
+
+# Docker Image Build Variables:
+build_dir=${build_dir:-/tmp/openbmc}
distro=${distro:-ubuntu}
img_tag=${img_tag:-latest}
-build_dir=${build_dir:-/tmp/openbmc}
-ssc_dir=${ssc_dir:-${HOME}}
-WORKSPACE=${WORKSPACE:-${HOME}/${RANDOM}${RANDOM}}
-obmc_dir=${obmc_dir:-${WORKSPACE}/openbmc}
-xtrct_path=${xtrct_path:-${obmc_dir}/build/tmp}
+target=${target:-qemu}
+
+# Deployment variables
launch=${launch:-}
-http_proxy=${http_proxy:-}
+obmc_dir=${obmc_dir:-${WORKSPACE}/openbmc}
+ssc_dir=${ssc_dir:-${HOME}}
+xtrct_path=${xtrct_path:-${obmc_dir}/build/tmp}
+
PROXY=""
# Determine the architecture
diff --git a/kubernetes/kubernetes-launch.sh b/kubernetes/kubernetes-launch.sh
index a9b0c5f..8ddfe2c 100755
--- a/kubernetes/kubernetes-launch.sh
+++ b/kubernetes/kubernetes-launch.sh
@@ -26,8 +26,6 @@
# Kubernetes Variables:
# img_pl_sec The image pull secret used to access registry if needed
# Default: "regkey"
-# registry The registry to use to pull and push images
-# Default: "master.cfc:8500/openbmc/""
# job_timeout The amount of time in seconds that the build will wait for
# the job to be created in the api of the cluster.
# Default: "60"
@@ -36,6 +34,8 @@
# pod_timeout The amount of time in seconds that the build will wait for
# the pod to start running on the cluster.
# Default: "600"
+# registry The registry to use to pull and push images
+# Default: "master.cfc:8500/openbmc/""
#
# YAML File Variables (No Defaults):
# img_name The name the image that will be passed to the kubernetes
@@ -67,20 +67,22 @@
# Kubernetes version to a version that doesn't need this.
#
###############################################################################
+
+# Script Variables
build_scripts_dir=${build_scripts_dir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."}
# Kubernetes Variables
-namespace=${namespace:-openbmc}
-registry=${registry:-master.cfc:8500/openbmc/}
img_pl_sec=${img_pl_sec:-regkey}
job_timeout=${job_timeout:-60}
+namespace=${namespace:-openbmc}
pod_timeout=${pod_timeout:-600}
+registry=${registry:-master.cfc:8500/openbmc/}
-# Options which decide script behavior
+# Deployment Option Variables:
invoker=${invoker:-${1}}
+launch=${launch:-${4}}
log=${log:-${2}}
purge=${purge:-${3}}
-launch=${launch:-${4}}
workaround=${workaround:-${log}}
# Set the variables for the specific invoker to fill in the YAML template
diff --git a/qemu-build.sh b/qemu-build.sh
index 9377617..49c799e 100755
--- a/qemu-build.sh
+++ b/qemu-build.sh
@@ -37,20 +37,25 @@
# saving anything to the api when it completes.
#
###############################################################################
-build_scripts_dir=${build_scripts_dir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
-
# Trace bash processing
set -x
-# Default variables
-WORKSPACE=${WORKSPACE:-${HOME}/${RANDOM}${RANDOM}}
+# Script Variables:
+build_scripts_dir=${build_scripts_dir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
http_proxy=${http_proxy:-}
-launch=${launch:-}
qemu_dir=${qemu_dir:-${WORKSPACE}/qemu}
+WORKSPACE=${WORKSPACE:-${HOME}/${RANDOM}${RANDOM}}
+
+# Docker Image Build Variables:
build_dir=${build_dir:-/tmp/qemu}
-ARCH=$(uname -m)
img_name=${img_name:-qemu-build:${ARCH}}
+# Deployment Variables
+launch=${launch:-}
+
+# Determine the architecture
+ARCH=$(uname -m)
+
# Timestamp for job
echo "Build started, $(date)"