-
Notifications
You must be signed in to change notification settings - Fork 5
/
playbook-all.yaml
45 lines (37 loc) · 1.5 KB
/
playbook-all.yaml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
- hosts: all
connection: local
strategy: free
vars:
base_path: "{{ lookup('env', 'REPO_ANSIBLE_BASE_PATH') or (playbook_dir + '/workspace') }}"
repo_path: "{{ base_path }}/{{ inventory_hostname }}"
changes: "{{ lookup('env', 'REPO_ANSIBLE_CHANGES') }}"
skip_checkout: "{{ lookup('env', 'REPO_ANSIBLE_SKIP_CHECKOUT')|default(False) }}"
tasks:
- import_tasks: tasks/checkout.yaml
vars:
repository: "{{ inventory_hostname }}"
destination: "{{ repo_path }}"
when: not skip_checkout
- import_tasks: tasks/retrieve-validate-repo-data.yaml
- import_tasks: tasks/version-migrations.yaml
- import_tasks: tasks/retrieve-docs-data.yaml
- import_tasks: tasks/generate-files.yaml
- import_tasks: tasks/husky.yaml
when: repo.type != 'other'
- import_tasks: tasks/helm.yaml
when: repo.helm_charts
- name: Execute tasks for applications, libraries, and symfony-bundles
block:
- import_tasks: tasks/devcontainer.yaml
- import_tasks: tasks/other-dev-generated-files.yaml
when: >
repo.type in ['application', 'library', 'symfony-bundle']
or repo.type.startswith('php-') or repo.type.startswith('nodejs-')
- import_tasks: tasks/php-qa.yaml
when: >
repo.type in ['application', 'library', 'symfony-bundle']
or repo.type.startswith('php-')
- import_tasks: tasks/pull-request.yaml
when: changes == 'pull-request'
- import_tasks: tasks/push.yaml
when: changes == 'push'