Merge "Add stein support to emit releases script"

This commit is contained in:
Zuul 2019-04-02 21:12:28 +00:00 committed by Gerrit Code Review
commit 36fa313242
4 changed files with 150 additions and 11 deletions

View File

@ -39,7 +39,7 @@ import requests
import yaml
# Define releases
RELEASES = ['newton', 'ocata', 'pike', 'queens', 'rocky', 'master']
RELEASES = ['newton', 'ocata', 'pike', 'queens', 'rocky', 'stein', 'master']
# Define long term releases
LONG_TERM_SUPPORT_RELEASES = ['queens']
UNSUPPORTED_STANDALONE = ['newton', 'ocata', 'pike', 'queens', 'rocky']

View File

@ -34,7 +34,7 @@ def hash_mock_setup():
'undercloud_install_hash': 'current-tripleo',
'undercloud_target_release': 'master',
'undercloud_target_hash': 'current-tripleo',
'overcloud_deploy_release': 'rocky',
'overcloud_deploy_release': 'stein',
'overcloud_deploy_hash': 'old-current-tripleo',
'overcloud_target_release': 'master',
'overcloud_target_hash': 'current-tripleo',
@ -44,6 +44,21 @@ def hash_mock_setup():
'standalone_target_release': 'master',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
}), ('stein', {
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'current-tripleo',
'undercloud_target_release': 'stein',
'undercloud_target_hash': 'current-tripleo',
'overcloud_deploy_release': 'rocky',
'overcloud_deploy_hash': 'old-current-tripleo',
'overcloud_target_release': 'stein',
'overcloud_target_hash': 'current-tripleo',
'standalone_deploy_release': 'stein',
'standalone_deploy_newest_hash': 'current',
'standalone_deploy_hash': 'current-tripleo',
'standalone_target_release': 'stein',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
}), ('rocky', {
'undercloud_install_release': 'rocky',
'undercloud_install_hash': 'current-tripleo',
@ -89,7 +104,7 @@ def test_overcloud_upgrade_is_n_minus_one_to_n(
'undercloud_install_hash': 'current-tripleo',
'undercloud_target_release': 'master',
'undercloud_target_hash': 'current-tripleo',
'overcloud_deploy_release': 'rocky',
'overcloud_deploy_release': 'stein',
'overcloud_deploy_hash': 'old-current-tripleo',
'overcloud_target_release': 'master',
'overcloud_target_hash': 'current-tripleo',
@ -99,6 +114,21 @@ def test_overcloud_upgrade_is_n_minus_one_to_n(
'standalone_target_release': 'master',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
}), ('stein', {
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'current-tripleo',
'undercloud_target_release': 'stein',
'undercloud_target_hash': 'current-tripleo',
'overcloud_deploy_release': 'rocky',
'overcloud_deploy_hash': 'old-current-tripleo',
'overcloud_target_release': 'stein',
'overcloud_target_hash': 'current-tripleo',
'standalone_deploy_release': 'stein',
'standalone_deploy_newest_hash': 'current',
'standalone_deploy_hash': 'current-tripleo',
'standalone_target_release': 'stein',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
}), ('rocky', {
'undercloud_install_release': 'rocky',
'undercloud_install_hash': 'current-tripleo',
@ -229,7 +259,7 @@ def test_period_ffu_overcloud_upgrade_is_n_minus_three_to_n(
@mock.patch('emit_releases_file.get_dlrn_hash')
@pytest.mark.parametrize('stable_release,expected_releases', [
('master', {
'undercloud_install_release': 'rocky',
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'old-current-tripleo',
'undercloud_target_release': 'master',
'undercloud_target_hash': 'current-tripleo',
@ -244,6 +274,22 @@ def test_period_ffu_overcloud_upgrade_is_n_minus_three_to_n(
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
}),
('stein', {
'undercloud_install_release': 'rocky',
'undercloud_install_hash': 'old-current-tripleo',
'undercloud_target_release': 'stein',
'undercloud_target_hash': 'current-tripleo',
'overcloud_deploy_release': 'stein',
'overcloud_deploy_hash': 'current-tripleo',
'overcloud_target_release': 'stein',
'overcloud_target_hash': 'current-tripleo',
'standalone_deploy_release': 'stein',
'standalone_deploy_newest_hash': 'current',
'standalone_deploy_hash': 'current-tripleo',
'standalone_target_release': 'stein',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
}),
('rocky', {
'undercloud_install_release': 'queens',
'undercloud_install_hash': 'old-current-tripleo',
@ -289,7 +335,7 @@ def test_undercloud_upgrade_is_n_minus_one_to_n(hash_mock,
@mock.patch('emit_releases_file.get_dlrn_hash')
@pytest.mark.parametrize('stable_release,expected_releases', [
('master', {
'undercloud_install_release': 'rocky',
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'old-current-tripleo',
'undercloud_target_release': 'master',
'undercloud_target_hash': 'current-tripleo',
@ -344,13 +390,29 @@ def test_period_undercloud_upgrade_is_n_minus_one_to_n(hash_mock,
'overcloud_deploy_hash': 'current-tripleo',
'overcloud_target_release': 'master',
'overcloud_target_hash': 'current-tripleo',
'standalone_deploy_release': 'rocky',
'standalone_deploy_release': 'stein',
'standalone_deploy_newest_hash': 'old-current',
'standalone_deploy_hash': 'old-current-tripleo',
'standalone_target_release': 'master',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
}),
('stein', {
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'current-tripleo',
'undercloud_target_release': 'stein',
'undercloud_target_hash': 'current-tripleo',
'overcloud_deploy_release': 'stein',
'overcloud_deploy_hash': 'current-tripleo',
'overcloud_target_release': 'stein',
'overcloud_target_hash': 'current-tripleo',
'standalone_deploy_release': 'rocky',
'standalone_deploy_newest_hash': 'old-current',
'standalone_deploy_hash': 'old-current-tripleo',
'standalone_target_release': 'stein',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
})
])
def test_standalone_upgrade_is_n_minus_one_to_n(hash_mock,
hash_mock_setup,
@ -392,13 +454,29 @@ def test_standalone_upgrade_is_n_minus_one_to_n(hash_mock,
'overcloud_deploy_hash': 'current-tripleo',
'overcloud_target_release': 'master',
'overcloud_target_hash': 'current-tripleo',
'standalone_deploy_release': 'rocky',
'standalone_deploy_release': 'stein',
'standalone_deploy_newest_hash': 'old-current',
'standalone_deploy_hash': 'old-current-tripleo',
'standalone_target_release': 'master',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
}),
('stein', {
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'current-tripleo',
'undercloud_target_release': 'stein',
'undercloud_target_hash': 'current-tripleo',
'overcloud_deploy_release': 'stein',
'overcloud_deploy_hash': 'current-tripleo',
'overcloud_target_release': 'stein',
'overcloud_target_hash': 'current-tripleo',
'standalone_deploy_release': 'rocky',
'standalone_deploy_newest_hash': 'old-current',
'standalone_deploy_hash': 'old-current-tripleo',
'standalone_target_release': 'stein',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
})
])
def test_period_standalone_upgrade_is_n_minus_one_to_n(hash_mock,
hash_mock_setup,
@ -447,6 +525,21 @@ def test_period_standalone_upgrade_is_n_minus_one_to_n(hash_mock,
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
'standalone_target_release': 'master'
}), ('stein', {
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'current-tripleo',
'undercloud_target_release': 'stein',
'undercloud_target_hash': 'current-tripleo',
'overcloud_deploy_release': 'stein',
'overcloud_deploy_hash': 'previous-current-tripleo',
'overcloud_target_release': 'stein',
'overcloud_target_hash': 'current-tripleo',
'standalone_deploy_newest_hash': 'current',
'standalone_deploy_hash': 'current-tripleo',
'standalone_deploy_release': 'stein',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
'standalone_target_release': 'stein'
}), ('rocky', {
'undercloud_install_release': 'rocky',
'undercloud_install_hash': 'current-tripleo',
@ -508,6 +601,21 @@ def test_overcloud_update_target_is_hash(hash_mock,
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'tripleo-ci-testing',
'standalone_target_release': 'master'
}), ('stein', {
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'tripleo-ci-testing',
'undercloud_target_release': 'stein',
'undercloud_target_hash': 'tripleo-ci-testing',
'overcloud_deploy_release': 'stein',
'overcloud_deploy_hash': 'previous-current-tripleo',
'overcloud_target_release': 'stein',
'overcloud_target_hash': 'tripleo-ci-testing',
'standalone_deploy_newest_hash': 'current',
'standalone_deploy_hash': 'tripleo-ci-testing',
'standalone_deploy_release': 'stein',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'tripleo-ci-testing',
'standalone_target_release': 'stein'
}), ('rocky', {
'undercloud_install_release': 'rocky',
'undercloud_install_hash': 'tripleo-ci-testing',
@ -568,6 +676,21 @@ def test_period_overcloud_update_target_is_hash(hash_mock,
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
'standalone_target_release': 'master'
}), ('stein', {
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'current-tripleo',
'undercloud_target_release': 'stein',
'undercloud_target_hash': 'current-tripleo',
'overcloud_deploy_release': 'stein',
'overcloud_deploy_hash': 'current-tripleo',
'overcloud_target_release': 'stein',
'overcloud_target_hash': 'current-tripleo',
'standalone_deploy_hash': 'current-tripleo',
'standalone_deploy_newest_hash': 'current',
'standalone_deploy_release': 'stein',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'current-tripleo',
'standalone_target_release': 'stein'
}), ('rocky', {
'undercloud_install_release': 'rocky',
'undercloud_install_hash': 'current-tripleo',
@ -621,7 +744,22 @@ def test_noop_target_is_the_same(hash_mock,
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'tripleo-ci-testing',
'standalone_target_release': 'master'
}), ('rocky', {
}), ('stein', {
'undercloud_install_release': 'stein',
'undercloud_install_hash': 'tripleo-ci-testing',
'undercloud_target_release': 'stein',
'undercloud_target_hash': 'tripleo-ci-testing',
'overcloud_deploy_release': 'stein',
'overcloud_deploy_hash': 'tripleo-ci-testing',
'overcloud_target_release': 'stein',
'overcloud_target_hash': 'tripleo-ci-testing',
'standalone_deploy_newest_hash': 'current',
'standalone_deploy_hash': 'tripleo-ci-testing',
'standalone_deploy_release': 'stein',
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'tripleo-ci-testing',
'standalone_target_release': 'stein'
}), ('rocky', {
'undercloud_install_release': 'rocky',
'undercloud_install_hash': 'tripleo-ci-testing',
'undercloud_target_release': 'rocky',
@ -636,7 +774,7 @@ def test_noop_target_is_the_same(hash_mock,
'standalone_target_newest_hash': 'current',
'standalone_target_hash': 'tripleo-ci-testing',
'standalone_target_release': 'rocky'
})])
})])
def test_periodic_noop_target_is_the_same(hash_mock,
hash_mock_setup,
stable_release,

View File

@ -51,7 +51,8 @@ def test_overcloud_upgrades_has_to_be_mixed(upgrade_type):
@pytest.mark.parametrize('stable_release',
['ocata', 'pike', 'newton', 'rocky', 'master'])
['ocata', 'pike', 'newton',
'rocky', 'stein', 'master'])
def test_ffu_overcloud_upgrade_only_supported_from_newton(stable_release):
featureset = {
'mixed_upgrade': True,

View File

@ -55,7 +55,7 @@ changedir = scripts/emit_releases_file
commands = pytest {posargs:--cov=emit_releases_file}
[testenv:py35]
basepython = python3
basepython = python3.5
deps={[testenv]deps}
changedir = {[testenv:py27]changedir}
commands = {[testenv:py27]commands}