Zuul/Tox: Install custom python3-keystoneauth1

Some packages available upstream have custom versions
in STX repos. Tests need to be against these custom
dependencies. In this case, distcloud repo requires
python3-keystoneauth1.

This commit adds logic for installing the latest
available STX build of test dependencies.

Test Plan:
pass - Install bindep deps and requirements, then run
       the ansible playbook to install STX deps
       tools/gate/playbooks/install-stx-custom-deps.yaml
       tox -epy39 -c distributedcloud/tox.ini

Closes-Bug: 2073917

Change-Id: I1c025de9699ca3b388b81a5d77e2c0cd46ce9d7a
Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
This commit is contained in:
Leonardo Fagundes Luz Serrano 2024-07-22 16:35:15 -03:00
parent 186307a2c9
commit aef84c8646
7 changed files with 37 additions and 1 deletions

6
.gitignore vendored
View File

@ -31,6 +31,11 @@ nosetests.xml
.testrepository
.venv
# Unit test temp files
# Reference: distributedcloud/dcmanager/common/utils.py -> syncronized()
distributedcloud/DCManager-*
distributedcloud/*fake_file.yml
# Translations
*.mo
@ -60,4 +65,5 @@ ChangeLog
*~
.*.swp
.*sw?
.vscode

4
.yamllint Normal file
View File

@ -0,0 +1,4 @@
rules:
line-length:
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true

View File

@ -30,6 +30,7 @@
nodeset: debian-bullseye
pre-run:
- tools/gate/playbooks/install-postgresql.yaml
- tools/gate/playbooks/install-stx-custom-deps.yaml
required-projects:
- starlingx/fault
- starlingx/nfv

View File

@ -1,5 +1,5 @@
---
- hosts: all
- hosts: "{{ target_hosts | default('all') }}"
gather_facts: false
roles:
- install-postgresql

View File

@ -0,0 +1,5 @@
---
- hosts: "{{ target_hosts | default('all') }}"
gather_facts: false
roles:
- install-stx-custom-deps

View File

@ -0,0 +1,13 @@
---
- name: Add STX master repo
apt_repository:
filename: "{{ stx_master_tag }}"
repo: "deb [trusted=yes] {{ stx_master_repo }} /"
become: true
- name: Install dependencies from STX master package repo
package:
name: "{{ item }}"
state: present
become: true
with_items: "{{ stx_master_deps }}"

View File

@ -0,0 +1,7 @@
---
stx_master_repo: "https://mirror.starlingx.windriver.com/mirror/starlingx/master/debian/monolithic/latest_build/outputs/std/packages"
stx_master_tag: stxmaster
stx_master_deps:
- python3-keystoneauth1