Install constrainted version of babel
Instead of using a hardcoded version of Babel, let's use the constrained version. This is still 2.2.0 right now but once it changes, it changes here as well. We can make this change now since Babel is tested as part of the requirements repository. When installing horizon, use the same branch as the project uses and use constraints here. Test babel changes in requirements now using a tox target. The job is only run when upper-constraints or one of the test files is changed - and only run for master and newton or newer. Change-Id: I15fa6a706323615d6072d8acaa859fea9bf35883 Depends-On: Iab7844ba748ecd84ec07ad4280b2317bd626fe9a
This commit is contained in:
parent
c1d0f5bb2a
commit
06609659c0
|
@ -7809,6 +7809,8 @@
|
|||
branch-override: master
|
||||
- 'gate-{name}-tox-{envlist}':
|
||||
envlist: validate
|
||||
- 'gate-{name}-tox-{envlist}':
|
||||
envlist: babel
|
||||
# This is a periodic job to ensure that our wheels are reasonably
|
||||
# up-to-date. Adding it to the requirements project seems to be the best
|
||||
# place to put it, though it's not strictly a requirement for
|
||||
|
|
|
@ -25,6 +25,18 @@ QUIET="--quiet"
|
|||
# Have invalid files been found?
|
||||
INVALID_PO_FILE=0
|
||||
|
||||
# Set up some branch dependent variables
|
||||
function init_branch {
|
||||
local branch=$1
|
||||
|
||||
UPPER_CONSTRAINTS=https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt
|
||||
if [[ "$branch" != "master" ]] ; then
|
||||
UPPER_CONSTRAINTS="${UPPER_CONSTRAINTS}?h=$branch"
|
||||
fi
|
||||
GIT_BRANCH=$branch
|
||||
}
|
||||
|
||||
|
||||
# Get a module name of a project
|
||||
function get_modulename {
|
||||
local project=$1
|
||||
|
@ -45,8 +57,8 @@ function setup_venv {
|
|||
trap "rm -rf $VENV" EXIT
|
||||
virtualenv $VENV
|
||||
|
||||
# Babel version 2.3.0 to 2.3.2 are broken
|
||||
$VENV/bin/pip install Babel==2.2.0
|
||||
# Install babel using global upper constraints.
|
||||
$VENV/bin/pip install 'Babel' -c $UPPER_CONSTRAINTS
|
||||
|
||||
# Get version, run this twice - the first one will install pbr
|
||||
# and get extra output.
|
||||
|
@ -315,15 +327,11 @@ function install_horizon {
|
|||
# setup_venv for $VENV.
|
||||
trap "rm -rf $VENV $root" EXIT
|
||||
|
||||
git clone --depth=1 git://git.openstack.org/openstack/horizon.git $root/horizon
|
||||
(cd ${root}/horizon && $VENV/bin/pip install .)
|
||||
|
||||
# Horizon has these as dependencies but let's be sure.
|
||||
# TODO(amotoki): Pull required versions from g-r.
|
||||
|
||||
# TODO(jagerandi): Install Babel 2.2.0 for now since 2.3.2 does
|
||||
# not extract all strings.
|
||||
$VENV/bin/pip install Babel==2.2.0 django-babel
|
||||
# Checkout same branch of horizon as the project - including
|
||||
# same constraints.
|
||||
git clone --depth=1 --branch $GIT_BRANCH \
|
||||
git://git.openstack.org/openstack/horizon.git $root/horizon
|
||||
(cd ${root}/horizon && $VENV/bin/pip install -c $UPPER_CONSTRAINTS .)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ ZANATA_VERSION=${BRANCH//\//-}
|
|||
|
||||
source /usr/local/jenkins/slave_scripts/common_translation_update.sh
|
||||
|
||||
init_branch $BRANCH
|
||||
|
||||
# Propose updates for manuals
|
||||
function propose_manuals {
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ ZANATA_VERSION=${ZUUL_REFNAME//\//-}
|
|||
|
||||
source /usr/local/jenkins/slave_scripts/common_translation_update.sh
|
||||
|
||||
init_branch $ZUUL_REFNAME
|
||||
|
||||
if ! /usr/local/jenkins/slave_scripts/query-zanata-project-version.py \
|
||||
-p $PROJECT -v $ZANATA_VERSION; then
|
||||
# Exit successfully so that lack of a version doesn't cause the jenkins
|
||||
|
|
|
@ -1260,6 +1260,13 @@ jobs:
|
|||
- name: gate-requirements-tox-validate
|
||||
branch: ^(?!stable/kilo).*$
|
||||
|
||||
- name: gate-requirements-tox-babel
|
||||
branch: ^(?!stable/(?:kilo|liberty|mitaka)).*$
|
||||
files:
|
||||
- '^babel-test/.*'
|
||||
- '^tox.ini'
|
||||
- '^upper-constraints.txt'
|
||||
|
||||
- name: gate-tempest-dsvm-full
|
||||
queue-name: integrated
|
||||
|
||||
|
@ -10604,6 +10611,7 @@ projects:
|
|||
- gate-requirements-python27
|
||||
- gate-requirements-integration-dsvm
|
||||
- gate-requirements-integration-dsvm-resolver
|
||||
- gate-requirements-tox-babel
|
||||
- gate-requirements-tox-validate
|
||||
- gate-grenade-dsvm-multinode
|
||||
# NOTE(mriedem): The multinode and partial-ncpu jobs should be mutually
|
||||
|
@ -10616,6 +10624,7 @@ projects:
|
|||
- gate-requirements-pep8
|
||||
- gate-requirements-python27
|
||||
- gate-requirements-integration-dsvm
|
||||
- gate-requirements-tox-babel
|
||||
- gate-requirements-tox-validate
|
||||
- gate-grenade-dsvm-multinode
|
||||
- gate-grenade-dsvm-partial-ncpu
|
||||
|
|
Loading…
Reference in New Issue