Support for alternate trunk name (not master)
Commit 537a292674
introduced support
for having trunk named something other than master.
The name "master" is still hardcoded in the test-matrix, and in
the list of allowed branches. Adding support for an arbitrary
features file via DEVSTACK_GATE_FEATURE_MATRIX env variable.
The list of allowed branches is now parsed from the feature matrix.
Change-Id: Ic07c958e1630f7e62d9ff35b0add40a5d2b1548b
This commit is contained in:
parent
d7ea2342f5
commit
d25f9ab414
|
@ -121,6 +121,9 @@ fi
|
|||
rm -rf $WORKSPACE/logs
|
||||
mkdir -p $WORKSPACE/logs
|
||||
|
||||
# The feature matrix to select devstack-gate components
|
||||
export DEVSTACK_GATE_FEATURE_MATRIX=${DEVSTACK_GATE_FEATURE_MATRIX:-features.yaml}
|
||||
|
||||
# Set to 1 to run the Tempest test suite
|
||||
export DEVSTACK_GATE_TEMPEST=${DEVSTACK_GATE_TEMPEST:-0}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ function setup_localrc() {
|
|||
rm -f localrc
|
||||
fi
|
||||
|
||||
MY_ENABLED_SERVICES=`cd $BASE/new/devstack-gate && ./test-matrix.py -b $LOCALRC_BRANCH`
|
||||
MY_ENABLED_SERVICES=`cd $BASE/new/devstack-gate && ./test-matrix.py -b $LOCALRC_BRANCH -f $DEVSTACK_GATE_FEATURE_MATRIX`
|
||||
|
||||
# Allow optional injection of ENABLED_SERVICES from the calling context
|
||||
if [ ! -z $ENABLED_SERVICES ] ; then
|
||||
|
|
|
@ -33,6 +33,12 @@ config:
|
|||
zeromq:
|
||||
features: [zeromq]
|
||||
|
||||
branches:
|
||||
# The value of ""default" is the name of the "trunk" branch
|
||||
default: master
|
||||
# Normalized branch names only here, e.g. stable/icehouse => icehouse
|
||||
allowed: [master, icehouse, havana]
|
||||
|
||||
features:
|
||||
default:
|
||||
base:
|
||||
|
|
|
@ -21,7 +21,7 @@ import sys
|
|||
import yaml
|
||||
|
||||
GRID = None
|
||||
ALLOWED_BRANCHES = ('havana', 'icehouse', 'master')
|
||||
ALLOWED_BRANCHES = []
|
||||
|
||||
FORMAT = '%(asctime)s %(levelname)s: %(message)s'
|
||||
logging.basicConfig(format=FORMAT)
|
||||
|
@ -37,7 +37,7 @@ def normalize_branch(branch):
|
|||
if branch.startswith("feature/"):
|
||||
# Feature branches chase master and should be tested
|
||||
# as if they were the master branch.
|
||||
branch = 'master'
|
||||
branch = GRID['branches']['default']
|
||||
elif branch.startswith("stable/"):
|
||||
branch = branch[len("stable/"):]
|
||||
if branch not in ALLOWED_BRANCHES:
|
||||
|
@ -112,8 +112,10 @@ of environmental feature definitions and flags.
|
|||
|
||||
def main():
|
||||
global GRID
|
||||
global ALLOWED_BRANCHES
|
||||
opts = get_opts()
|
||||
GRID = parse_features(opts.features)
|
||||
ALLOWED_BRANCHES = GRID['branches']['allowed']
|
||||
branch = normalize_branch(opts.branch)
|
||||
|
||||
features = calc_features(branch, configs_from_env())
|
||||
|
|
Loading…
Reference in New Issue