25c0f46169
Add Dockerfile and CI config for building cluster autoscaler container images specifically for magnum. The autoscaler is built with the build tag "magnum" so that only the magnum provider is included in the binary. This cuts the size of the image in half compared to building with all cloud providers. The container-build job in .zuul.yaml has to have its timeout increased, as the build time was already close to the timeout. Change-Id: Iecbae5866278afe1687a4533b71af60fce537a4a
36 lines
1.7 KiB
YAML
36 lines
1.7 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- include_vars: container-builder-vars.yaml
|
|
|
|
- name: Push images to DockerHub
|
|
block:
|
|
- command: docker login -u {{ magnum_docker_login.user }} -p {{ magnum_docker_login.password }}
|
|
no_log: True
|
|
retries: 5
|
|
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ item.tag }}
|
|
with_items: "{{ magnum_images }}"
|
|
retries: 10
|
|
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ kubernetes_version_v1_11 }}
|
|
with_items: "{{ kubernetes_images }}"
|
|
retries: 10
|
|
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ kubernetes_version_v1_12 }}
|
|
with_items: "{{ kubernetes_images }}"
|
|
retries: 10
|
|
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ kubernetes_version_v1_13 }}
|
|
with_items: "{{ kubernetes_images }}"
|
|
retries: 10
|
|
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ kubernetes_version_v1_14 }}
|
|
with_items: "{{ kubernetes_images }}"
|
|
retries: 10
|
|
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ kubernetes_version_v1_15 }}
|
|
with_items: "{{ kubernetes_images }}"
|
|
retries: 10
|
|
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ kubernetes_version_v1_16 }}
|
|
with_items: "{{ kubernetes_images }}"
|
|
retries: 10
|
|
- command: docker push {{ magnum_repository }}/helm-client:{{ helm_version }}
|
|
retries: 10
|
|
- command: docker push {{ magnum_repository }}/cluster-autoscaler:v{{ item.version }}
|
|
with_items: "{{ cluster_autoscaler_versions }}"
|
|
retries: 10
|