1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-03-22 02:29:08 +00:00

Add autodiscovery for build context in podman_image (#757)

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
Sergey 2024-05-26 00:02:20 +03:00 committed by GitHub
parent e29e2cfb19
commit b3dc57c1cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 5 deletions

View file

@ -209,15 +209,34 @@
register: oci_build3
ignore_errors: true
- name: Build OCI image, point to location of Containerfile
- name: Build OCI image, point to location of Containerfile without path
containers.podman.podman_image:
executable: "{{ test_executable | default('podman') }}"
name: testimage2
path: /var/tmp/build/subdir
state: build
build:
file: /var/tmp/build/Dockerfile
register: oci_build4
- name: Build OCI image, point to location of Containerfile and path
containers.podman.podman_image:
executable: "{{ test_executable | default('podman') }}"
name: testimage3
path: /var/tmp/build
build:
file: /var/tmp/build/Dockerfile
register: oci_build5
- name: Build OCI image, point to location of Containerfile and path
containers.podman.podman_image:
executable: "{{ test_executable | default('podman') }}"
name: testimage5x
state: build
build:
format: oci
register: oci_build6
ignore_errors: true
- name: Inspect first image
containers.podman.podman_image_info:
executable: "{{ test_executable | default('podman') }}"
@ -237,7 +256,9 @@
- oci_build2 is not changed
- oci_build3 is not changed
- oci_build3 is failed
- oci_build4 is changed
- oci_build4 is success
- oci_build5 is success
- oci_build6 is failed
- "'localhost/testimage:latest' in testimage_info.images[0]['RepoTags'][0]"
- "'localhost/testimage2:latest' in testimage2_info.images[0]['RepoTags'][0]"
- "'no such file or directory' in oci_build3.msg"