Browse Source

Merge "Reqcheck job for upstream validations-common"

changes/43/792343/3
Zuul 3 weeks ago
committed by Gerrit Code Review
parent
commit
d0d7da08ed
3 changed files with 64 additions and 0 deletions
  1. +6
    -0
      .reqcheck_override.yaml
  2. +13
    -0
      .zuul.yaml
  3. +45
    -0
      playbooks/reqcheck.yaml

+ 6
- 0
.reqcheck_override.yaml View File

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

+ 13
- 0
.zuul.yaml View File

@ -17,6 +17,18 @@
- ^doc/.*$
- ^releasenotes/.*$
- job:
name: validations-common-reqcheck
nodeset: centos-8
parent: base
run: playbooks/reqcheck.yaml
timeout: 1600
voting: false
required-projects:
- openstack/validations-common
files:
- ^requirements.txt$
- job:
description: Base validations-common job
name: validations-common-centos-8-base
@ -47,6 +59,7 @@
- validations-common-molecule-jobs
check:
jobs:
- validations-common-reqcheck
- openstack-tox-linters
- openstack-tox-cover
- openstack-tox-py36


+ 45
- 0
playbooks/reqcheck.yaml View File

@ -0,0 +1,45 @@
---
- hosts: all
name: validations-common-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-common-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 }}"

Loading…
Cancel
Save