diff --git a/.zuul.d/project-template.yaml b/.zuul.d/project-template.yaml index 539cc24ee9..d3060cdc2d 100644 --- a/.zuul.d/project-template.yaml +++ b/.zuul.d/project-template.yaml @@ -32,7 +32,7 @@ # ubuntu latest version). This nodeset setting will avoid such breaking # on stable branch and make sure it continue to run on the supported ubuntu # version on stable branches. - nodeset: ubuntu-jammy + nodeset: ubuntu-noble run: playbooks/requirements-check.yaml required-projects: - openstack/requirements @@ -41,7 +41,6 @@ - ^.*requirements.txt$ - ^.*requirements-py[2,3].txt$ - ^doc/requirements.txt$ - - playbooks/requirements-check.yaml - ^lower-constraints.txt$ - job: @@ -54,4 +53,6 @@ required-projects: openstack/nova vars: zuul_work_dir: "{{ zuul.projects['opendev.org/openstack/nova'].src_dir }}" - zuul_branch: "master" + files: + - ^playbooks/requirements-check.yaml$ + - ^roles/check-requirements/ diff --git a/roles/check-requirements/tasks/main.yaml b/roles/check-requirements/tasks/main.yaml index b973902c60..c07eacfe24 100644 --- a/roles/check-requirements/tasks/main.yaml +++ b/roles/check-requirements/tasks/main.yaml @@ -1,9 +1,12 @@ +- name: Create virtual environment + command: "{{ ensure_pip_virtualenv_command }} {{ zuul_work_dir }}/venv" + - name: Install openstack_requirements - command: "pip3 install --user {{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}" + command: "{{ zuul_work_dir }}/venv/bin/pip3 install {{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}" - name: Run requirements check script # Use command module here instead of script since Zuul gets output # with command into job-output.txt file. # Command expects the file to be at the remote system - the system # running the tests. Ask zuul variables for the path. - command: "{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/playbooks/files/project-requirements-change.py {{ zuul_work_dir }} {{ zuul_branch }}" + command: "{{ zuul_work_dir }}/venv/bin/python3 {{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/playbooks/files/project-requirements-change.py {{ zuul_work_dir }} {{ zuul_branch }}"