Merge "add big warning for extras.d usage"

This commit is contained in:
Jenkins 2015-10-08 05:42:48 +00:00 committed by Gerrit Code Review
commit d111c2174e

View File

@ -179,6 +179,12 @@ function die_if_not_set {
$xtrace
}
function deprecated {
local text=$1
DEPRECATED_TEXT+="\n$text"
echo "WARNING: $text"
}
# Prints line number and "message" in error format
# err $LINENO "message"
function err {
@ -1699,6 +1705,16 @@ function run_phase {
if [[ -d $TOP_DIR/extras.d ]]; then
for i in $TOP_DIR/extras.d/*.sh; do
[[ -r $i ]] && source $i $mode $phase
# NOTE(sdague): generate a big warning about using
# extras.d in an unsupported way which will let us track
# unsupported usage in the gate.
local exceptions="50-ironic.sh 60-ceph.sh 80-tempest.sh"
local extra=$(basename $i)
if [[ ! ( $exceptions =~ "$extra" ) ]]; then
deprecated "extras.d support is being removed in Mitaka-1"
deprecated "jobs for project $extra will break after that point"
deprecated "please move project to a supported devstack plugin model"
fi
done
fi
# the source phase corresponds to settings loading in plugins