From 5e02f94b469a7f5eb872dc302cc457de54b67650 Mon Sep 17 00:00:00 2001 From: Macharia Muguku Date: Fri, 8 Oct 2021 16:09:02 +0300 Subject: [PATCH 1/2] update react app path, fix remote task name --- defaults/main.yml | 4 ++-- molecule/resources/playbooks/converge.yml | 2 +- tasks/configure.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index e809af0..8131026 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -32,7 +32,7 @@ react_versioned_path: "{{ react_codebase_path }}-versioned" # where the repository is cloned react_checkout_path: "{{ react_versioned_path }}/{{ ansible_date_time['epoch'] }}" # where the actual app package is -react_app_path: "{{ react_checkout_path }}" +react_app_path: "{{ react_checkout_path }}/app" react_log_path: "/var/log/{{ react_app_name }}" react_max_versioned_folders: 10 @@ -52,6 +52,6 @@ react_build_default_cmd: build # app settings react_app_settings: - REACT_APP_WEBSITE_NAME: 'React Example App' + REACT_APP_WEBSITE_NAME: "React Example App" GENERATE_SOURCEMAP: "false" SKIP_PREFLIGHT_CHECK: "true" diff --git a/molecule/resources/playbooks/converge.yml b/molecule/resources/playbooks/converge.yml index 6c455a6..1000951 100644 --- a/molecule/resources/playbooks/converge.yml +++ b/molecule/resources/playbooks/converge.yml @@ -14,4 +14,4 @@ GENERATE_SOURCEMAP: "false" SKIP_PREFLIGHT_CHECK: "true" react_remote_js_build: true - react_app_path: "{{ react_checkout_path }}" + react_app_path: "{{ react_checkout_path }}/app" diff --git a/tasks/configure.yml b/tasks/configure.yml index 1c9c26e..e337969 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -80,7 +80,7 @@ become: true become_user: "{{ react_system_user }}" - - name: Build app locally + - name: Build app remotely become_user: "{{ react_system_user }}" become: true environment: "{{ item.env | default(react_build_cmds_default_env) }}" From d13d712bb5bd2cf8ff2157de0808be0cbb26bf77 Mon Sep 17 00:00:00 2001 From: Macharia Muguku Date: Fri, 8 Oct 2021 16:22:47 +0300 Subject: [PATCH 2/2] default app path to root dir --- defaults/main.yml | 2 +- molecule/resources/playbooks/converge.yml | 2 +- molecule/ubuntu-1804-opensrp/converge.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 8131026..3418612 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -32,7 +32,7 @@ react_versioned_path: "{{ react_codebase_path }}-versioned" # where the repository is cloned react_checkout_path: "{{ react_versioned_path }}/{{ ansible_date_time['epoch'] }}" # where the actual app package is -react_app_path: "{{ react_checkout_path }}/app" +react_app_path: "{{ react_checkout_path }}" react_log_path: "/var/log/{{ react_app_name }}" react_max_versioned_folders: 10 diff --git a/molecule/resources/playbooks/converge.yml b/molecule/resources/playbooks/converge.yml index 1000951..6c455a6 100644 --- a/molecule/resources/playbooks/converge.yml +++ b/molecule/resources/playbooks/converge.yml @@ -14,4 +14,4 @@ GENERATE_SOURCEMAP: "false" SKIP_PREFLIGHT_CHECK: "true" react_remote_js_build: true - react_app_path: "{{ react_checkout_path }}/app" + react_app_path: "{{ react_checkout_path }}" diff --git a/molecule/ubuntu-1804-opensrp/converge.yml b/molecule/ubuntu-1804-opensrp/converge.yml index 57f0b6d..987a899 100644 --- a/molecule/ubuntu-1804-opensrp/converge.yml +++ b/molecule/ubuntu-1804-opensrp/converge.yml @@ -15,7 +15,7 @@ SKIP_PREFLIGHT_CHECK: "true" react_remote_js_build: false react_local_app_path: "{{ react_local_checkout_path }}/app" - react_app_path: "{{ react_checkout_path }}/app" + react_app_path: "{{ react_checkout_path }}" react_build_cmds: - cmd: lerna:prepublish args: --scope @opensrp/store