Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects

Remove source image

Merged Vehbo DZOGOVIC requested to merge Remove_source_image into main
1 file
+ 10
0
Compare changes
  • Side-by-side
  • Inline
+ 10
0
@@ -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
Loading