From 0810460603b6b2f1fd53a9ff1b9c98e2f32b2145 Mon Sep 17 00:00:00 2001 From: Glenn Stewart Date: Tue, 14 Jun 2022 15:53:10 +1000 Subject: [PATCH] ITSD-94667 Debug Tue 14 Jun 2022 15:53:10 AEST --- roles/product_install/defaults/main.yml | 1 + .../tasks/jira-servicedesk_as_obr.yml | 59 ++++++++++--------- 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/roles/product_install/defaults/main.yml b/roles/product_install/defaults/main.yml index e3a929c..c981b4f 100644 --- a/roles/product_install/defaults/main.yml +++ b/roles/product_install/defaults/main.yml @@ -37,6 +37,7 @@ atl_servicedesk_url_map: atl_servicedesk_metadata_url: "{{ atl_servicedesk_url_map[atl_product_version] | default(atl_servicedesk_url_map['default']) }}" atl_install_jsd_as_obr: false +atl_obr_download_url: '' atl_servicedesk_download_file: "{{ atl_installer_temp }}/jira-servicedesk.{{ atl_product_version }}.obr" force_version_update: false diff --git a/roles/product_install/tasks/jira-servicedesk_as_obr.yml b/roles/product_install/tasks/jira-servicedesk_as_obr.yml index a914cfb..9605b64 100644 --- a/roles/product_install/tasks/jira-servicedesk_as_obr.yml +++ b/roles/product_install/tasks/jira-servicedesk_as_obr.yml @@ -1,37 +1,42 @@ --- -- name: Get the installer product version info - uri: - url: "{{ atl_mpac_products }}/key/jira/versions/name/{{ atl_product_version }}" - return_content: yes - register: atl_product_version_info +- name: Source jira-servicedesk obr from marketplace -- name: Show the returned build number - debug: - msg="buildNumber={{ atl_product_version_info.json.buildNumber }}" + - name: Get the installer product version info + uri: + url: "{{ atl_mpac_products }}/key/jira/versions/name/{{ atl_product_version }}" + return_content: yes + register: atl_product_version_info -- name: Get the JSD build version info - uri: - url: "{{ atl_mpac_products }}/key/jira-servicedesk/versions/latest?application=\ - jira&applicationBuild={{ atl_product_version_info.json.buildNumber }}" - return_content: yes - register: atl_jsd_build_info + - name: Show the returned build number + debug: + msg="buildNumber={{ atl_product_version_info.json.buildNumber }}" -- name: Show the returned obr binary href - debug: - msg="obr_ref={{ atl_jsd_build_info.json._embedded.artifact._links.binary.href }}" + - name: Get the JSD build version info + uri: + url: "{{ atl_mpac_products }}/key/jira-servicedesk/versions/latest?application=\ + jira&applicationBuild={{ atl_product_version_info.json.buildNumber }}" + return_content: yes + register: atl_jsd_build_info -- name: Set atl_obr_download_url - set_fact: - atl_obr_download_url: "{{ atl_jsd_build_info.json._embedded.artifact._links.binary.href }}" + - name: Show the returned obr binary href + debug: + msg="obr_ref={{ atl_jsd_build_info.json._embedded.artifact._links.binary.href }}" -- name: Show the obr filename - debug: - msg="obr_name=jira-servicedesk-application-{{ atl_jsd_build_info.json.name }}.obr" + - name: Set atl_obr_download_url + set_fact: + atl_obr_download_url: "{{ atl_jsd_build_info.json._embedded.artifact._links.binary.href }}" -- name: Set the obr filename - set_fact: - atl_obr_filename: "jira-servicedesk-application-{{ atl_jsd_build_info.json.name }}.obr" + - name: Show the obr filename + debug: + msg="obr_name=jira-servicedesk-application-{{ atl_jsd_build_info.json.name }}.obr" + + - name: Set the obr filename + set_fact: + atl_obr_filename: "jira-servicedesk-application-{{ atl_jsd_build_info.json.name }}.obr" + + when: + - atl_obr_download_url is undefined - name: is shared_home set ? debug: @@ -48,7 +53,7 @@ download_obr: true move_obr: false atl_obr_download: "{{ atl_installer_temp }}/{{ atl_obr_filename }}" - atl_obr_shared_download: "{{ atl_product_home_shared_download_dir }}/{{ atl_obr_filename }}.obr" + atl_obr_shared_download: "{{ atl_product_home_shared_download_dir }}/{{ atl_obr_filename }}" atl_obr_moving_lock: "{{ atl_product_home_shared_download_dir }}/{{ atl_obr_filename }}_moving" atl_obr_completed_lock: "{{ atl_product_home_shared_download_dir }}/{{ atl_obr_filename }}_completed"