blob: 4878c1cf979c7b745c608c290c3c067f1ae8cf0b [file] [log] [blame]
Andy Bavier175cfaf2017-03-13 18:09:21 -04001---
2# publish-xos-docker-images/tasks/main.yml
3
4# Remove the old local images to force them to be re-pushed
5- name: Remove old local XOS images
6 docker_image:
7 name: "{{ deploy_docker_registry }}/{{ item.name }}:{{ deploy_docker_tag }}"
8 state: absent
9 with_items: "{{ docker_images | selectattr('publish') | list }}"
10
11- name: Tag and push locally built images to docker registry
12 docker_image:
13 name: "{{ item.name }}:{{ deploy_docker_tag }}"
14 repository: "{{ deploy_docker_registry }}/{{ item.name }}:{{ deploy_docker_tag }}"
15 push: True
16 with_items: "{{ docker_images | selectattr('publish') | list }}"
17
18# Remove the old local images to force them to be re-pushed
19- name: Remove old local XOS GUI extension images
20 docker_image:
21 name: "{{ deploy_docker_registry }}/xosproject/gui-extension-{{ item.name }}:{{ deploy_docker_tag }}"
22 state: absent
23 with_items: "{{ enabled_gui_extensions }}"
24
25- name: Tag and push locally built images to docker registry
26 docker_image:
27 name: "xosproject/gui-extension-{{ item.name }}:{{ deploy_docker_tag }}"
28 repository: "{{ deploy_docker_registry }}/xosproject/gui-extension-{{ item.name }}:{{ deploy_docker_tag }}"
29 push: True
30 with_items: "{{ enabled_gui_extensions }}"
31
32# Remove the old local images to force them to be re-pushed
Andy Bavier7bcd2832017-03-23 13:45:21 -040033- name: Remove old local synchronizer images
34 docker_image:
35 name: "{{ deploy_docker_registry }}/xosproject/{{ item.name }}-synchronizer:{{ deploy_docker_tag }}"
36 state: absent
37 with_items: "{{ xos_services }}"
38
39- name: Tag and push locally built synchronizer images to docker registry
40 docker_image:
41 name: "xosproject/{{ item.name }}-synchronizer:{{ deploy_docker_tag }}"
42 repository: "{{ deploy_docker_registry }}/xosproject/{{ item.name }}-synchronizer:{{ deploy_docker_tag }}"
43 push: True
44 with_items: "{{ xos_services }}"
Zack Williamse5b29652017-06-02 20:11:29 -070045 when: not frontend_only and (item.synchronizer is not defined or item.synchronizer)
Andy Bavier7bcd2832017-03-23 13:45:21 -040046
47# Remove the old local images to force them to be re-pushed
Andy Bavier175cfaf2017-03-13 18:09:21 -040048- name: Remove old local miscellaneous images
49 docker_image:
50 name: "{{ deploy_docker_registry }}/{{ item }}"
51 state: absent
52 with_items: "{{ misc_docker_images }}"
53
54# Just needed for onboarding, will go away
55- name: Tag and push miscellaneous images
56 docker_image:
57 name: "{{ item }}"
58 repository: "{{ deploy_docker_registry }}/{{ item }}"
59 push: True
60 with_items: "{{ misc_docker_images }}"