Sha256: 9da2ac524ff8e4293729606650305de377453b09cf3dc20dc28a616cd1d97816

Contents?: true

Size: 1.76 KB

Versions: 5

Compression:

Stored size: 1.76 KB

Contents

- name: Check if path exists
  stat: path={{ fe_app_path }}
  register: fe_app_path_stat
  tags: [fe_deploy]

- 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
  tags: [fe_deploy]

- 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 == []
  tags: [fe_deploy]

- 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
  tags: [fe_deploy]

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

- name: NPM install
  when: fe_app_repo is defined and npm_result|success
  remote_user: "{{ deployer_user.name }}"
  command: chdir={{ fe_app_path }}
    bash -lc 'npm install'
  tags: [fe_deploy]

- name: Detect bower.json
  command: chdir={{ fe_app_path }}
    bash -lc 'test -e bower.json'
  register: bower_result
  ignore_errors: true
  tags: [fe_deploy]

- name: Bower install
  when: fe_app_repo is defined and bower_result|success
  remote_user: "{{ deployer_user.name }}"
  command: chdir={{ fe_app_path }} 
    bash -lc 'bower install'
  tags: [fe_deploy]

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
taperole-1.7.1 roles/frontend_deploy/tasks/main.yml
taperole-1.7.0 roles/frontend_deploy/tasks/main.yml
taperole-1.6.0 roles/frontend_deploy/tasks/main.yml
taperole-1.5.5 roles/frontend_deploy/tasks/main.yml
taperole-1.5.4 roles/frontend_deploy/tasks/main.yml