diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index 8d17f406e6..7d545fbdc4 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -49,7 +49,7 @@ export INSTALL_METHOD=${3:-"source"} # Set the source branch for upgrade tests # Be sure to change this whenever a new stable branch # is created. The checkout must always be N-1. -export UPGRADE_SOURCE_BRANCH=${UPGRADE_SOURCE_BRANCH:-'stable/rocky'} +export UPGRADE_SOURCE_BRANCH=${UPGRADE_SOURCE_BRANCH:-'stable/stein'} # enable the ARA callback plugin export SETUP_ARA=${SETUP_ARA:-true} @@ -63,9 +63,14 @@ export SETUP_ARA=${SETUP_ARA:-true} if [[ "${ACTION}" == "upgrade" ]]; then # Store the target SHA/branch export UPGRADE_TARGET_BRANCH=$(git rev-parse HEAD) + export OPENSTACK_SETUP_EXTRA_ARGS="-e tempest_install=no -e tempest_run=no" # Now checkout the source SHA/branch git checkout ${UPGRADE_SOURCE_BRANCH} + + unset SKIP_OSA_RUNTIME_VENV_BUILD + unset SKIP_OSA_BOOTSTRAP_AIO + unset SKIP_OSA_ROLE_CLONE fi ## Functions ----------------------------------------------------------------- @@ -183,7 +188,7 @@ else # Setup OpenStack export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/setup-openstack.log" - openstack-ansible setup-openstack.yml -e osa_gather_facts=False + openstack-ansible setup-openstack.yml -e osa_gather_facts=False ${OPENSTACK_SETUP_EXTRA_ARGS:-} # Log some data about the instance and the rest of the system log_instance_info @@ -209,7 +214,9 @@ if [[ "${ACTION}" == "upgrade" ]]; then # Source the current scripts-library.sh functions source "${OSA_CLONE_DIR}/scripts/scripts-library.sh" - + # We need this as in stein we were deploying custom + # /etc/openstack_deploy/env.d/aio_metal.yml for metal installs + export SKIP_CUSTOM_ENVD_CHECK=true # To execute the upgrade script we need to provide # an affirmative response to the warning that the # upgrade is irreversable. diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index adfb2c20ba..51d7161b90 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -183,6 +183,12 @@ nodeset: ubuntu-bionic timeout: 10800 +- job: + name: openstack-ansible-upgrade-aio_metal-ubuntu-bionic + parent: openstack-ansible-deploy-aio + nodeset: ubuntu-bionic + timeout: 10800 + - job: name: openstack-ansible-deploy-aio_nspawn-ubuntu-bionic parent: openstack-ansible-deploy-aio @@ -256,6 +262,12 @@ parent: openstack-ansible-deploy-aio nodeset: centos-7 +- job: + name: openstack-ansible-upgrade-aio_metal-centos-7 + parent: openstack-ansible-deploy-aio + nodeset: centos-7 + timeout: 10800 + - job: name: openstack-ansible-upgrade-aio_ceph-centos-7 parent: openstack-ansible-deploy-aio diff --git a/zuul.d/playbooks/pre-gate-scenario.yml b/zuul.d/playbooks/pre-gate-scenario.yml index 4dd6c2b4ea..4dcb2e49fc 100644 --- a/zuul.d/playbooks/pre-gate-scenario.yml +++ b/zuul.d/playbooks/pre-gate-scenario.yml @@ -30,10 +30,10 @@ {% set _scenario = [] %} {# Add the scenarios based on the job name #} {# ex. openstack-ansible-deploy-$scenario1_$scenario2-$os #} - {% if zuul.job is match('^openstack-ansible-deploy-([^-]+)-.*$') %} + {% if zuul.job is match('^openstack-ansible-(deploy|upgrade)-([^-]+)-.*$') %} {% set _ = _scenario.extend( (zuul.job | - regex_replace('^openstack-ansible-deploy-([^-]+)-.*$', '\\1')).split('_') + regex_replace('^openstack-ansible-[a-z]*-([^-]+)-.*$', '\\1')).split('_') ) %} {# If testing a role, add the role service name to the scenario list #} diff --git a/zuul.d/playbooks/pre-osa-aio.yml b/zuul.d/playbooks/pre-osa-aio.yml index b3f6cf4a1a..30c92b48e6 100644 --- a/zuul.d/playbooks/pre-osa-aio.yml +++ b/zuul.d/playbooks/pre-osa-aio.yml @@ -31,6 +31,7 @@ ZUUL_SRC_PATH: "{{ ansible_user_dir }}/src" ANSIBLE_PACKAGE: "{{ ansible_package | default('') }}" SETUP_ARA: 'true' + when: action != 'upgrade' - name: Run bootstrap-aio script become: yes become_user: root @@ -42,3 +43,4 @@ SCENARIO: "{{ scenario }}" ACTION: "{{ action }}" INSTALL_METHOD: "{{ install_method }}" + when: action != 'upgrade' \ No newline at end of file diff --git a/zuul.d/playbooks/templates/osa-gate-scenario.yml.j2 b/zuul.d/playbooks/templates/osa-gate-scenario.yml.j2 index 77420b3594..cf1ba2c5a6 100644 --- a/zuul.d/playbooks/templates/osa-gate-scenario.yml.j2 +++ b/zuul.d/playbooks/templates/osa-gate-scenario.yml.j2 @@ -2,4 +2,4 @@ scenario: {{ scenario | to_json }} action: {{ action | to_json }} -install_method: {{ install_method | to_json }} +install_method: {{ install_method | to_json }} \ No newline at end of file diff --git a/zuul.d/project-templates.yaml b/zuul.d/project-templates.yaml index e6e463cff2..4748d88b8c 100644 --- a/zuul.d/project-templates.yaml +++ b/zuul.d/project-templates.yaml @@ -70,12 +70,16 @@ - openstack-ansible-deploy-aio_metal-centos-7 - openstack-ansible-deploy-aio_metal-opensuse-15 - openstack-ansible-deploy-aio_metal-ubuntu-bionic + - openstack-ansible-upgrade-aio_metal-centos-7 + - openstack-ansible-upgrade-aio_metal-ubuntu-bionic gate: jobs: - openstack-ansible-deploy-aio_metal-debian-stable - openstack-ansible-deploy-aio_metal-centos-7 - openstack-ansible-deploy-aio_metal-opensuse-15 - openstack-ansible-deploy-aio_metal-ubuntu-bionic + - openstack-ansible-upgrade-aio_metal-centos-7 + - openstack-ansible-upgrade-aio_metal-ubuntu-bionic periodic: jobs: - openstack-ansible-deploy-aio_metal-opensuse-15