blob: 2cdf2c1b25c839d3e0f2952355b459ea8cc00d94 [file] [log] [blame]
Andy Bavier175cfaf2017-03-13 18:09:21 -04001---
2# build-images/tasks/main.yml
3
4- name: Clean up chameleon temp directory
5 file:
6 path: "{{ cord_dir }}/orchestration/xos/containers/chameleon/tmp.chameleon"
7 state: absent
8 with_items: "{{ chameleon_dirs }}"
9
10- name: Populate chameleon temp directory
11 shell: cp -a "{{ cord_dir }}/component/chameleon" "{{ item }}"
12 with_items: "{{ chameleon_dirs }}"
13 tags:
14 - skip_ansible_lint # docker can't access files outside of build context, so we must copy
15
16# If an image was previously pulled it won't get built
17- name: Build images
18 docker_image:
19 name: "{{ item.name }}"
20 path: "{{ item.path }}"
21 tag: "{{ build_docker_tag }}"
22 dockerfile: "{{ item.dockerfile }}"
23 pull: False
24 with_items: "{{ docker_images }}"
25
26- name: Build optional images
27 docker_image:
28 name: "{{ item.name }}"
29 path: "{{ item.path }}"
30 tag: "{{ build_docker_tag }}"
31 dockerfile: "{{ item.dockerfile }}"
32 pull: False
33 with_items: "{{ docker_optional_images }}"
34 when: build_optional_images
35
36# Build extensions images
37- name: Build xos-gui-extensions docker images
38 docker_image:
39 name: "xosproject/gui-extension-{{ item.name }}"
40 path: "{{ cord_dir }}/{{ item.path }}"
41 tag: "{{ build_docker_tag }}"
42 pull: False
43 with_items: "{{ enabled_gui_extensions }}"
Andy Bavier7bcd2832017-03-23 13:45:21 -040044
45# Build synchronizer images
46- name: Build synchronizer docker images
47 docker_image:
48 name: "xosproject/{{ item.name }}-synchronizer"
49 path: "{{ cord_dir }}/{{ item.path }}/xos/synchronizer"
50 dockerfile: "Dockerfile.synchronizer"
51 tag: "{{ build_docker_tag }}"
52 pull: False
53 with_items: "{{ xos_services }}"
54 when: not frontend_only and item.synchronizer is defined and item.synchronizer