blob: 52b95e0f5a5cda5868570edd341914f153a3b8ec [file] [log] [blame]
Matteo Scandolod2044a42017-08-07 16:08:28 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Andy Bavier175cfaf2017-03-13 18:09:21 -040017---
18# publish-xos-docker-images/tasks/main.yml
19
20# Remove the old local images to force them to be re-pushed
21- name: Remove old local XOS images
22 docker_image:
23 name: "{{ deploy_docker_registry }}/{{ item.name }}:{{ deploy_docker_tag }}"
24 state: absent
25 with_items: "{{ docker_images | selectattr('publish') | list }}"
26
27- name: Tag and push locally built images to docker registry
28 docker_image:
29 name: "{{ item.name }}:{{ deploy_docker_tag }}"
30 repository: "{{ deploy_docker_registry }}/{{ item.name }}:{{ deploy_docker_tag }}"
31 push: True
32 with_items: "{{ docker_images | selectattr('publish') | list }}"
33
34# Remove the old local images to force them to be re-pushed
35- name: Remove old local XOS GUI extension images
36 docker_image:
37 name: "{{ deploy_docker_registry }}/xosproject/gui-extension-{{ item.name }}:{{ deploy_docker_tag }}"
38 state: absent
39 with_items: "{{ enabled_gui_extensions }}"
40
41- name: Tag and push locally built images to docker registry
42 docker_image:
43 name: "xosproject/gui-extension-{{ item.name }}:{{ deploy_docker_tag }}"
44 repository: "{{ deploy_docker_registry }}/xosproject/gui-extension-{{ item.name }}:{{ deploy_docker_tag }}"
45 push: True
46 with_items: "{{ enabled_gui_extensions }}"
47
48# Remove the old local images to force them to be re-pushed
Andy Bavier7bcd2832017-03-23 13:45:21 -040049- name: Remove old local synchronizer images
50 docker_image:
51 name: "{{ deploy_docker_registry }}/xosproject/{{ item.name }}-synchronizer:{{ deploy_docker_tag }}"
52 state: absent
53 with_items: "{{ xos_services }}"
54
55- name: Tag and push locally built synchronizer images to docker registry
56 docker_image:
57 name: "xosproject/{{ item.name }}-synchronizer:{{ deploy_docker_tag }}"
58 repository: "{{ deploy_docker_registry }}/xosproject/{{ item.name }}-synchronizer:{{ deploy_docker_tag }}"
59 push: True
60 with_items: "{{ xos_services }}"
Zack Williamse5b29652017-06-02 20:11:29 -070061 when: not frontend_only and (item.synchronizer is not defined or item.synchronizer)
Andy Bavier7bcd2832017-03-23 13:45:21 -040062
63# Remove the old local images to force them to be re-pushed
Andy Bavier175cfaf2017-03-13 18:09:21 -040064- name: Remove old local miscellaneous images
65 docker_image:
66 name: "{{ deploy_docker_registry }}/{{ item }}"
67 state: absent
68 with_items: "{{ misc_docker_images }}"
69
70# Just needed for onboarding, will go away
71- name: Tag and push miscellaneous images
72 docker_image:
73 name: "{{ item }}"
74 repository: "{{ deploy_docker_registry }}/{{ item }}"
75 push: True
76 with_items: "{{ misc_docker_images }}"