zuul-jobs/test-playbooks/registry/test-registry-post.yaml
James E. Blair 91ae8e62de Test buildset registry with k8s and docker
This adds a test job for the buildset registry with k8s with the
docker runtime.

Change-Id: I0ec1d3d5980424f85f5e7619b9dec96c8f0f70f1
2019-10-28 15:45:39 -07:00

25 lines
750 B
YAML

- hosts: all
tasks:
- name: List containers
command: "docker ps -a --format '{{ '{{ .Names }}' }}'"
register: docker_containers
ignore_errors: true
- name: Create container log dir
file:
path: "{{ ansible_user_dir }}/zuul-output/logs/docker"
state: directory
- name: Save container logs
loop: "{{ docker_containers.stdout_lines | default([]) }}"
shell: "docker logs {{ item }} &> {{ ansible_user_dir }}/zuul-output/logs/docker/{{ item }}.txt"
args:
executable: /bin/bash
ignore_errors: true
- name: Open container logs permissions
file:
dest: "{{ ansible_user_dir }}/zuul-output/logs/docker"
mode: u=rwX,g=rX,o=rX
recurse: yes