Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit f5976bdc authored by Vehbo DZOGOVIC's avatar Vehbo DZOGOVIC
Browse files

Remove source image

parent e0ffbc1d
No related branches found
No related tags found
1 merge request!25Remove source image
Pipeline #73814 failed
......@@ -30,6 +30,10 @@
force_tag: true
source: build
- name: Get source image
set_fact:
source_image: "{{ lookup('ansible.builtin.file', '../Dockerfile') | regex_search('FROM (.*):(.*)') | regex_replace('^FROM\\s(.*)$', '\\1') }}"
- name: Remove local image
community.docker.docker_image:
state: absent
......@@ -42,6 +46,12 @@
name: "{{ lookup('ansible.builtin.env','CI_REGISTRY_IMAGE') }}:{{ lookup('ansible.builtin.env','CI_COMMIT_SHORT_SHA') }}"
force_absent: true
- name: Remove source image
community.docker.docker_image:
state: absent
name: "{{ source_image }}"
force_absent: true
- name: Log out of registry
community.docker.docker_login:
state: absent
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment