Skip to content
Snippets Groups Projects
Commit e72c5585 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

feat: remove cleanup for base comput and gpu image

parent d568a476
No related branches found
No related tags found
No related merge requests found
...@@ -377,41 +377,11 @@ cleanup_integration: ...@@ -377,41 +377,11 @@ cleanup_integration:
| awk -v NITK=$NUM_IMAGE_TO_KEEP -v REGEX=ood-$TIMESTAMP_REGEX | awk -v NITK=$NUM_IMAGE_TO_KEEP -v REGEX=ood-$TIMESTAMP_REGEX
'{if ($0 ~ REGEX) result[count++] = $1} '{if ($0 ~ REGEX) result[count++] = $1}
END {for(i=NITK;i<count;i++) print result[i]}')) END {for(i=NITK;i<count;i++) print result[i]}'))
- >
BASE_IMAGE_TO_BE_DELETE=($(cat images.txt
| awk -v NITK=$NUM_IMAGE_TO_KEEP -v REGEX=base-$TIMESTAMP_REGEX
'{if ($0 ~ REGEX) result[count++] = $1}
END {for(i=NITK;i<count;i++) print result[i]}'))
- >
COMPUTE_IMAGE_TO_BE_DELETE=($(cat images.txt
| awk -v NITK=$NUM_IMAGE_TO_KEEP -v REGEX=compute-$TIMESTAMP_REGEX
'{if ($0 ~ REGEX) result[count++] = $1}
END {for(i=NITK;i<count;i++) print result[i]}'))
- >
GPU_IMAGE_TO_BE_DELETE=($(cat images.txt
| awk -v NITK=$NUM_IMAGE_TO_KEEP -v REGEX=gpu-$TIMESTAMP_REGEX
'{if ($0 ~ REGEX) result[count++] = $1}
END {for(i=NITK;i<count;i++) print result[i]}'))
- | - |
for img in ${OOD_IMAGE_TO_BE_DELETE[@]}; do for img in ${OOD_IMAGE_TO_BE_DELETE[@]}; do
echo "Deleting image $img" echo "Deleting image $img"
openstack image delete ${img} openstack image delete ${img}
done done
- |
for img in ${BASE_IMAGE_TO_BE_DELETE[@]}; do
echo "Deleting image $img"
openstack image delete ${img}
done
- |
for img in ${COMPUTE_IMAGE_TO_BE_DELETE[@]}; do
echo "Deleting image $img"
openstack image delete ${img}
done
- |
for img in ${GPU_IMAGE_TO_BE_DELETE[@]}; do
echo "Deleting image $img"
openstack image delete ${img}
done
rules: rules:
- if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_PIPELINE_SOURCE == "schedule"
when: always when: always
......
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