Skip to content
Snippets Groups Projects
Commit a56d68ae authored by Eesaan Atluri's avatar Eesaan Atluri
Browse files

Merge branch 'fix-regex-pick-latest-img' into 'master'

fix regex to capture latest image to be used

See merge request rc/terraform-openstack!38
parents f591667d fdbd22f3
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ tf-apply:
- |
if [ -z $TF_VAR_image_ohpc ];
then
XDMOD_IMAGES=($(openstack image list --sort-column Name --sort-descending -f value -c Name -c ID | grep -P " xdmod-${TARGET_ENV}-\d{14}$" | awk '{print $2}'))
XDMOD_IMAGES=($(openstack image list --sort-column Name --sort-descending -f value -c Name -c ID | grep -P " xdmod-$TARGET_ENV-\d{4}-\d{2}-\d{2}T\d{6}$" | awk '{print $2}'))
export TF_VAR_image_ohpc="${XDMOD_IMAGES[0]}"
echo $TF_VAR_image_ohpc
else
......
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