Add run-meta-ci to repository
This is the script that will be executed by:
https://openpower.xyz/job/run-meta-ci/
There are def some improvement to be added here but
for now would like to just get what is there currently.
Testing:
- Extracted this commit into run-meta ci jenkins job and ran it with
the other script code commented out. Verified all still built as
expected.
Change-Id: Ida2f86bb324e96f9c1baf2a1641a398d3c3b3dc3
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/jenkins/run-meta-ci b/jenkins/run-meta-ci
new file mode 100755
index 0000000..8f05c62
--- /dev/null
+++ b/jenkins/run-meta-ci
@@ -0,0 +1,37 @@
+#!/bin/bash -xe
+#
+# Purpose:
+# This script is responsible for setting up a openbmc/openbmc build
+# environment for a meta-* repository.
+#
+# Required Inputs:
+# WORKSPACE: Directory which contains the extracted meta-*
+# layer test is running against
+# GERRIT_PROJECT: openbmc/meta-* layer under test (i.e. openbmc/meta-phosphor)
+
+export LANG=en_US.UTF8
+cd $WORKSPACE
+
+# Grab this for the downstream job
+git clone https://github.com/openbmc/openbmc-test-automation.git
+
+export META_REPO=`basename $GERRIT_PROJECT`
+
+# Move the extracted meta layer to a dir based on it's meta-* name
+mv $GERRIT_PROJECT $META_REPO
+
+# Clone openbmc/openbmc
+git clone https://github.com/openbmc/openbmc.git
+
+# Make sure meta-* directory is there
+mkdir -p ./openbmc/$META_REPO/
+
+# Clean out the dir to handle delete/rename of files
+rm -rf ./openbmc/$META_REPO/*
+
+# Copy the extracted meta code into it
+cp -Rf $META_REPO/* ./openbmc/$META_REPO/
+
+# Create a dummy commit so code update will pick it up
+cd openbmc
+git add -A && git commit -m "Dummy commit to cause code update"