Merge "Pull and prune docker images together"

This commit is contained in:
Zuul 2020-05-07 23:16:58 +00:00 committed by Gerrit Code Review
commit 9437572ce3
9 changed files with 28 additions and 17 deletions

View File

@ -41,6 +41,10 @@
cmd: docker-compose up -d
chdir: /etc/nodepool-builder-compose/
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f
- name: Disable old service
service:
name: nodepool-builder

View File

@ -54,6 +54,12 @@
include_tasks: start.yaml
when: nodepool_launcher_start | bool
# We can prune here as it should leave the "latest" tagged images
# as well as the currently running images.
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f
- name: Disable old service
service:
name: nodepool-launcher

View File

@ -2,7 +2,3 @@
shell:
cmd: docker-compose up -d
chdir: /etc/nodepool-docker/
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f

View File

@ -51,6 +51,12 @@
include_tasks: start.yaml
when: zuul_merger_start | bool
# We can prune here as it should leave the "latest" tagged images
# as well as the currently running images.
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f
- name: Disable old service
service:
name: zuul-merger

View File

@ -2,7 +2,3 @@
shell:
cmd: docker-compose up -d
chdir: /etc/zuul-merger
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f

View File

@ -72,6 +72,12 @@
include_tasks: start.yaml
when: zuul_scheduler_start is defined and zuul_scheduler_start | bool
# We can prune here as it should leave the "latest" tagged images
# as well as the currently running images.
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f
- name: Disable old service
service:
name: zuul-scheduler

View File

@ -2,8 +2,3 @@
shell:
cmd: docker-compose up -d
chdir: /etc/zuul-scheduler
# TODO: put this in a handler
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f

View File

@ -108,6 +108,12 @@
include_tasks: start.yaml
when: zuul_web_start | bool
# We can prune here as it should leave the "latest" tagged images
# as well as the currently running images.
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f
- name: Disable old service
service:
name: 'zuul-{{ item }}'

View File

@ -2,7 +2,3 @@
shell:
cmd: docker-compose up -d
chdir: /etc/zuul-web
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f