-
-
Notifications
You must be signed in to change notification settings - Fork 606
/
Copy pathbuild-after.yml
31 lines (28 loc) · 1.39 KB
/
build-after.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- name: Check for composer.json in project root or project_subtree_path
stat:
path: "{{ deploy_helper.new_release_path }}/composer.json"
register: composer_json
- name: Fail if composer.json not found
fail:
msg: "Unable to find a `composer.json` file in the root of '{{ deploy_helper.new_release_path }}'. Make sure your repo has a `composer.json` file in its root or edit `repo_subtree_path` for '{{ site }}' in `wordpress_sites.yml` so it points to the directory with a `composer.json` file."
when: not composer_json.stat.exists
- name: Setup composer authentications
composer:
command: config
arguments: --auth http-basic.{{ composer_authentication.hostname }} {{ composer_authentication.username }} {{ composer_authentication.password }}
working_dir: "{{ deploy_helper.new_release_path }}"
no_log: true
changed_when: false
when:
- composer_authentication.hostname is defined and composer_authentication.hostname != ""
- composer_authentication.username is defined and composer_authentication.username != ""
- composer_authentication.password is defined and composer_authentication.password != ""
loop: "{{ composer_authentications }}"
loop_control:
loop_var: composer_authentication
label: "{{ composer_authentication.hostname }}"
- name: Install Composer dependencies
composer:
no_scripts: yes
working_dir: "{{ deploy_helper.new_release_path }}"