X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2Fbuild.sh;h=9ae43f30f43be1abb4020ee6fce01a3c4668c9fd;hb=6be5639d8ce2f6e282db6f3d19699a341b9b491c;hp=99de559a03b7bb407a15411340f100345acc08e8;hpb=ada5751e99a34ca0b8639785f9b1a34aa06625ac;p=armband.git diff --git a/ci/build.sh b/ci/build.sh index 99de559a..9ae43f30 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -5,38 +5,15 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 -error_exit() { - echo "$@" >&2 - exit 1 -} - -write_gitinfo() { - git_url=$(git config --get remote.origin.url) - git_rev=$(git rev-parse HEAD) - echo "$git_url: $git_rev" -} - -if [ $# -eq 0 ]; then - OUTPUT_DIR=$(pwd) -else - OUTPUT_DIR=$(readlink -f $1) - shift -fi - -mkdir -p $OUTPUT_DIR || error_exit "Could not create directory $OUTPUT_DIR" - -echo "Building armband, output dir: $OUTPUT_DIR" -cd .. +set -e SCRIPT_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]})) -BUILD_BASE="${SCRIPT_DIR}/upstream/fuel/build" -RESULT_DIR="${BUILD_BASE}/release" - -make release || error_exit "Make release failed" +BUILD_BASE=$(readlink -e ${SCRIPT_DIR}/../upstream/fuel/build) -write_gitinfo >> ${BUILD_BASE}/gitinfo.txt +export ARMBAND_BASE=$(readlink -e ${SCRIPT_DIR}/..) +export OPNFV_GIT_SHA=$(git rev-parse HEAD) +export LOCAL_CACHE_ARCH_NAME="armband-cache" -echo "Copying results to $OUTPUT_DIR" -sort ${BUILD_BASE}/gitinfo*.txt > ${OUTPUT_DIR}/gitinfo.txt -cp ${RESULT_DIR}/*.iso ${OUTPUT_DIR}/ -cp ${RESULT_DIR}/*.iso.txt ${OUTPUT_DIR}/ +# Initialize Armband git submodules & apply patches first +make -C ${ARMBAND_BASE} submodules-clean patches-import +cd ${ARMBAND_BASE}/upstream/fuel/ci && ./build.sh $*