buildah/tests/roles/cli/tasks/inspect.yaml
Bruno Goncalves eea687c42a Sync new tests from upstreamfirst
* the tests is quite old since it moved from upstreamfirst
    * lots of new cases are added, like option 'run', 'inspect' etc
    * save log to TEST_ARTIFACTS when the variable is set
    * always run tests with latest runc built from source
    * merge task and task status to same line
2018-05-24 12:58:54 +02:00

26 lines
851 B
YAML

---
- name: buildah inspect an image by name
command: buildah inspect docker.io/library/nginx:latest
- name: get image ID
command: buildah images -q docker.io/library/nginx:latest
register: imgid
- name: buildah inspect an image by ID
command: buildah inspect --type image {{ imgid.stdout }}
- name: buildah inspect image with format
command: buildah inspect -t image -f {% raw %}'{{ .FromImageID }}'{% endraw %} {{ imgid.stdout }}
register: inspectid
failed_when: 'inspectid.stdout != imgid.stdout'
- name: buildah inspect container by name
command: buildah inspect -t container nginxc-2
- name: buildah inspect container with format
shell: buildah inspect -f {% raw %}'{{ .ContainerID }}'{% endraw %} nginxc-2
register: inspectcid
- name: buildah inspect container by ID
command: buildah inspect {{ inspectcid.stdout }}