-
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
106 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
62 changes: 62 additions & 0 deletions
62
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,62 @@ | ||
--- | ||
- 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 from zuul changes | ||
when: | ||
- cifmw_bop_openstack_project_path is not defined | ||
- '"-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 | ||
loop: "{{ criteria[cifmw_dlrn_promote_promotion_target] }}" | ||
loop: "{{ cifmw_bop_change_list }}" | ||
loop_control: | ||
loop_var: "_project" | ||
ansible.builtin.include_tasks: run_dlrn.yml | ||
|
||
- name: Build DLRN packages from Local change | ||
when: cifmw_bop_openstack_project_path is defined | ||
vars: | ||
_project: | ||
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