-
Notifications
You must be signed in to change notification settings - Fork 106
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
95 additions
and
14 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
51 changes: 51 additions & 0 deletions
51
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,51 @@ | ||
--- | ||
- 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': change.branch, | ||
'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 | ||
when: | ||
- '"-distgit" not in item.project' | ||
- item.project not in cifmw_bop_skipped_projects | ||
- >- | ||
cifmw_bop_openstack_release in item.branch or | ||
(zuul.project.name | default("") == cifmw_bop_rdoinfo_repo_name) or | ||
(cifmw_bop_osp_release is defined and cifmw_bop_osp_release in item.branch) or | ||
item.project in cifmw_bop_branchless_projects | ||
ansible.builin.include_tasks: run_dlrn.yml _project={{ item }} | ||
with_items: "{{ cifmw_bop_change_list }}" |
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