Sha256: 95fbb22710e6187ab159e8cbc8185ca289d690d813bcf5f336081b29eea4c33a

Contents?: true

Size: 1.43 KB

Versions: 2

Compression:

Stored size: 1.43 KB

Contents

- name: Check if path exists
  stat: path={{ fe_app_path }}
  register: fe_app_path_stat

- name: Check if there are commited changes on {{ fe_app_branch }}
  remote_user: "{{ deployer_user.name }}"
  command: bash -lc "git fetch origin && git diff --name-only origin/{{ fe_app_branch }}"
  args:
    chdir: "{{fe_app_path}}"
  register: changes_on_remote
  when: fe_app_path_stat.stat.exists

- name: Inform User if there are no changes
  debug: msg={{no_changes_found_error.split('\n')}}
  when: fe_app_path_stat.stat.exists and changes_on_remote.stdout_lines == []

- name: clone the FE app
  when: fe_app_repo is defined
  remote_user: "{{ deployer_user.name }}"
  git: dest={{ fe_app_path }}
       repo={{ fe_app_repo }}
       version={{ fe_app_branch }}
       accept_hostkey=true
       force=yes

- name: Detect package.json
  command: chdir={{ fe_app_path }}
    bash -lc 'test -e package.json'
  register: npm_result
  ignore_errors: true


- name: Detect yarn.lock
  command: chdir={{ fe_app_path }}
    bash -lc 'test -e yarn.lock'
  register: yarn_result
  ignore_errors: true

- name: YARN install
  when: fe_app_repo is defined and npm_result|success and yarn_result|success
  remote_user: "{{ deployer_user.name }}"
  command: chdir={{ fe_app_path }}
    bash -lc 'yarn install'

- name: Build FE
  when: fe_app_repo is defined
  remote_user: "{{ deployer_user.name }}"
  command: chdir={{ fe_app_path }}
    bash -lc '{{ fe_build_command }}'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
taperole-2.1.1 roles/frontend_deploy/tasks/main.yml
taperole-2.1.0 roles/frontend_deploy/tasks/main.yml