From cab8fa02dcbe4f3a1f4db5cc90314f65fbc455c7 Mon Sep 17 00:00:00 2001 From: Alex-Welsh Date: Sat, 28 Dec 2024 13:17:13 +0000 Subject: [PATCH] Add minor upgrade option to MN deploy workflow --- .github/workflows/multinode-inputs.py | 6 +++--- .github/workflows/stackhpc-multinode.yml | 12 ++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/multinode-inputs.py b/.github/workflows/multinode-inputs.py index c64b73544..6971bf778 100644 --- a/.github/workflows/multinode-inputs.py +++ b/.github/workflows/multinode-inputs.py @@ -26,7 +26,7 @@ class Scenario: openstack_release: OpenStackRelease os_release: OSRelease neutron_plugin: str - upgrade: bool + upgrade: str ROCKY_9 = OSRelease("rocky", "9", "cloud-user") @@ -50,7 +50,7 @@ def random_scenario() -> Scenario: openstack_release = random.choice(OPENSTACK_RELEASES) os_release = random.choice(openstack_release.os_releases) neutron_plugin = random.choice(NEUTRON_PLUGINS) - upgrade = random.random() > 0.6 + upgrade = 'major' if random.random() > 0.6 else 'none' return Scenario(openstack_release, os_release, neutron_plugin, upgrade) @@ -62,7 +62,7 @@ def generate_inputs(scenario: Scenario) -> t.Dict[str, str]: "os_release": scenario.os_release.release, "ssh_username": scenario.os_release.ssh_username, "neutron_plugin": scenario.neutron_plugin, - "upgrade": str(scenario.upgrade).lower(), + "upgrade": scenario.upgrade, "stackhpc_kayobe_config_version": branch, "stackhpc_kayobe_config_previous_version": previous_branch, } diff --git a/.github/workflows/stackhpc-multinode.yml b/.github/workflows/stackhpc-multinode.yml index 3ec055bb4..321346ec8 100644 --- a/.github/workflows/stackhpc-multinode.yml +++ b/.github/workflows/stackhpc-multinode.yml @@ -27,8 +27,12 @@ name: Multinode - ovs upgrade: description: Whether to perform an upgrade - type: boolean - default: false + default: none + type: choice + options: + - none + - minor + - major break_on: description: When to break execution for manual interaction type: choice @@ -52,7 +56,7 @@ name: Multinode jobs: multinode: name: Multinode - uses: stackhpc/stackhpc-openstack-gh-workflows/.github/workflows/multinode.yml@1.2.0 + uses: stackhpc/stackhpc-openstack-gh-workflows/.github/workflows/multinode.yml@1.4.0 with: multinode_name: ${{ inputs.multinode_name }} os_distribution: ${{ inputs.os_distribution }} @@ -66,6 +70,6 @@ jobs: ssh_key: ${{ inputs.ssh_key }} stackhpc_kayobe_config_version: ${{ github.ref_name }} # NOTE(upgrade): Reference the PREVIOUS release here. - stackhpc_kayobe_config_previous_version: stackhpc/2023.1 + stackhpc_kayobe_config_previous_version: ${{ inputs.upgrade == 'major' && 'stackhpc/2023.1' || 'stackhpc/2024.1' }} terraform_kayobe_multinode_version: ${{ inputs.terraform_kayobe_multinode_version }} secrets: inherit