Support multi k8s image versions

Change-Id: Icae30a7d6c5f779e75587f398d06dc149378e827
changes/50/633650/4
Feilong Wang 4 years ago
parent 60f9799374
commit 0a5fd471c3
  1. 4
      playbooks/container-builder-vars.yaml
  2. 32
      playbooks/container-builder.yaml
  3. 8
      playbooks/container-publish.yaml

@ -1,7 +1,9 @@
magnum_src_dir: "src/git.openstack.org/openstack/magnum"
magnum_repository: openstackmagnum
kubernetes_version: v1.11.6
kubernetes_version_v1_11: v1.11.6
kubernetes_version_v1_12: v1.12.5
kubernetes_version_v1_13: v1.13.2
kubernetes_images:
- name: kubernetes-apiserver
- name: kubernetes-controller-manager

@ -13,15 +13,41 @@
with_items: "{{ magnum_images }}"
retries: 10
- name: "Build kubernetes images"
- name: "Build kubernetes images v1.11"
block:
- name: "Build {{ magnum_repository }}/{{ item.name }}:{{ item.tag }} image"
docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/{{ item.name }}"
name: "{{ magnum_repository }}/{{ item.name }}"
tag: "{{ kubernetes_version }}"
tag: "{{kubernetes_version_v1_11}}"
buildargs:
KUBE_VERSION: "{{ kubernetes_version }}"
KUBE_VERSION: "{{kubernetes_version_v1_11}}"
push: no
with_items: "{{ kubernetes_images }}"
retries: 10
- name: "Build kubernetes images v1.12"
block:
- name: "Build {{ magnum_repository }}/{{ item.name }}:{{ item.tag }} image"
docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/{{ item.name }}"
name: "{{ magnum_repository }}/{{ item.name }}"
tag: "{{kubernetes_version_v1_12}}"
buildargs:
KUBE_VERSION: "{{kubernetes_version_v1_12}}"
push: no
with_items: "{{ kubernetes_images }}"
retries: 10
- name: "Build kubernetes images v1.13"
block:
- name: "Build {{ magnum_repository }}/{{ item.name }}:{{ item.tag }} image"
docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/{{ item.name }}"
name: "{{ magnum_repository }}/{{ item.name }}"
tag: "{{kubernetes_version_v1_13}}"
buildargs:
KUBE_VERSION: "{{kubernetes_version_v1_13}}"
push: no
with_items: "{{ kubernetes_images }}"
retries: 10

@ -10,6 +10,12 @@
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ item.tag }}
with_items: "{{ magnum_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ kubernetes_version }}
- 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

Loading…
Cancel
Save