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

Salt Shaker: allow testing "python311-salt" in SLMicro and Tumbleweed #1778

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
19 changes: 15 additions & 4 deletions salt/salt_testenv/salt_classic_package.sls
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,39 @@ salt_testing_repo:
- gpgkey: http://{{ grains.get("mirror") | default("download.opensuse.org", true) }}/repositories/systemsmanagement:{{ grains["salt_obs_flavor"] }}/{{ repo_path }}/repodata/repomd.xml.key

{% set salt_minion_is_installed = salt["pkg.info_installed"]("salt-minion").get("salt-minion", False) %}

salt_version_testing_repo:
cmd.run:
- name: zypper search -x -t package -s --repo salt_testing_repo salt | grep "| salt |" | cut -d"|" -f4 | tr -d ' ' > /tmp/salt_version_testing_repo
- require:
- pkgrepo: salt_testing_repo

install_salt_testsuite:
{% if grains['os_family'] == 'Suse' and grains['osfullname'] == 'SL-Micro' %}
cmd.run:
- name: transactional-update -c -n pkg in python3-salt-testsuite python3-salt-test python3-salt
- name: |
SALT_VERSION=`cat /tmp/salt_version_testing_repo`
transactional-update -c -n pkg in --capability python3-salt-testsuite-$SALT_VERSION python3-salt-test python3-salt-$SALT_VERSION
{% else %}
{# HACK: we call zypper manually to ensure right packages are installed regardless upgrade/downgrade #}
cmd.run:
{# We install docker first to ensure zypper does not resolve this dependency to podman-docker #}
{% if salt_minion_is_installed %}
- name: |
zypper --non-interactive in --force docker
zypper --non-interactive in --force --from salt_testing_repo python3-salt salt python3-salt-testsuite salt-minion
SALT_VERSION=`cat /tmp/salt_version_testing_repo`
zypper --non-interactive in --capability --from salt_testing_repo python3-salt-$SALT_VERSION salt-$SALT_VERSION python3-salt-testsuite-$SALT_VERSION salt-minion-$SALT_VERSION
{% else %}
- name: |
zypper --non-interactive in --force docker
zypper --non-interactive in --force --from salt_testing_repo python3-salt salt python3-salt-testsuite
SALT_VERSION=`cat /tmp/salt_version_testing_repo`
zypper --non-interactive in --capability --from salt_testing_repo python3-salt-$SALT_VERSION salt-$SALT_VERSION python3-salt-testsuite-$SALT_VERSION
{% endif %}
- fromrepo: salt_testing_repo
{% endif %}
- require:
- pkgrepo: salt_testsuite_dependencies_repo
- pkgrepo: salt_testing_repo
- cmd: salt_version_testing_repo

install_salt_tests_executor:
{% if grains['os_family'] == 'Suse' and grains['osfullname'] == 'SL-Micro' %}
Expand Down
Loading