blob: b2d14b2300da3631718322d3f18ef4baba867eb7 [file] [log] [blame]
Scott Baker57196542017-04-11 15:48:17 -07001---
2# xos-core-build/tasks/main.yml
3
4- name: Intialize recipe list
5 set_fact:
Sapan Bhatia631a1082017-04-27 00:53:27 +02006 recipes: ['/opt/cord/orchestration/xos/xos/core/core-onboard.yaml']
Scott Baker57196542017-04-11 15:48:17 -07007
8- name: Generate list of recipes
9 set_fact:
10 recipes: "{{ recipes }} + [ '/opt/cord/{{ item.path }}/xos/{{ item.name }}-{{ item.operation | default('onboard') }}.yaml']"
11 with_items: "{{ xos_services }}"
12
13- name: Generate list of libraries
14 set_fact:
15 recipes: "{{ recipes }} + [ '/opt/cord/orchestration/xos_libraries/{{ item }}/{{ item }}-onboard.yaml']"
16 with_items: "{{ xos_libraries }}"
17
18- name: Join the list of recipes
19 set_fact:
20 recipes_string: "{{ recipes | join(' ') }}"
21
22- debug:
23 msg: "{{ recipes }}"
24
25- name: Create the BUILD directory
26 file:
27 path: "{{ cord_dir | realpath }}/orchestration/xos/containers/xos/BUILD"
28 state: directory
29 mode: 0755
30
31# Run the corebuilder tool -- we can't do this using a docker ansible command,
32# as we have to wait for the tool to complete before continuing.
33
34- name: Run the corebuilder tool
35 shell: >
36 docker run
37 --rm
38 -v {{ cord_dir | realpath }}:/opt/cord
39 -v {{ cord_dir | realpath }}/orchestration/xos/containers/xos/BUILD:/opt/xos_corebuilder/BUILD
40 xosproject/xos-corebuilder:candidate
41 {{ recipes_string }}
42 tags:
43 - skip_ansible_lint # running a build task
44
45- name: Build UI image
46 docker_image:
47 name: "xosproject/xos-ui"
48 path: "{{ cord_dir | realpath }}/orchestration/xos"
49 tag: "{{ build_docker_tag }}"
50 dockerfile: "containers/xos/Dockerfile.UI"
51 pull: False
Andy Bavier9e7d54a2017-04-17 11:37:02 -040052 force: yes
Scott Baker57196542017-04-11 15:48:17 -070053
54