Merge "Reqcheck job for upstream validations-libs"

This commit is contained in:
Zuul 2021-06-03 21:32:18 +00:00 committed by Gerrit Code Review
commit eda81279a3
3 changed files with 65 additions and 0 deletions

6
.reqcheck_override.yaml Normal file
View File

@ -0,0 +1,6 @@
---
packages:
all:
- name: "python-yaml"
- name: "python-PyYAML"
- name: "PyYAML"

View File

@ -15,6 +15,18 @@
- ^doc/.*$
- ^releasenotes/.*$
- job:
name: validations-libs-reqcheck
nodeset: centos-8
parent: base
run: playbooks/reqcheck.yaml
timeout: 1600
voting: false
required-projects:
- openstack/validations-libs
files:
- ^requirements.txt$
- job:
name: tripleo-ci-centos-8-standalone-validation-libs
parent: tripleo-ci-centos-8-standalone
@ -29,6 +41,7 @@
- check-requirements
check:
jobs:
- validations-libs-reqcheck
- openstack-tox-linters
- openstack-tox-cover
- openstack-tox-py36

46
playbooks/reqcheck.yaml Normal file
View File

@ -0,0 +1,46 @@
---
- hosts: all
name: validations-libs-reqcheck
vars:
req_check_override: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/.reqcheck_override.yaml"
tasks:
- name: Install rdopkg
changed_when: true
shell:
cmd: |
set -e
# Need to inherit system-site-packages for python-yum
sudo dnf install -y python3-virtualenv
virtualenv --system-site-packages {{ ansible_user_dir }}/.venv
source {{ ansible_user_dir }}/.venv/bin/activate
git clone https://github.com/softwarefactory-project/rdopkg.git
cd rdopkg
pip install .
args:
chdir: "{{ ansible_user_dir }}"
- name: Get distgit project info
changed_when: true
shell:
cmd: |
set -e
source {{ ansible_user_dir }}/.venv/bin/activate
rdopkg findpkg {{ zuul.project.name }} | sed -n "/^distgit/ s/distgit. \(.*\)/\1/p"
register: distgit
args:
chdir: "{{ ansible_user_dir }}"
- name: Clone distgit and reqcheck {{ zuul.project.name }} with rdopkg
changed_when: true
shell:
cmd: |
set -e
source {{ ansible_user_dir }}/.venv/bin/activate
git clone {{ distgit.stdout }}
cd validations-libs-distgit
git remote add upstream {{ ansible_user_dir }}/{{ zuul.project.src_dir }}
git fetch upstream
rdopkg reqcheck --strict --override {{ req_check_override }}
args:
chdir: "{{ ansible_user_dir }}"