-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Build rpm packages from zuul opendev depends-on
Signed-off-by: Chandan Kumar <raukadah@gmail.com>
- Loading branch information
Showing
5 changed files
with
94 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
roles/build_openstack_packages/tasks/parse_and_build_pkgs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
- name: Parse Zuul changes | ||
with_items: "{{ zuul['items'] }}" | ||
when: | ||
- zuul is defined | ||
- "'change_url' in item" | ||
- item.project.name not in cifmw_bop_change_list|default([]) | map(attribute='project') |list | ||
- >- | ||
(cifmw_bop_openstack_release is defined and cifmw_bop_openstack_release in item.branch) or | ||
(cifmw_bop_openstack_release is not defined and item.branch == zuul.override_checkout | default(zuul.branch)) or | ||
(cifmw_bop_osp_release is defined and cifmw_bop_osp_release in item.branch) or | ||
item.project.name in cifmw_bop_branchless_projects | ||
ansible.builtin.set_fact: | ||
cacheable: true | ||
cifmw_bop_change_list: | ||
"{{ cifmw_bop_change_list|default([]) + | ||
[{'host': item.change_url | regex_search('(^https?://.*?)/', '\\1') | first, | ||
'project': item.project.name, | ||
'branch': item.branch, | ||
'change': item.change, | ||
'refspec': '/'.join(['refs', 'changes', | ||
item.change[-2:], | ||
item.change, | ||
item.patchset]) }] }}" | ||
|
||
|
||
- name: Print Zuul change list | ||
ansible.builtin.debug: | ||
var: cifmw_bop_change_list | ||
|
||
- name: Build DLRN packages from zuul changes | ||
when: | ||
- '"-distgit" not in _change.project' | ||
- _change.project not in cifmw_bop_skipped_projects | ||
- >- | ||
cifmw_bop_openstack_release in _change.branch or | ||
(zuul.project.name | default("") == cifmw_bop_rdoinfo_repo_name) or | ||
(cifmw_bop_osp_release is defined and cifmw_bop_osp_release in _change.branch) or | ||
_change.project in cifmw_bop_branchless_projects | ||
loop: "{{ cifmw_bop_change_list }}" | ||
loop_control: | ||
loop_var: "_change" | ||
ansible.builtin.include_tasks: run_dlrn.yml | ||
|
||
- name: Build DLRN packages from Local change | ||
when: cifmw_bop_openstack_project_path | length > 0 | ||
vars: | ||
_change: | ||
branch: "{{ cifmw_bop_openstack_release }}" | ||
ansible.builtin.include_tasks: run_dlrn.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters