Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable/2024.1] chore: add upgrade job #1519

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,24 @@
parent: atmosphere-molecule-aio-full
vars:
tox_envlist: molecule-aio-ovn

- job:
name: atmosphere-molecule-aio-upgrade-base
run: zuul.d/playbooks/upgrade/run-upgrade.yml
abstract: true
timeout: 10800
parent: atmosphere-molecule-aio-full
vars:
from_branch: "stable/2023.2"

- job:
name: atmosphere-molecule-aio-upgrade-2024.1-openvswitch
parent: atmosphere-molecule-aio-upgrade-base
vars:
network_backend: "openvswitch"

- job:
name: atmosphere-molecule-aio-upgrade-2024.1-ovn
parent: atmosphere-molecule-aio-upgrade-base
vars:
network_backend: "ovn"
59 changes: 59 additions & 0 deletions zuul.d/playbooks/upgrade/run-upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

- name: Upgrade test
hosts: all
become: true
tasks:
- name: Checkout to "{{ from_branch }}" branch
become: true
ansible.builtin.shell: |
sudo apt-get purge -y snapd
git stash
git checkout "{{ from_branch }}"
args:
chdir: "{{ zuul.project.src_dir }}"

- name: Run molecule with exist branch
become: true
ansible.builtin.shell: |
pip install --ignore-installed poetry
poetry install
pip install -r test-requirements.txt
poetry run molecule converge -s aio
args:
chdir: "{{ zuul.project.src_dir }}"
environment:
ATMOSPHERE_NETWORK_BACKEND: "{{ network_backend }}"

- name: Checkout to "{{ zuul.branch }}" branch
become: true
ansible.builtin.shell: |
git restore .
git checkout "{{ zuul.branch }}"
git stash pop
args:
chdir: "{{ zuul.project.src_dir }}"

- name: Run molecule to upgrade
become: true
ansible.builtin.shell: |
poetry install
pip install -r test-requirements.txt
poetry run molecule converge -s aio
poetry run molecule verify -s aio
args:
chdir: "{{ zuul.project.src_dir }}"
environment:
ATMOSPHERE_NETWORK_BACKEND: "{{ network_backend }}"
6 changes: 6 additions & 0 deletions zuul.d/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,9 @@
release:
jobs:
- atmosphere-publish-collection
periodic:
jobs:
- atmosphere-molecule-aio-upgrade-2024.1-openvswitch:
dependencies: *molecule_check_dependencies
- atmosphere-molecule-aio-upgrade-2024.1-ovn:
dependencies: *molecule_check_dependencies