releases/tools/transition_series.sh
Sean McGinnis 8b1a9ada18 Add script to transition entire series to EM or EOL
Probably mostly useful for extended maintenance, but this adds a script
that can add a $series-em tag to all deliverables of a series as we
claimed we would do in the extended maintenance policy changes [0].

[0] https://docs.openstack.org/project-team-guide/stable-branches.html#extended-maintenance

Change-Id: Ibeec88bf4e81b97c523f416669e07a10aa86a53b
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-04-11 06:44:55 -05:00

51 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
#
# Convenience wrapper transition a release cycle to its next stable
# phase.
TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASEDIR=$(dirname $TOOLSDIR)
#source $TOOLSDIR/functions
if [[ $# -lt 2 ]]; then
echo "Usage: $(basename $0) <series> <tag>"
echo ""
echo "<tag> either 'em' or 'eol'"
exit 1
fi
series="$1"
tag="$2"
if [[ -z "$VIRTUAL_ENV" ]]; then
if [[ ! -d $BASEDIR/.tox/venv ]]; then
(cd $BASEDIR && tox -e venv --notest)
fi
source $BASEDIR/.tox/venv/bin/activate
fi
echo "Finding deliverables for $series series..."
deliverables=$(list-deliverables --series $series)
errors=()
for deliverable in $deliverables; do
echo "Adding $series-$tag tag for $deliverable..."
new-release $series $deliverable $tag
if [[ $? -ne 0 ]]; then
echo ""
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "$deliverable failed to update"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ""
errors+=("$deliverable")
fi
done
if [[ ${#errors[@]} -ne 0 ]]; then
echo ""
echo "Errors adding tags to some deliverables. Check the following:"
echo " ${errors[@]}"
exit 1
fi