Scott Baker | 5719654 | 2017-04-11 15:48:17 -0700 | [diff] [blame] | 1 | --- |
| 2 | # xos-core-build/tasks/main.yml |
| 3 | |
| 4 | - name: Intialize recipe list |
| 5 | set_fact: |
Sapan Bhatia | 631a108 | 2017-04-27 00:53:27 +0200 | [diff] [blame] | 6 | recipes: ['/opt/cord/orchestration/xos/xos/core/core-onboard.yaml'] |
Scott Baker | 5719654 | 2017-04-11 15:48:17 -0700 | [diff] [blame] | 7 | |
| 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 | |
Scott Baker | 463e5f9 | 2017-04-20 15:27:41 -0700 | [diff] [blame] | 18 | - name: Add in the profile library |
| 19 | set_fact: |
| 20 | recipes: "{{ recipes }} + [ '/opt/cord/orchestration/profiles/{{ profile_library }}/xos/{{ profile_library }}-onboard.yaml']" |
| 21 | when: |
| 22 | profile_library != "" |
| 23 | |
Scott Baker | 5719654 | 2017-04-11 15:48:17 -0700 | [diff] [blame] | 24 | - name: Join the list of recipes |
| 25 | set_fact: |
| 26 | recipes_string: "{{ recipes | join(' ') }}" |
| 27 | |
| 28 | - debug: |
| 29 | msg: "{{ recipes }}" |
| 30 | |
| 31 | - name: Create the BUILD directory |
| 32 | file: |
| 33 | path: "{{ cord_dir | realpath }}/orchestration/xos/containers/xos/BUILD" |
| 34 | state: directory |
| 35 | mode: 0755 |
| 36 | |
| 37 | # Run the corebuilder tool -- we can't do this using a docker ansible command, |
| 38 | # as we have to wait for the tool to complete before continuing. |
| 39 | |
| 40 | - name: Run the corebuilder tool |
| 41 | shell: > |
| 42 | docker run |
| 43 | --rm |
| 44 | -v {{ cord_dir | realpath }}:/opt/cord |
| 45 | -v {{ cord_dir | realpath }}/orchestration/xos/containers/xos/BUILD:/opt/xos_corebuilder/BUILD |
| 46 | xosproject/xos-corebuilder:candidate |
| 47 | {{ recipes_string }} |
| 48 | tags: |
| 49 | - skip_ansible_lint # running a build task |
| 50 | |
| 51 | - name: Build UI image |
| 52 | docker_image: |
| 53 | name: "xosproject/xos-ui" |
| 54 | path: "{{ cord_dir | realpath }}/orchestration/xos" |
| 55 | tag: "{{ build_docker_tag }}" |
| 56 | dockerfile: "containers/xos/Dockerfile.UI" |
| 57 | pull: False |
Andy Bavier | e8b01d2 | 2017-05-03 08:47:16 -0700 | [diff] [blame] | 58 | force: True |