diff --git a/bootstrap.sh b/bootstrap.sh index 89925c75..c163c0a0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -11,3 +11,43 @@ sudo dpkg -i $chefdk ## workaround to fix redhat fauxhai permission issue (can be removed with fauxhai > 2.3 in chefdk) sudo chef exec ruby -e "require 'fauxhai'; Fauxhai.mock(platform:'redhat', version:'7.1')" + +# The following will handle cross cookbook patch dependencies via the Depends-On in commit message + +# ZUUL_CHANGES has a ^ separated list of patches, the last being the current patch. +# The Depends_On will add patches to the front of this list. +echo $ZUUL_CHANGES +# Convert string list to array +cookbooks=(${ZUUL_CHANGES//^/ }) +# Remove the last one as it's the current cookbook +# TODO(MRV) At some point we could consider removing the gerrit-git-prep step from the rake job +# and also doing that patch clone with zuul-cloner. After gerrit-git-prep is removed, need to +# remove this unset line and adjust the clone map to have the base patch put into the current dir. +unset cookbooks[${#cookbooks[@]}-1] + +# Create clone map +cat > clonemap.yaml <