From: Daniel Farrell Date: Fri, 3 Mar 2017 18:09:35 +0000 (-0500) Subject: Add/cleanup inline docs for multipatch builder sh X-Git-Tag: release/carbon~114^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=b901b41397b6d5ba6cdb29be4a3af4668853d013;p=releng%2Fbuilder.git Add/cleanup inline docs for multipatch builder sh Change-Id: I914ee444c2d7ebd5e5bfe2b5979ae87e956c6618 Signed-off-by: Daniel Farrell --- diff --git a/jjb/integration/include-raw-integration-multipatch-distribution-test.sh b/jjb/integration/include-raw-integration-multipatch-distribution-test.sh index 8137a6603c..f4d5cfb449 100644 --- a/jjb/integration/include-raw-integration-multipatch-distribution-test.sh +++ b/jjb/integration/include-raw-integration-multipatch-distribution-test.sh @@ -32,19 +32,32 @@ export GIT_COMMITTER_NAME="Multipatch Job" # TODO: Is "patches" still the correct word? IFS=',' read -ra PATCHES <<< "${PATCHES_TO_BUILD}" -# For each patch, clone the project. -# Optionally checkout a specific patch set. -# Also optionally, cherry-pick series of patch sets. -# Each patch is found in the ${PATCHES_TO_BUILD} variable -# as a comma separated list of project[=checkout][:cherry-pick]* values +# For each patch: +# * Clone the project. +# * Optionally, checkout a specific (typically unmerged) Gerrit patch. If none, +# default to Integration/Distribution branch via {branch} JJB param. +# * Also optionally, cherry-pick series of patchs on top of the checkout. # -# Example: PATCHES_TO_BUILD='odlparent=45/30045/2,yangtools:53/26853/25,mdsal,controller=61/29761/5:45/29645/6,bgpcep:39/30239/1:59/30059/2' +# Each patch is found in the ${PATCHES_TO_BUILD} variable as a comma separated +# list of project[=checkout][:cherry-pick]* values. # +# Checkout a (typically unmerged) Gerrit patch on top of odlparent's git clone: +# +# PATCHES_TO_BUILD='odlparent=45/30045/2' +# +# Checkout patchs for both odlparent and yangtools. +# +# PATCHES_TO_BUILD='odlparent=45/30045/2,yangtools:53/26853/25' +# +# Checkout a patch for controller, cherry-pick another patch on top of it. +# +# PATCHES_TO_BUILD='controller=61/29761/5:45/29645/6' distribution_status="not_included" -for patch_code in "${PATCHES[@]}" +for patch in "${PATCHES[@]}" do - echo "working on ${patch_code}" - PROJECT=`echo ${patch_code} | cut -d\: -f 1 | cut -d\= -f 1` + echo "working on ${patch}" + # For patch=controller=61/29761/5:45/29645/6, this gives controller + PROJECT=`echo ${patch} | cut -d\: -f 1 | cut -d\= -f 1` if [ "${PROJECT}" == "integration/distribution" ]; then distribution_status="included" fi @@ -53,7 +66,8 @@ do git clone "https://git.opendaylight.org/gerrit/p/${PROJECT}" echo "${PROJECT_SHORTNAME}" >> ${POM_FILE} cd ${PROJECT_SHORTNAME} - CHECKOUT=`echo ${patch_code} | cut -d\= -s -f 2 | cut -d\: -f 1` + # For patch=controller=61/29761/5:45/29645/6, this gives 61/29761/5 + CHECKOUT=`echo ${patch} | cut -d\= -s -f 2 | cut -d\: -f 1` if [ "x${CHECKOUT}" != "x" ]; then echo "checking out ${CHECKOUT}" git fetch "https://git.opendaylight.org/gerrit/${PROJECT}" "refs/changes/$CHECKOUT" @@ -62,7 +76,8 @@ do echo "checking out ${DISTRIBUTION_BRANCH_TO_BUILD}" git checkout "${DISTRIBUTION_BRANCH_TO_BUILD}" fi - PICK_SEGMENT=`echo "${patch_code}" | cut -d\: -s -f 2-` + # For patch=controller=61/29761/5:45/29645/6, this gives 45/29645/6 + PICK_SEGMENT=`echo "${patch}" | cut -d\: -s -f 2-` IFS=':' read -ra PICKS <<< "${PICK_SEGMENT}" for pick in "${PICKS[@]}" do