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

Filter image with PR number

parent e706102f
No related branches found
No related tags found
No related merge requests found
......@@ -413,7 +413,7 @@ cleanup_mr:
script:
- >
IMAGE_TO_BE_DELETE=($(openstack image list --sort-column Name --sort-descending -f value -c Name -c ID
| awk -v REGEX='(ood|base|compute|gpu)-PR-' '{if ($0 ~ REGEX) print $1}'))
| awk -v REGEX="(ood|base|compute|gpu)-PR-$CI_MERGE_REQUEST_IID" '{if ($0 ~ REGEX) print $1}'))
- |
for img in ${IMAGE_TO_BE_DELETE[@]}; do
openstack image delete ${img}
......
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