Merge "Prepare build-test role for usage in upstream"

This commit is contained in:
Jenkins 2016-12-08 15:59:17 +00:00 committed by Gerrit Code Review
commit 1672d78db1
3 changed files with 25 additions and 19 deletions

View File

@ -32,6 +32,8 @@ def process(host, changes):
for item in changes.split("^"):
params = item.split(":")
if params[0] in [i['project'] for i in output]:
continue
output.append({"host": host,
"project": params[0],
"branch": params[1],

View File

@ -54,3 +54,4 @@
done;
args:
chdir: '{{ ansible_user_dir }}/DLRN'
register: repo_built

View File

@ -74,34 +74,36 @@
- name: Parse Zuul changes
zuul_deps:
host: "{{ lookup('env', 'ZUUL_HOST') }}"
host: "{{ lookup('env', 'ZUUL_HOST')|default('review.openstack.org', true) }}"
changes: "{{ lookup('env', 'ZUUL_CHANGES') }}"
when: artg_change_list is not defined and "{{ lookup('env', 'ZUUL_HOST') }}" != ""
when: artg_change_list is not defined and "{{ lookup('env', 'ZUUL_CHANGES') }}" != ""
- name: Clone and build the specific DLRN projects
include: dlrn-build.yml artg_change={{ item }}
with_items: '{{ artg_change_list }}'
with_items: '{{ artg_change_list|default([]) }}'
when: item.project not in artg_skipped_projects
- name: Create a directory to hold the rpms
file:
path: '{{ ansible_user_dir }}/gating_repo'
state: directory
- block:
- name: Create a directory to hold the rpms
file:
path: '{{ ansible_user_dir }}/gating_repo'
state: directory
- name: Copy the generated rpms
shell: >
rm -rf {{ ansible_user_dir }}/gating_repo/*;
find {{ ansible_user_dir }}/DLRN/data/repos -type f -name '*.rpm' -print0 | xargs -0 cp -t {{ ansible_user_dir }}/gating_repo;
- name: Copy the generated rpms
shell: >
rm -rf {{ ansible_user_dir }}/gating_repo/*;
find {{ ansible_user_dir }}/DLRN/data/repos -type f -name '*.rpm' -print0 | xargs -0 cp -t {{ ansible_user_dir }}/gating_repo;
- name: Run createrepo on generated rpms
shell: 'createrepo gating_repo'
args:
chdir: '{{ ansible_user_dir }}'
- name: Run createrepo on generated rpms
shell: 'createrepo gating_repo'
args:
chdir: '{{ ansible_user_dir }}'
- name: Compress the repo
shell: 'tar czf {{ artg_compressed_gating_repo }} gating_repo'
args:
chdir: '{{ ansible_user_dir }}'
- name: Compress the repo
shell: 'tar czf {{ artg_compressed_gating_repo }} gating_repo'
args:
chdir: '{{ ansible_user_dir }}'
when: repo_built is defined
- name: Clean up
file:
@ -119,3 +121,4 @@
- name: Trigger repo injection for quickstart
set_fact: compressed_gating_repo={{ artg_compressed_gating_repo }}
when: repo_built is defined