blob: 88e6af6d47be431b7f2f001c97f75c87d4f3b363 [file] [log] [blame]
---
# xos-core-build/tasks/main.yml
- name: Intialize recipe list
set_fact:
recipes: ['/opt/cord/orchestration/xos/xos/core/core-onboard.yaml']
- name: Generate list of recipes
set_fact:
recipes: "{{ recipes }} + [ '/opt/cord/{{ item.path }}/xos/{{ item.name }}-{{ item.operation | default('onboard') }}.yaml']"
with_items: "{{ xos_services }}"
- name: Generate list of libraries
set_fact:
recipes: "{{ recipes }} + [ '/opt/cord/orchestration/xos_libraries/{{ item }}/{{ item }}-onboard.yaml']"
with_items: "{{ xos_libraries }}"
- name: Add in the profile library
set_fact:
recipes: "{{ recipes }} + [ '/opt/cord/orchestration/profiles/{{ profile_library }}/xos/{{ profile_library }}-onboard.yaml']"
when:
profile_library != ""
- name: Join the list of recipes
set_fact:
recipes_string: "{{ recipes | join(' ') }}"
- debug:
msg: "{{ recipes }}"
- name: Create the BUILD directory
file:
path: "{{ cord_dir | realpath }}/orchestration/xos/containers/xos/BUILD"
state: directory
mode: 0755
# Run the corebuilder tool -- we can't do this using a docker ansible command,
# as we have to wait for the tool to complete before continuing.
- name: Run the corebuilder tool
shell: >
docker run
--rm
-v {{ cord_dir | realpath }}:/opt/cord
-v {{ cord_dir | realpath }}/orchestration/xos/containers/xos/BUILD:/opt/xos_corebuilder/BUILD
xosproject/xos-corebuilder:candidate
{{ recipes_string }}
tags:
- skip_ansible_lint # running a build task
- name: Build UI image
docker_image:
name: "xosproject/xos-ui"
path: "{{ cord_dir | realpath }}/orchestration/xos"
tag: "{{ build_docker_tag }}"
dockerfile: "containers/xos/Dockerfile.UI"
pull: False
force: True