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

Skip to content
Snippets Groups Projects
Commit db3edb48 authored by Vincent SIMONIN's avatar Vincent SIMONIN
Browse files

Merge branch 'Remove_source_image' into 'main'

Remove source image

See merge request !25
parents e0ffbc1d a51d71e3
No related branches found
No related tags found
1 merge request!25Remove source image
Pipeline #73821 passed
......@@ -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