-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #887 from IBM/cartridges-test
Cartridges test + various other fixes
- Loading branch information
Showing
29 changed files
with
387 additions
and
306 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
43 changes: 0 additions & 43 deletions
43
...les/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-wait-cartridges-ready.yml
This file was deleted.
Oops, something went wrong.
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
21 changes: 0 additions & 21 deletions
21
...tion-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-remove/tasks/cp4d-check-remove-cr.yml
This file was deleted.
Oops, something went wrong.
37 changes: 26 additions & 11 deletions
37
automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-remove/tasks/cp4d-remove-cr.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 |
---|---|---|
@@ -1,17 +1,32 @@ | ||
--- | ||
- name: Fail if destroy was not confirmed | ||
fail: | ||
msg: "Will not delete cartridge {{ _current_cartridge_cr.name }}. Destroy was not confirmed with --confirm-destroy parameter or global_config confirm_destroy property" | ||
when: | ||
- (_confirm_destroy | default(False) | bool) != True | ||
- not cpd_dry_run | ||
|
||
- name: Delete instances of {{ _current_cartridge_cr.name }} | ||
- name: Delete instances of {{ _obsolete_cartridge.Component }} | ||
include_tasks: cp4d-delete-cr-instances.yml | ||
|
||
- name: Generate delete-cr command to delete cartridge {{ _obsolete_cartridge.Component }} from project {{ _p_current_cp4d_cluster.project }} | ||
set_fact: | ||
_delete_cr_command: "{{ lookup('template', 'delete-cr.j2') }}" | ||
|
||
- include_role: | ||
name: run-command | ||
vars: | ||
_p_command_description: Remove cartridge {{ _current_cartridge_cr.name }} in namespace {{ _p_current_cp4d_cluster.project }} | ||
_p_command: "oc delete {{ _current_cartridge_cr.cr_cr }} --namespace {{ _p_current_cp4d_cluster.project }} --all" | ||
_p_command_log_file: "{{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-delete-cartridge.log" | ||
_p_command_description: Remove cartridge {{ _obsolete_cartridge.Component }} in namespace {{ _p_current_cp4d_cluster.project }} | ||
_p_command: "{{ _delete_cr_command }}" | ||
_p_command_log_file: "{{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-delete-cartridge.log" | ||
_p_command_failed_when: False | ||
|
||
- block: | ||
- set_fact: | ||
_delete_cartridge_result: "{{ _run_command_result }}" | ||
|
||
- name: Fail if there was an error deleting the cartridge {{ _obsolete_cartridge.Component }} using delete-cr | ||
fail: | ||
msg: "{{ _delete_cartridge_result }}" | ||
when: | ||
- _delete_cartridge_result.rc!=0 | ||
- not (cpd_test_cartridges | default(False) | bool) | ||
|
||
- set_fact: | ||
_cp4d_cartridges_installed_successfully: False | ||
when: | ||
- _delete_cartridge_result.rc!=0 | ||
when: not cpd_dry_run |
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
3 changes: 3 additions & 0 deletions
3
automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-remove/templates/delete-cr.j2
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,3 @@ | ||
delete-cr \ | ||
--cpd_instance_ns={{ _p_current_cp4d_cluster.project }} \ | ||
--components={{ _obsolete_cartridge.Component }} |
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
6 changes: 2 additions & 4 deletions
6
automation-roles/50-install-cloud-pak/cp4d/cp4d-catalog-source/tasks/main.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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
--- | ||
- set_fact: | ||
_catsrc_cartridges_to_install_list: "{{ _cartridges_to_install_list }}" | ||
_catsrc_cartridges_to_install_list: "{{ _apply_olm_cartridges_list }}" | ||
|
||
- set_fact: | ||
_catsrc_cartridges_to_install_list: "cpfs,cpd_platform" | ||
when: _p_catsrc_scope == 'platform' | ||
|
||
- include_tasks: create-catalog-source-olm-utils.yml | ||
|
||
- include_tasks: wait-catalog-sources-ready.yml | ||
when: not cpd_dry_run | ||
when: _catsrc_cartridges_to_install_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
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
Oops, something went wrong.