Add tag for test-infra images and docker logout (#6848)

This commit is contained in:
Maxime Guyot
2020-10-21 13:08:20 +02:00
committed by GitHub
parent 60b0fb3e88
commit f2ef781efd
2 changed files with 17 additions and 2 deletions

View File

@@ -46,7 +46,7 @@
dest: "{{ images_dir }}/Dockerfile"
- name: Create docker images for each OS # noqa 301
command: docker build -t {{ registry }}/vm-{{ item.key }} --build-arg cloud_image="{{ item.key }}.qcow2" {{ images_dir }}
command: docker build -t {{ registry }}/vm-{{ item.key }}:{{ item.value.tag }} --build-arg cloud_image="{{ item.key }}.qcow2" {{ images_dir }}
with_dict:
- "{{ images }}"
@@ -54,6 +54,9 @@
command: docker login -u="{{ docker_user }}" -p="{{ docker_password }}" "{{ docker_host }}"
- name: docker push image # noqa 301
command: docker push {{ registry }}/vm-{{ item.key }}:latest
command: docker push {{ registry }}/vm-{{ item.key }}:{{ item.value.tag }}
with_dict:
- "{{ images }}"
- name: docker logout # noqa 301
command: docker logout -u="{{ docker_user }}" "{{ docker_host }}"