-
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.
[bop]Build RPM pkgs from OpenDev Depends On
This pull requests improves following things: - Update default value of cifmw_bop_build_repo_dir so that we can collect DLRN related data in the logs - Change cifmw_bop_openstack_release var default value to antelope. - Introduced more vars to construct cifmw_bop_change_list. * `cifmw_bop_branchless_projects`: List of project does not have stable branches. * `cifmw_bop_skipped_projects`: List of projects on which DLRN build needs to be skipped. * `cifmw_bop_change_list`: Zuul Change list constructed while using Depends-On in CI to build rpm packages using DLRN. * `cifmw_bop_release_mapping`: A list of openstack release names and their respective branch names. - Construct cifmw_bop_change_list from OpenDev Depends On based on the conditions defined in README - It also updates the conditional to set proper rdo branches and update DLRN project.ini for branchful and branchless project. For branchful project: rdo-{project branch} For branchless project: rdo-{openstack_release} for master: rdo-master - Add tasks to clone proper changes from gerrit refspec and github pull requests. - Builds the RPM after that. Signed-off-by: Chandan Kumar <raukadah@gmail.com>
- Loading branch information
Showing
8 changed files
with
212 additions
and
28 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
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
52 changes: 52 additions & 0 deletions
52
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,52 @@ | ||
--- | ||
- name: Parse Zuul changes | ||
with_items: "{{ zuul['items'] }}" | ||
when: | ||
- zuul is defined | ||
- "'change_url' in item" | ||
- '"-distgit" not in item.project' | ||
- item.project.name not in cifmw_bop_change_list|default([]) | map(attribute='project') |list | ||
- >- | ||
cifmw_bop_release_mapping[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_release_mapping[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 }}" | ||
project: "{{ cifmw_bop_openstack_project_path | basename }}" | ||
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
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