blob: a96d419d4ca9ebbfdb5748c376ae72f9e8220f42 [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 Bhatiae86a3d22017-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 Bavierfa53a8d2017-05-03 08:47:16 -070052 force: True
53 rm: False