|
11 | 11 | docker_image:
|
12 | 12 | name: "{{ magnum_repository }}/heat-container-agent"
|
13 | 13 | tag: "{{ item.tag }}"
|
14 |
| - pull: yes |
| 14 | + source: pull |
15 | 15 | register: docker_output
|
16 | 16 | when: not (item.dev | default(false) | bool)
|
17 |
| - ignore_errors: true |
| 17 | + failed_when: (docker_output is failed and "pull rate limit" in docker_output.msg) |
18 | 18 | with_items: "{{ heat_container_agent_images }}"
|
19 | 19 | - name: "Build {{ magnum_repository }}/heat-container-agent:{{ item.item.tag }} image"
|
20 | 20 | docker_image:
|
21 |
| - path: "{{ magnum_src_dir }}/dockerfiles/heat-container-agent" |
| 21 | + build: |
| 22 | + path: "{{ magnum_src_dir }}/dockerfiles/heat-container-agent" |
22 | 23 | name: "{{ magnum_repository }}/heat-container-agent"
|
23 | 24 | tag: "{{ item.item.tag }}"
|
24 | 25 | push: no
|
25 | 26 | source: build
|
26 | 27 | with_items: "{{ docker_output.results }}"
|
27 |
| - when: (item is failed) or (item.item.dev | default(false) | bool) |
| 28 | + when: ("msg" in item and "not found" in item.msg) or (item.item.dev | default(false) | bool) |
28 | 29 | retries: 10
|
29 | 30 |
|
30 | 31 | - name: "Build kubernetes images"
|
31 | 32 | block:
|
32 | 33 | - name: "Build {{ magnum_repository }}/{{ item[1].name }}:{{ item[0].version }} image"
|
33 | 34 | docker_image:
|
34 |
| - path: "{{ magnum_src_dir }}/dockerfiles/{{ item[1].name }}" |
35 | 35 | name: "{{ magnum_repository }}/{{ item[1].name }}"
|
36 | 36 | tag: "{{ item[0].version }}"
|
37 |
| - buildargs: |
38 |
| - KUBE_VERSION: "{{ item[0].version }}" |
| 37 | + build: |
| 38 | + path: "{{ magnum_src_dir }}/dockerfiles/{{ item[1].name }}" |
| 39 | + args: |
| 40 | + KUBE_VERSION: "{{ item[0].version }}" |
39 | 41 | push: no
|
| 42 | + source: build |
40 | 43 | with_nested:
|
41 | 44 | - "{{ kubernetes_versions }}"
|
42 | 45 | - "{{ kubernetes_images }}"
|
|
45 | 48 | - name: "Build helm-client image"
|
46 | 49 | block:
|
47 | 50 | - docker_image:
|
48 |
| - path: "{{ magnum_src_dir }}/dockerfiles/helm-client" |
49 | 51 | name: "{{ magnum_repository }}/helm-client"
|
50 | 52 | tag: "{{ item.version }}"
|
51 |
| - buildargs: |
52 |
| - HELM_VERSION: "{{ item.version }}" |
| 53 | + build: |
| 54 | + path: "{{ magnum_src_dir }}/dockerfiles/helm-client" |
| 55 | + args: |
| 56 | + HELM_VERSION: "{{ item.version }}" |
53 | 57 | push: no
|
| 58 | + source: build |
54 | 59 | with_items: "{{ helm_versions }}"
|
55 | 60 | retries: 10
|
56 | 61 |
|
57 | 62 | - name: "Build cluster-autoscaler image"
|
58 | 63 | block:
|
59 | 64 | - name: "Build {{ magnum_repository }}/cluster-autoscaler:v{{ item.version }}"
|
60 | 65 | docker_image:
|
61 |
| - path: "{{ magnum_src_dir }}/dockerfiles/cluster-autoscaler" |
62 | 66 | name: "{{ magnum_repository }}/cluster-autoscaler"
|
63 | 67 | tag: "v{{ item.version }}"
|
64 |
| - buildargs: |
65 |
| - AUTOSCALER_VERSION: "cluster-autoscaler-{{ item.version }}" |
| 68 | + build: |
| 69 | + path: "{{ magnum_src_dir }}/dockerfiles/cluster-autoscaler" |
| 70 | + args: |
| 71 | + AUTOSCALER_VERSION: "cluster-autoscaler-{{ item.version }}" |
66 | 72 | push: no
|
| 73 | + source: build |
67 | 74 | with_items: "{{ cluster_autoscaler_versions }}"
|
68 | 75 | retries: 10
|
0 commit comments