Skip to content

Commit

Permalink
gitlab-ci: cleanup temporary perf images
Browse files Browse the repository at this point in the history
Each temporary docker perf image is about 5 GB
and we don’t have space to keep them localy on servers.

- add cleanup after perf docker
  image preparation (perf_bootstrap job).
- cleanup perf docker images on execution hosts
  after perf testing (cleanup stage).

Closes #5003

(cherry picked from commit 47dbbf5)
  • Loading branch information
Oleg Piskunov authored and kyukhin committed May 28, 2020
1 parent f5a0f35 commit b0c9648
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
33 changes: 26 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ variables:
script:
- ${GITLAB_MAKE} perf_run

.perf_cleanup_definition: &perf_cleanup_definition
<<: *perf_only_definition
stage: cleanup
script:
- ${GITLAB_MAKE} perf_cleanup

# Tests

release:
Expand Down Expand Up @@ -196,6 +202,8 @@ perf_bootstrap:
- perf
script:
- ${GITLAB_MAKE} perf_prepare
after_script:
- ${GITLAB_MAKE} perf_cleanup_image

# Testing part

Expand Down Expand Up @@ -255,14 +263,25 @@ perf_linkbench_ssd:

# Post-testing part

remove_images:
<<: *perf_only_definition
stage: cleanup
when: always
remove_images_sh1:
<<: *perf_cleanup_definition
tags:
- perf
script:
- ${GITLAB_MAKE} perf_cleanup
- sh1_shell

remove_images_sh2:
<<: *perf_cleanup_definition
tags:
- sh2_shell

remove_images_sh3:
<<: *perf_cleanup_definition
tags:
- sh3_shell

remove_images_sh9:
<<: *perf_cleanup_definition
tags:
- sh9_shell

# Packages and sources

Expand Down
7 changes: 5 additions & 2 deletions .gitlab.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,13 @@ perf_clone_benchs_repo:
perf_prepare: perf_clone_benchs_repo
make -f bench-run/targets.mk prepare

# Remove temporary performance image from the test host
perf_cleanup: perf_clone_benchs_repo
# Remove temporary performance image
perf_cleanup_image:
make -f bench-run/targets.mk cleanup

# Remove temporary performance image from the test host
perf_cleanup: perf_clone_benchs_repo perf_cleanup_image

# #################################
# Run tests under a virtual machine
# #################################
Expand Down

0 comments on commit b0c9648

Please sign in to comment.