build-seed: jenkins script for seeding build cache
Whenever a new node is added to jenkins it's best to pre-seed it with a
sstate and download cache based off of a master build. This ensures it
doesn't impact jobs when added as a general worker node for CI work.
Change-Id: I9c74a6fb63dc83c5d81a1176f022ec64240f64c8
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/jenkins/build-seed b/jenkins/build-seed
new file mode 100755
index 0000000..cb68b5f
--- /dev/null
+++ b/jenkins/build-seed
@@ -0,0 +1,47 @@
+#!/bin/bash -xe
+#
+# Purpose:
+# This script is responsible for building all CI machines to get a
+# new CI systems sstate and download caches setup.
+#
+# This script assumes openbmc-build-scripts has been cloned into
+# the WORKSPACE directory.
+#
+# Required Inputs:
+# WORKSPACE: Directory to run the builds out of
+
+export LANG=en_US.UTF8
+
+cd ${WORKSPACE}
+git clone https://github.com/openbmc/openbmc.git
+
+# Ensure everything is built on same filesystem
+export build_dir=${WORKSPACE}/build
+
+export target=rainier
+${WORKSPACE}/openbmc-build-scripts/build-setup.sh
+rm -rf ${WORKSPACE}/openbmc/build
+
+export target=gsj
+${WORKSPACE}/openbmc-build-scripts/build-setup.sh
+rm -rf ${WORKSPACE}/openbmc/build
+
+export target=palmetto
+${WORKSPACE}/openbmc-build-scripts/build-setup.sh
+rm -rf ${WORKSPACE}/openbmc/build
+
+export target=romulus
+${WORKSPACE}/openbmc-build-scripts/build-setup.sh
+rm -rf ${WORKSPACE}/openbmc/build
+
+export target=witherspoon
+${WORKSPACE}/openbmc-build-scripts/build-setup.sh
+rm -rf ${WORKSPACE}/openbmc/build
+
+export target=tiogapass
+${WORKSPACE}/openbmc-build-scripts/build-setup.sh
+rm -rf ${WORKSPACE}/openbmc/build
+
+export target=zaius
+${WORKSPACE}/openbmc-build-scripts/build-setup.sh
+rm -rf ${WORKSPACE}/openbmc/build