Skip to content

Commit

Permalink
[BACKPORT 2024.1][PLAT-14368]: Fix release GC in yml task.
Browse files Browse the repository at this point in the history
Summary:
Fixes release GC code and tail -n +x prints line from (x+1) as we always want to retain last old release.
Earlier, it was tail -n +3 but this also removes the old release so modified to 4.

Original diff/commit: fe19c06/D36074

Test Plan: Tested manually

Reviewers: sanketh, svarshney

Reviewed By: svarshney

Subscribers: yugaware

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D36133
  • Loading branch information
vipul-yb committed Jun 26, 2024
1 parent 62448bb commit c7c8dff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion managed/devops/roles/install_package/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
# doing num_releases_to_keep + 2 because we need to protect 'TEMPORARY' directory under yb-software
- name: Remove older yb software folders
shell: "ls --ignore='ybc*' \"{{ yb_software_dir }}\" -t | \
tail -n +{{ num_releases_to_keep + 2 }} | \
tail -n +{{ num_releases_to_keep + 3 }} | \
xargs -I{} --no-run-if-empty rm -rv \"{{ yb_software_dir }}/{}\" --"
register: rm_yb_softwares_result
tags:
Expand Down

0 comments on commit c7c8dff

Please sign in to comment.